[FFmpeg-user] FFMPEG output to append to a text file without overwriting the content

Sana Tafleen sana.tafleen at gmail.com
Tue Jun 5 03:06:42 EEST 2018


Hello,

I am sending a UDP stream to the destination and saving the contents of the
FFMPEG output to a text file. I run the ffmpeg command in a loop as follows,


while :
do
      echo `ffmpeg -hide_banner -f v4l2 -i /dev/video0 -c:v libx264 -f
mpegts tcp://ip:port -c:v libx264 /path/to/.mp4 2> out.txt -y`
done



When I disconnect the cable connected the destination, the above ffmpeg
process stops and a new one starts oevrwriting the content of the output
that has been saved. And when I reconnect the cable, a new ffmpeg process
starts and its output is what is displayed in the out.txt file.

I need the output of each ffmpeg process that runs to an output file. Can
anyone please suggest me a way to do it?


More information about the ffmpeg-user mailing list