0

I am currently using FFMPEG to stream on a virtual CENTOS server. I use the following script to stream to youtube live.

ffmpeg -re -i program.01.mp4 -flags +global_header -acodec libmp3lame -ac 1 -ar 44100 -ab 192k -s 1280x720 -vcodec libx264 -pix_fmt yuv420p -g 60 -vb 1700k -profile:v baseline -preset:v faster -r 30 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxxx"

I previously used the very same FFMPEG stream script to stream on a dedicated CENTOS server for over a year, with no technial issues.

I tried to use the very same FFMPEG script on the virtualized server. When I use 1700k encoding speed - I get the following error in the output:

[flv @ 0x56da380] Failed to update header with correct duration.
[flv @ 0x56da380] Failed to update header with correct filesize.

The YouTube ingestor also complains that the input stream (coming from the CENTOS server) is slow and that the stream will buffer.

I have checked the available output bandwidth that virtual CENTOS server has access to.

  • Download: 57.12 Mbit/s
  • Upload: 96.57 Mbit/s

I am forced to use a much lower video encoding speed and output size

ffmpeg -re -i program.01.mp4 -f-flags +global_header -acodec libmp3lame -ac 1 -ar 44100 -ab 128k -s 640x360 -vcodec libx264 -pix_fmt yuv420p -g 60 -vb 425k -profile:v baseline -preset:v faster -r 30 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxxx"

I’m at a loss to understand what the problem could be since I have access to more than enough required bandwidth.

6
  • What's ffmpeg output fps speed?
    – Gyan
    Oct 12, 2017 at 11:32
  • "-r 30" as listed in the above ffmpeg script " Oct 14, 2017 at 6:01
  • Processing speed, not output file framerate.
    – Gyan
    Oct 14, 2017 at 6:02
  • I do not know. How do you set fps - if its not set by -r 30? Oct 14, 2017 at 18:15
  • @DavidChilders he's talking about the real-time, live encoding speed of FFmpeg. Does it keep up with the framerate you're asking for ?
    – Ely
    Oct 16, 2017 at 21:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.