Skip to content
jb-alvarado edited this page Apr 14, 2022 · 17 revisions

Welcome to the ffplayout wiki!

ffplayout works in such a way that it uses an ffmpeg instance to edit video clips so that they all have the same format. Then these clips are pushed into a second ffmpeg instance, and this one compresses the final stream and sends it to the destination server.

The second ffmpeg instance is constantly running, ensuring that we have an infinitely long stream.

In Shell, the principle would be mapped to something like this:

for i in *.mp4; do
   ffmpeg -i "$i" -s 1280x720 -c:v mpeg2video -b:v 50M -c:a s302m -strict -2 -ar 48k -f mpegts -;
done | ffmpeg -i pipe:0 -c:v libx264 -c:a aac -ar 44100 -f flv rtmp://exmaple.org/live/stream

For information about workaround, pre- and post-compression and why I take some decisions, take a look in: