I see these every so often, but they never mention Sixels, which could be used to display videos with much more detail (like with https://github.com/saitoha/FFmpeg-SIXEL ).
Sixels aren't widely supported, and the implementations I tried were lacking in stability, but they offer some interesting possibilities, like embedding images into your text browser (and not with a hack like w3m uses), or playing Battle for Wesnoth inside your terminal [ https://github.com/saitoha/libsixel ]
I had some audio sync issues with mplayer, and it sounds like termplay avoids that. I'm also not sure if there's a way to use true colour with mplayer.
Yep, it does avoid sync issues... well, partly. It doesn't know anything about the audio as that is handled by a pretty high level library. But it does make sure the frames goes at the speed they should. So assuming the audio isn't lagging behind or ahead (which I haven't encountered yet), the image and audio should be synced.
You should allow the user to specify a pixel ratio that describes the width/height of each character of their terminal font. Otherwise, your images will be distorted, because your output pixels are not square.
Here's a screenshot demonstrating this issue, when converting a GIF to text in a terminal:
I've written something similar myself in C++ before, but I'm curious if people actually have interest in using something like this regularly. I had thought I would do something like configure lynx to use it but the novelty quickly wore off and instead I went and started playing with the Mandelbrot set in the terminal and forgot all about it.
I think that playing YouTube in the terminal today is just a fun idea because the videos look so goofy. But like people say... Sixel... Everything is apparently possible!
Someday, somebody will make the whole YouTube platform.
xterm and Konsole allow to display images in the terminal. To check it out, install w3m with the w3m-img patch (in Debian, the "w3m-img" package; in Arch Linux, the "w3m" and "imlib2" packages) and open a webpage that contains plain <img src="..." /> tags.
The rendering is really buggy. Images glitch away all the time, possibly until w3m issues a redraw event, but it kinda sorta works.
Some day, I'll have to dig into either the w3m source or the Konsole source and figure out which ANSI escapes are being used for that. (If someone has a link to a spec or sth, that'd be much appreciated.)
Sixels aren't widely supported, and the implementations I tried were lacking in stability, but they offer some interesting possibilities, like embedding images into your text browser (and not with a hack like w3m uses), or playing Battle for Wesnoth inside your terminal [ https://github.com/saitoha/libsixel ]