C++ "ASCII" Video Player Demo - Bad Apple
ฝัง
- เผยแพร่เมื่อ 21 ก.ย. 2024
- Source code: github.com/nat...
I still need to implement audio support, I had to edit the music in for this video.
I wrote a simple terminal video player using avformat, avcodec, avutil, swscale and pure C++20. It's still a bit rough around the edges, but it works most of the time.
I recommend watching this video on a high resolution monitor to avoid graphical artifacts from dithering.
Sorry about the shitty audio quality, I am still tweaking kdenlive settings.
Yes, I know. This is not true ASCII, since I use UTF-8 braille dot characters with a special font. :)
-----------------------------
My Discord: / discord
www.natty.sh/
-----------------------------
Damn Moiré patterns ruining my thumbnail 😠
"What is your favorite video player?"
"My own."
I love how bad apple can be on everything
Omg.. it is good, an art of code :v. Even is black and white I know the whole story lol
fancy!
nice
Let's make a comment for possible algorithm.
Still a really nice, smooth animation. Did you speed it up or is it real time?
It can just enough keep up to be real time, I tried 640x360 pixels, but it struggled to stay in sync. WIth further optimizations, I think I'd get another 50%-100% characters out of it.
@@NattyGfx I think this would be a perfect candidate for multi threading. That should get a lot of work done faster. There's also a faster formula for calculating relative brightness from pixel RGB. Also I don't know if GPU acceleration is possible or of any benefit for encoding to ASCII but those are some ideas since there is no source code yet :p
@@Apollyion Thanks for the input. I already decode the video on a different thread and converting from RGB to luminance is handled by swScale. My part of the code mostly consists of image resizing, ordered dithering and a wrapper around avformat/avcodec.
I think the biggest bottleneck right now is pushing all characters to the screen.
I just haven't had the time to finish this project yet as I am busy work and other projects.
@@NattyGfx It's really amazing the work you've already finished. I hope to see more of this project one day!
Thanks!
I got no idea what to comment.
if you watch 144p it seem no ascii character and awesome
Please share source code soon as possible.
Actually happened to remember this project today, added it to the description
I still wait turtorial
I'll try to get back to this at some point, but it's mostly code anyway. If you wanna try something that actually works, I think VLC (?) supports ASCII art output?
@@NattyGfx thx
@@NattyGfx damn, I thought u used read file to do that lol, Is that open cv?
@@deezusstudio2232 It uses libavformat and libavcodec, it's basically what ffmpeg uses under the hood.
@@deezusstudio2232 I added a link to the source to the description