4 ms·
You can use ffmpeg losslessly on the decode side as well, but the only interfaces I could find to write to are v4l2 and fbdev, neither of which seem to work pro
by a1369209993 4y ago
You can use ffmpeg losslessly on the decode side as well, but the only interfaces I could find to write to are v4l2 and fbdev, neither of which seem to work properly under X11. (The obvious candidate, x11grab, a: reads, not writes b: the entire screen, not a specific window.) So you'd need something else to pipe the raw video to (ffmpeg can dump the audio into alsa).
You could also not decode it, and just demux the video and pipe that. Depending on how it reads/decodes files, a image viewer that displays GIFs might update in close to real time as it reads from a pipe that ffmpeg is demuxing into, and might not leak memory by keeping the overwritten frames around in case the GIF loops, but those both seem unlikely.
(As the saying goes: if it only works the way the manufacturer intended, it's defective.)
- a1369209993 4y agoAddendum: I remembered that ffplay existed. Annoyingly, it still doesn't properly handle ffmpeg-generated .gif.mkv files by default, but you can do: $ ffplay -codec:v gif -i A.gif.mkv to force correct video codec. Also, it seems this is not a problem with the video players, but rather that ffmpeg's matroska muxer writes a incorrect video codec id of V_QUICKTIME. It works correctly with mov/.gif.mov (and possibly other container formats), and should work with mkv if you can patch in a correct codec id.