Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Tags:

ffmpeg

I am using this command to convert an avi,mov,m4v video files to flv format via FFMPEG

/usr/local/bin/ffmpeg -i '/home/public_html/files/video_1355440448.m4v' -s '640x360' -sameq -ab '64k' -ar '44100' -f 'flv' -y /home/public_html/files/video_1355440448.flv

[flv @ 0x68b1a80] requested bitrate is too low
Output #0, flv, to '/home/files/1355472099-50cadce349290.flv':
    Stream #0.0: Video: flv, yuv420p, 640x360, q=2-31, pass 2, 200 kb/s, 90k tbn, 25 tbc
    Stream #0.1: Audio: adpcm_swf, 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
-------------------------------
RESULT
-------------------------------
Execute error. Output for file "/home/public_html/files/video_1355472099.avi" was found, but the file contained no data. Please check the available codecs compiled with FFmpeg can support this type of conversion. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().

But if I manually used this command then its working

/usr/local/bin/ffmpeg -i '/home/public_html/files/video_1355440448.m4v' -s '640x360' -sameq -ab '64k' -ar '44100' -f 'flv' -y /home/public_html/files/video_1355440448.flv
like image 488
Pradeep Singh Avatar asked Dec 14 '12 10:12

Pradeep Singh


4 Answers

  1. This is because you have two streams and output will be encoding then resizing, see your output messages:

    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    

    ... you use adpcm_swf audio and yuv420p video

    The answer is very simple, you need to put copy as your audio codec ...

    See my example with video mpeg4,yuv420p and audio ac3 ...

    ffmpeg -i input.mkv -vf scale=720:-1 -acodec copy -threads 12 output.mkv
    

    this will change first size = 720 with aspect ratio = -1 (unknown). Also you need to use:

    -acodec copy -threads 12
    

    If don't use this you will have one error. For example: When I used it, the output encoding messages show me this and it works well:

    [h624 @ 0x874e4a0] missing picture in access unit93 bitrate=1034.4kbits/s    
    Last message repeated 1163 times5974kB time=53.47 bitrate= 915.3kbits/s 
    
  2. You need to use for flv format file, something like this:

    ffmpeg -i input.mp4 -c:v libx264 -crf 19 output.flv
    
like image 120
Cătălin George Feștilă Avatar answered Sep 26 '22 09:09

Cătălin George Feștilă


You are given an error message

[flv @ 0x68b1a80] requested bitrate is too low

You need to change bitrate to a valid. It is better if you use a different codec

-acodec libmp3lame

And remove the option -sameq. This option does NOT mean 'same quality'. Actually means 'same quantizers'!

like image 29
pogorskiy Avatar answered Sep 23 '22 09:09

pogorskiy


I had a similar problem due to size constraints. The original image size was strange (width=1343), meaning that when I tried to specify a new size with -s, any rounding error caused problems. Make sure that the new image size can have the exact same aspect ratio!

like image 24
elena Avatar answered Sep 24 '22 09:09

elena


I have got the same issue

- requested bitrate is too low

and just resolved this issue by lowering down the bit rate

by adding -b:a 32k
like image 40
Ahmad Arslan Avatar answered Sep 23 '22 09:09

Ahmad Arslan