FFMPEG- Streaming Stops after few seconds

后端 未结 1 1867
轮回少年
轮回少年 2021-02-15 22:52

Hi there dear community

This is the thing that I am dealing with, since last few days. After thorough search in the ffmpeg community, I was unable to find the solution.

相关标签:
1条回答
  • 2021-02-15 22:58

    At the end of muxing a flv file, FFmpeg updates the header (at front of file) with duration and filesize values. However, when you are streaming, ffmpeg can't seek to the front, so the warnings are displayed.

    You can disable this function, by adding a flag (-flvflags no_duration_filesize), e.g.:

    ffmpeg -re -i SampleM.flv -acodec libmp3lame -ar 44100 -b:a 128k \
      -pix_fmt yuv420p -profile:v baseline -s 426x240 -bufsize 6000k \
      -vb 400k -maxrate 1500k -deinterlace -vcodec libx264           \
      -preset veryfast -g 30 -r 30 -f flv                            \
      -flvflags no_duration_filesize                                 \
      "rtmp://live-api.facebook.com:80/rtmp/my_key"
    
    0 讨论(0)
提交回复
热议问题