linux – How do I control the speed of ffmpeg source filters when writing to the xv device?
You can simulate the behaviour of ffplay with ffmpeg by using the xv output device like so.
ffmpeg -re -f lavfi -i 'color=red [red]; color=blue [blue]; [blue][red]xfade=duration=5s, format=yuv420p, trim=duration=5s' -f xv ''
This has certain uses since ffmpeg can do more things than ffplay – for example it can take multiple inputs. The -re command ensure that playback is at normal speeds.
However to use this you have to use a lavfi input source rather a complex filter because if you use -filter_complex ffmpeg will process as quickly as possible causing X11 to use 100% cpu and the video to play too quickly. See the example below
ffmpeg -re -f lavfi -i 'color=red [red]; color=blue [blue]; [blue][red]xfade=duration=5s, format=yuv420p, trim=duration=5s' -f xv ''
Is there any way of controlling either the “speed” of source filters, or the “write speed” of outputs.
Read more here: Source link
