[FFmpeg-user] Audio stream missing

John Pitney john at pitney.org
Sun Jan 1 00:58:43 CET 2012


On Sat, Dec 31, 2011 at 5:49 AM, dE . <de.techno at gmail.com> wrote:
> [...]
> Seems like a bug to me. Did you try a different codec just to see where the
> problem lies?

I tried libmp3lame just now.  This time, there's an audio stream in
the output file, but it's totally silent, as shown by the 'mplayer -af
stats' run.  Maybe it's something about the audio track in the input
file, or the way it's muxed with the video and subtitle tracks.  I
tried another file, dvd_rip2.vob, from a different DVD,  as input, and
it seems to encode with audio OK.

Any other ideas?  Maybe helping ffmpeg out with the stream mapping?

--- begin paste ---
$ ffmpeg -i dvd_rip.vob \
>  -vcodec libx264 -preset fast -crf 22 -threads 8 \
>  -acodec libmp3lame -ac 2 -ab 128k -t 180 -y audiotest.mp4
ffmpeg version N-36295-gb6ffcee, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 30 2011 20:33:51 with gcc 4.6.1 20110908 (Red Hat 4.6.1-9)
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libx264 --enable-nonfree
  libavutil      51. 33.100 / 51. 33.100
  libavcodec     53. 49.100 / 53. 49.100
  libavformat    53. 29.100 / 53. 29.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 55.100 /  2. 55.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  5.100 /  0.  5.100
  libpostproc    51.  2.100 / 51.  2.100
[mpeg2video @ 0x18eac60] ac-tex damaged at 11 7
[mpeg2video @ 0x18eac60] Warning MVs not available
[mpeg2video @ 0x18eac60] concealing 1035 DC, 1035 AC, 1035 MV errors
[mpeg @ 0x18e47a0] max_analyze_duration 5000000 reached at 5024000

Seems stream 0 codec frame rate differs from container frame rate:
59.94 (60000/1001) -> 59.94 (60000/1001)
Input #0, mpeg, from 'dvd_rip.vob':
  Duration: 01:02:07.82, start: 0.280633, bitrate: 668 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480
[SAR 32:27 DAR 16:9], 9800 kb/s, 23.94 fps, 59.94 tbr, 90k tbn, 59.94
tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s
    Stream #0:2[0x81]: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
    Stream #0:3[0x82]: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
    Stream #0:4[0x83]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
[buffer @ 0x18ebe20] w:720 h:480 pixfmt:yuv420p tb:1/1000000 sar:32/27
sws_param:
[libx264 @ 0x19c4cc0] using SAR=32/27
[libx264 @ 0x19c4cc0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.2 AVX
[libx264 @ 0x19c4cc0] profile High, level 3.1
[libx264 @ 0x19c4cc0] 264 - core 120 r2120 0c7dab9 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2011 - 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=8 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
Output #0, mp4, to 'audiotest.mp4':
  Metadata:
    encoder         : Lavf53.29.100
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 720x480
[SAR 32:27 DAR 16:9], q=-1--1, 60k tbn, 59.94 tbc
    Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 48000 Hz, 2
channels, s16, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> libmp3lame)
Press [q] to stop, [?] for help
[mpeg2video @ 0x18eac60] ac-tex damaged at 11 7
[mpeg2video @ 0x18eac60] Warning MVs not available
[mpeg2video @ 0x18eac60] concealing 1035 DC, 1035 AC, 1035 MV errors
    Last message repeated 1 times
