Javascript Video to ASCII output in full RGB Color

Viewed 132

I use a Video to ASCII script in JavaScript, but problem is when i use simple JavaScript string for output it works perfectly and ASCII video plays smoothly in gray scale. see here i use simple JavaScript string without HTML code.

 str += this.getChar(val)

but when i try to play ASCII video in color mode and use HTML Style tag with color RGB then it plays ASCII video output in full RGB color but ASCII Video is frame are skipping and not playing smoothly. i think it is maybe due to processor slow to render HTML code in each ASCII line. See here i use HTML code with JavaScript string.

str += `<font style="color: rgb(${r}, ${g}, ${b})">${this.getChar(val)}</font>`;

or use this

str += "<span style=\"color: rgb("+r+","+g+","+b+"); \">"+ this.getChar(val) +"</span>";

Anyone suggest a solution to play ASCII Video smoothly in full Color mode. your help will be appreciated.

However here i find a video and in the last part of this video Alex explain how to get color ASCII video by inverting images, also he did in his python script on github. but i don't how to do it in JavaScript. maybe it help you.

https://youtu.be/SzqKClkCi_0

0 Answers
Related