3
votes

When I'm converting an HD video, I get messages saying, "[h264 @ ]AVC: Consumed only n bytes instead of n+6"

Is there a way to fix the problem? Or is there an option to get rid of those messages?

~ $ ffmpeg -i original.mp4 -ar 22050 -qscale 7 -s 480x270 result.flv 
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-ffplay --disable-ipv6 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-demuxer=v4l --disable-demuxer=v4l2 --disable-demuxer=alsa --disable-demuxer=oss --disable-muxer=alsa --disable-muxer=oss --enable-pthreads --enable-libspeex --enable-libopenjpeg --disable-altivec --cpu=nocona --disable-vhook --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale --disable-stripping --enable-hardcoded-tables
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Sep  4 2009 12:52:09, gcc: 4.1.2 (Gentoo 4.1.2 p1.0.1)

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'original.mp4':
  Duration: 00:04:22.37, start: 0.000000, bitrate: 921 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 480x270, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16
Output #0, flv, to 'result.flv':
    Stream #0.0(eng): Video: flv, yuv420p, 480x270, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
    Stream #0.1(eng): Audio: libmp3lame, 22050 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[h264 @ 0x62b200]AVC: Consumed only 147 bytes instead of 153
[h264 @ 0x62b200]AVC: Consumed only 2117 bytes instead of 2123
[h264 @ 0x62b200]AVC: Consumed only 28 bytes instead of 34

Thank you.

1

1 Answers

2
votes

The problem is likely that there are six sentinel bytes appended to the end of a frame. These are totally harmless but inserted by some encoders as markers. Until the team actually fixes it, you'll need to patch & rebuild FFMPEG. The team semi-fixed it for cases when all the remaining bytes are zeros, however the error comes up frequently enough when specific encoders (in particular, Adobe's) act dumb.

Note that this could be a real error; you'll need to dump the last few bytes of the frames to make sure there's nothing in there you want.

Source: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-February/062507.html