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

前端 未结 4 1755
旧巷少年郎
旧巷少年郎 2021-02-05 13:09

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\'          


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 13:53

    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
      

提交回复
热议问题