How can I use FFmpeg to record a live stream to multiple files simulataneously?

6,656

The easiest way would be to use the tee pseudo-muxer (documentation). Briefly:

ffmpeg -i INPUT [output options] -f tee "ou1.mp4|out2.mp4|out3.mp4"
Share:
6,656

Related videos on Youtube

cnfcnf
Author by

cnfcnf

Updated on September 18, 2022

Comments

  • cnfcnf
    cnfcnf almost 2 years

    I have FFMPEG reading a live stream and writing to an MP4 file. I would like to modify the FFMPEG command to write to 3 MP4 files simultaneously. This means that instead of generating one file, FFMPEG must generate 3 files simultaneously (essentially the data packets must be read and written in 3 different places on disk). The 3 files are identical, of course.

    I agree that there are constraints with disk speed and processor speed, but I would like to be able to do anyway. Do advise!

    Thanks!