Flush & Latency Issue with Fragmented MP4 Creation in FFMPEG

后端 未结 3 1740
情歌与酒
情歌与酒 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:24

    The key to removing the delay is to use the -probesize argument:

    probesize integer (input)

    Set probing size in bytes, i.e. the size of the data to analyze to get stream information. A higher value will enable detecting more information in case it is dispersed into the stream, but will increase latency. Must be an integer not lesser than 32. It is 5000000 by default.

    By default the value is 5,000,000 bytes which was equivalent to ~1.5 sec of video. I was able to almost completely eliminate the delay by reducing the value to 200,000.

提交回复
热议问题