Flush & Latency Issue with Fragmented MP4 Creation in FFMPEG

后端 未结 3 1735
情歌与酒
情歌与酒 2020-12-05 05:53

I\'m creating a fragmented mp4 for html5 streaming, using the following command:

-i rtsp://172.20.28.52:554/h264 -vcodec copy -an -f mp4 -reset_timestamps 1          


        
3条回答
  •  醉梦人生
    2020-12-05 06:33

    Usually the buffering for stdout is disabled in case of console output. If you run ffmpeg from code, the buffering is enabled, so you will get your data only when the buffer is full or the command ends.

    You have to eliminate the stdout buffering of your os. On windows its impossible imo, but on ubuntu for ex. There is http://manpages.ubuntu.com/manpages/maverick/man1/stdbuf.1.html

提交回复
热议问题