frame=10789 fps=320 q=30.0 Lsize=   25817kB time=00:00:00.02
bitrate=8812154.7kbits/s dup=6482 drop=0
video:25709kB audio:0kB global headers:0kB muxing overhead 0.417014%
[libx264 @ 0x19c4cc0] frame I:88    Avg QP:18.90  size: 26411
[libx264 @ 0x19c4cc0] frame P:6245  Avg QP:25.42  size:  3752
[libx264 @ 0x19c4cc0] frame B:4456  Avg QP:28.22  size:   128
[libx264 @ 0x19c4cc0] consecutive B-frames: 40.2% 10.6% 10.6% 38.5%
[libx264 @ 0x19c4cc0] mb I  I16..4: 25.4% 60.0% 14.7%
[libx264 @ 0x19c4cc0] mb P  I16..4:  0.4%  2.2%  0.4%  P16..4: 22.7%
8.2%  5.1%  0.0%  0.0%    skip:60.8%
[libx264 @ 0x19c4cc0] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8:  5.8%
0.2%  0.0%  direct: 0.5%  skip:93.2%  L0:59.5% L1:36.6% BI: 3.9%
[libx264 @ 0x19c4cc0] 8x8 transform intra:67.9% inter:72.5%
[libx264 @ 0x19c4cc0] coded y,uvDC,uvAC intra: 66.7% 58.8% 19.9%
inter: 9.3% 6.9% 0.2%
[libx264 @ 0x19c4cc0] i16 v,h,dc,p: 50% 20% 10% 21%
[libx264 @ 0x19c4cc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 12% 15%  6%
8% 10%  7%  9%  7%
[libx264 @ 0x19c4cc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 25% 13%  5%
8%  9%  6%  7%  4%
[libx264 @ 0x19c4cc0] i8c dc,h,v,p: 56% 17% 21%  5%
[libx264 @ 0x19c4cc0] Weighted P-Frames: Y:0.5% UV:0.0%
[libx264 @ 0x19c4cc0] ref P L0: 83.0% 17.0%
[libx264 @ 0x19c4cc0] ref B L0: 93.7%  6.3%
[libx264 @ 0x19c4cc0] ref B L1: 98.7%  1.3%
[libx264 @ 0x19c4cc0] kb/s:1170.05

$ ffprobe audiotest.mp4
ffprobe version N-36295-gb6ffcee, Copyright (c) 2007-2011 the FFmpeg developers
  built on Dec 30 2011 20:33:51 with gcc 4.6.1 20110908 (Red Hat 4.6.1-9)
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libx264 --enable-nonfree
  libavutil      51. 33.100 / 51. 33.100
  libavcodec     53. 49.100 / 53. 49.100
  libavformat    53. 29.100 / 53. 29.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 55.100 /  2. 55.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  5.100 /  0.  5.100
  libpostproc    51.  2.100 / 51.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'audiotest.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.29.100
  Duration: 00:02:59.99, start: 0.000000, bitrate: 1174 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
720x480 [SAR 32:27 DAR 16:9], 1170 kb/s, 59.94 fps, 59.94 tbr, 60k
tbn, 119.88 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, 2
channels, s16, 128 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    :

$ mplayer audiotest.mp4 -af stats
MPlayer SVN-r33996-4.6.0 (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing audiotest.mp4.
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (mp3), -aid 0, -alang und
VIDEO:  [H264]  720x480  24bpp  59.940 fps  1170.1 kbps (142.8 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 creation_time: 1970-01-01 00:00:00
 encoder: Lavf53.29.100
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 128.0 kbit/4.17% (ratio: 16000->384000)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...

Too many video packets in the buffer: (4096 in 11880229 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 720x480 => 854x480 Planar YV12
A:  -0.0 V: 179.9 A-V:-179.946 ct:-17.995   0/  0  5% 14%  0.0% 0 0

stats: n_samples: 2304
stats: mean_volume: -79 dB
stats: max_volume: -79 dB
stats: histogram_79db: 2304

Exiting... (End of file)

$ # ffmpeg encodes dvd_rip2.vob with audio OK
$ # The subtitle streams are picked up in this VOB file, but they
aren't in dvd_rip.vob.
$ # Playing dvd_rip.vob with mplayer shows subtitles, so it does have
subtitle streams somewhere.
$ ~/Downloads/ffmpeg/ffprobe dvd_rip2.vob
ffprobe version N-36295-gb6ffcee, Copyright (c) 2007-2011 the FFmpeg developers
  built on Dec 30 2011 20:33:51 with gcc 4.6.1 20110908 (Red Hat 4.6.1-9)
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libx264 --enable-nonfree
  libavutil      51. 33.100 / 51. 33.100
  libavcodec     53. 49.100 / 53. 49.100
  libavformat    53. 29.100 / 53. 29.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 55.100 /  2. 55.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  5.100 /  0.  5.100
  libpostproc    51.  2.100 / 51.  2.100
[mpeg2video @ 0x2171d80] ac-tex damaged at 1 7
[mpeg2video @ 0x2171d80] Warning MVs not available
[mpeg2video @ 0x2171d80] concealing 1035 DC, 1035 AC, 1035 MV errors
[mpeg @ 0x216b8e0] max_analyze_duration 5000000 reached at 5004678
Input #0, mpeg, from 'dvd_rip2.vob':
  Duration: 00:23:13.62, start: 0.280633, bitrate: 1013 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480
[SAR 32:27 DAR 16:9], 9801 kb/s, 24.18 fps, 59.94 tbr, 90k tbn, 59.94
tbc
    Stream #0:1[0x20]: Subtitle: dvd_subtitle
    Stream #0:2[0x21]: Subtitle: dvd_subtitle
    Stream #0:3[0x22]: Subtitle: dvd_subtitle
    Stream #0:4[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:5[0x81]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:6[0x82]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:7[0x83]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
--- end paste ---

Cheers,
John


More information about the ffmpeg-user mailing list