ffmpeg 每帧请求的位数太多 [英] ffmpeg Too many bits per frame requested

查看:34
本文介绍了ffmpeg 每帧请求的位数太多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ffmpeg 将视频转换为 mp4 格式.除了 MOV 格式外,一切正常.

I am using ffmpeg to convert videos to mp4 format. Everything works fine except with MOV format.

我用于一切的命令是:

ffmpeg -i input.mov -strict Experimental -sameq -s vga -aspect 1.7777 -vcodec libx264 -preset fast -crf 22 -y output.mp4

但我不断得到的输出是:

but the output I keep getting is:

ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 12 2012 11:01:05 with gcc 4.4.5
configuration: --enable-libx264 --enable-gpl --disable-yasm
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x21767a0] Referenced QT chapter track not found

Seems stream 0 codec frame rate differs from container frame rate: 30.00 (30/1) -> 30.07 (2225/74)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
  Metadata:
    creation_time   : 2009-04-04 07:12:29
    comment         : EASTMAN KODAK COMPANY  KODAK Z1275 ZOOM DIGITAL CAMERA
    comment-eng     : EASTMAN KODAK COMPANY  KODAK Z1275 ZOOM DIGITAL CAMERA
  Duration: 00:00:17.76, start: 0.000000, bitrate: 8100 kb/s
    Stream #0:0(eng): Video: mpeg4 (Advanced Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 7968 kb/s, 30.07 fps, 30.07 tbr, 8544k tbn, 30 tbc
    Metadata:
      creation_time   : 2009-04-04 07:12:29
      handler_name    : 
    Stream #0:1(eng): Audio: pcm_mulaw (ulaw / 0x77616C75), 16000 Hz, 1 channels, s16, 128 kb/s
    Metadata:
      creation_time   : 2009-04-04 07:12:29
      handler_name    : 
[buffer @ 0x2187f00] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[scale @ 0x219c120] w:1280 h:720 fmt:yuv420p -> w:640 h:480 fmt:yuv420p flags:0x4
[libx264 @ 0x2190d20] using SAR=4/3
[libx264 @ 0x2190d20] using cpu capabilities: none!
[libx264 @ 0x2190d20] profile High, level 3.0
[libx264 @ 0x2190d20] 264 - core 120 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[aac @ 0x21917e0] Too many bits per frame requested
Output #0, mp4, to 'output.mp4':
  Metadata:
    creation_time   : 2009-04-04 07:12:29
    comment         : EASTMAN KODAK COMPANY  KODAK Z1275 ZOOM DIGITAL CAMERA
    comment-eng     : EASTMAN KODAK COMPANY  KODAK Z1275 ZOOM DIGITAL CAMERA
    Stream #0:0(eng): Video: h264, yuv420p, 640x480 [SAR 4:3 DAR 16:9], q=-1--1, 90k tbn, 30.07 tbc
    Metadata:
      creation_time   : 2009-04-04 07:12:29
      handler_name    : 
    Stream #0:1(eng): Audio: aac, 16000 Hz, 1 channels, s16, 128 kb/s
    Metadata:
      creation_time   : 2009-04-04 07:12:29
      handler_name    : 
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> libx264)
  Stream #0:1 -> #0:1 (pcm_mulaw -> aac)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

问题似乎出在每帧音频的位上.哪个可能是正确的解决方案?

It seems the problem is with audio's bit per frame. Which might be the right solution?

推荐答案

Too many bits per frame requests"错误来自本机 FFmpeg AAC 编码器 (-c:aaac).您可以使用以下一种或多种解决方案:

The "Too many bits per frame requested" error is coming from the native FFmpeg AAC encoder (-c:a aac). You can use one or more of the following solutions:

开发非常活跃,原生 FFmpeg AAC 编码器有很多改进;它现在会自动限制到每帧的最大位数,而不是因为这个错误而失败.请参阅 FFmpeg 下载 页面以获取指向已编译二进制文件的链接,这是获取最新 ffmpeg.

Development is very active and the native FFmpeg AAC encoder has seen many improvements; it will now automatically clamp to the max number of bits per frame instead of failing with this error. See the FFmpeg Download page for links to already compiled binaries which are the easiest method to get a recent ffmpeg.

  • 增加音频采样率,例如添加-ar 44100.

降低比特率.默认值可能是 -b:a 128k.尝试使用较低的值,直到它起作用为止.

Decrease your bitrate. Default is probably -b:a 128k. Try lower values until it works.

使用 -c:a copy流式复制(重新复用)音频,并且由于 MP4 不支持 pcm_mulaw,请使用不同的输出容器格式,例如 Matroska (.mkv).

Use -c:a copy to stream copy (re-mux) the audio, and, because MP4 doesn't support pcm_mulaw, use different output container format such as Matroska (.mkv).

如果您的 ffmpeg 支持,请使用不同的 AAC 编码器,例如 libfdk_aac.

Use a different AAC encoder such as libfdk_aac if your ffmpeg supports it.

如果您升级 ffmpeg,则不需要执行任何这些选项.

You don't need to do any of these options if you upgrade ffmpeg.

这篇关于ffmpeg 每帧请求的位数太多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