Opened 13 years ago

Last modified 12 years ago

#948 open defect

No audio in output when the audio starts late in VOB file

Reported by: streamingguy Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mpegps
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Here are the details about the issue:

Source: .VOB file extracted from DVD decrypter (first chapter of the movie). This has one video stream, one audio stream (AC3 5.1).

Issue: When I try to encode into any format, it reports 0 channels in ac3 stream and there is no audio track in the output. I tried with directly copying the AC3 stream, encoding AC3 to AAC, using analyzeduration option etc.,

But, the same file is working fine when I use Handbrake, MEncoder.

Source to download: You can download .VOB file here: http://poacric.blob.core.windows.net/$root/TestClip.zip

Command Used: ffmpeg -i d:\testclip.vob -acodec copy d:\ffmpegout.mp4

Console output:

C:\ffmpeg>ffmpeg -i d:\testclip.vob -acode
c copy d:\ffmpegout.mp4
ffmpeg version N-35966-g1d0ae92, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 19 2011 13:10:19 with gcc 4.6.2
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3
 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzli
b --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-l
ibrtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-li
bvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-l
ibx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 46. 1 / 53. 46. 1
  libavformat  53. 27. 0 / 53. 27. 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
[mpeg @ 0000000000497FD0] max_analyze_duration 5000000 reached at 5004667

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/
1001) -> 59.94 (60000/1001)
Input #0, mpeg, from 'd:\testclip.vob':
  Duration: 00:04:51.99, start: 0.316978, bitrate: 4939 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DA
R 16:9], 8000 kb/s, 23.98 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 0 channels
[buffer @ 00000000029E0BE0] w:720 h:480 pixfmt:yuv420p tb:1/1000000 sar:32/27 sw
s_param:
[libx264 @ 00000000027E0810] using SAR=32/27
[libx264 @ 00000000027E0810] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShu
ffle SSE4.2
[libx264 @ 00000000027E0810] profile High, level 3.1
[libx264 @ 00000000027E0810] 264 - core 119 r2106 07efeb4 - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 r
ef=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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_pski
p=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 di
rect=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra
_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69
qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'd:\ffmpegout.mp4':
  Metadata:
    encoder         : Lavf53.27.0
    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 mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Press [q] to stop, [?] for help
[mpeg2video @ 00000000004AB7C0] warning: first frame is no keyframe
    Last message repeated 1 times
frame=  117 fps=  0 q=31.0 size=     273kB time=00:00:00.98 bitrate=2273.2kbits/
frame=  205 fps=201 q=31.0 size=     602kB time=00:00:02.45 bitrate=2011.7kbits/
frame=  282 fps=183 q=31.0 size=     861kB time=00:00:03.73 bitrate=1887.4kbits/
frame=  367 fps=178 q=31.0 size=    1179kB time=00:00:05.15 bitrate=1874.1kbits/
frame=  466 fps=182 q=31.0 size=    1376kB time=00:00:06.80 bitrate=1655.8kbits/
frame=  475 fps=175 q=-1.0 Lsize=    1401kB time=00:00:07.89 bitrate=1454.6kbits
/s dup=273 drop=0
video:1396kB audio:0kB global headers:0kB muxing overhead 0.367020%
[libx264 @ 00000000027E0810] frame I:3     Avg QP:23.66  size: 48841
[libx264 @ 00000000027E0810] frame P:309   Avg QP:26.15  size:  4086
[libx264 @ 00000000027E0810] frame B:163   Avg QP:30.33  size:   122
[libx264 @ 00000000027E0810] consecutive B-frames: 49.5%  7.2% 21.5% 21.9%
[libx264 @ 00000000027E0810] mb I  I16..4: 25.5% 46.0% 28.5%
[libx264 @ 00000000027E0810] mb P  I16..4:  1.0%  0.6%  0.0%  P16..4: 22.2%  4.5
%  4.5%  0.0%  0.0%    skip:67.1%
[libx264 @ 00000000027E0810] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 11.1%  0.0
%  0.0%  direct: 0.0%  skip:88.9%  L0:57.4% L1:39.9% BI: 2.6%
[libx264 @ 00000000027E0810] 8x8 transform intra:40.0% inter:74.5%
[libx264 @ 00000000027E0810] coded y,uvDC,uvAC intra: 44.1% 49.2% 24.7% inter: 1
1.6% 4.2% 1.0%
[libx264 @ 00000000027E0810] i16 v,h,dc,p: 39% 42%  6% 13%
[libx264 @ 00000000027E0810] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 32% 37%  3%  2%
 2%  4%  3%  7%
[libx264 @ 00000000027E0810] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6% 64% 14%  2%  2%
 2%  3%  2%  5%
[libx264 @ 00000000027E0810] i8c dc,h,v,p: 40% 48% 10%  2%
[libx264 @ 00000000027E0810] Weighted P-Frames: Y:0.3% UV:0.3%
[libx264 @ 00000000027E0810] ref P L0: 67.2% 13.1% 10.0%  9.8%
[libx264 @ 00000000027E0810] ref B L0: 98.4%  1.3%  0.3%
[libx264 @ 00000000027E0810] ref B L1: 96.1%  3.9%
[libx264 @ 00000000027E0810] kb/s:1442.51
Received signal 2: terminating.

Please let me know, if you need any more information.

I have been searching for a proper encoder from past 2 months and couldn't find a working solution.

My requirement: I have several DVDs and want to convert them into MP4/M2TS/TS files with 2 audio streams (AC3 5.1 and AAC). Also, want to add watermark on the output. Tried different encoders, but nothing is working as per my requirement.

Thank you for your time!

Change History (6)

comment:1 by Carl Eugen Hoyos, 13 years ago

Component: FFmpegavformat
Keywords: mpegps added; no audo vob removed
Priority: importantnormal
Reproduced by developer: set
Status: newopen
Version: 0.9.1git-master

Please always provide current git head output on this bug tracker and I believe I suggested another, significantly better command line.

Do you think this is a regression?

comment:2 by ski, 12 years ago

I'm having the same problem with late audio. When I try to convert next VOB file from the same DVD there is no problem with audio.

$ ffmpeg -i VTS_11_1.VOB test.mp4 
ffmpeg version git-2012-07-31-52bd9cb Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul 31 2012 15:00:10 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/test/20120731 --disable-doc --disable-network --disable-ffserver --enable-gpl --enable-version3 --enable-shared --enable-debug --disable-stripping --enable-pthreads --enable-runtime-cpudetect --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libvpx
  libavutil      51. 66.100 / 51. 66.100
  libavcodec     54. 46.100 / 54. 46.100
  libavformat    54. 22.100 / 54. 22.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.101 /  3.  5.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mpeg @ 0x170c240] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from 'VTS_11_1.VOB':
  Duration: 00:18:32.25, start: 0.287267, bitrate: 7722 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 0 channels
    Stream #0:2[0x81]: Audio: ac3, 0 channels
    Stream #0:3[0x82]: Audio: ac3, 0 channels
    Stream #0:4[0x83]: Audio: ac3, 0 channels

Head:

commit 52bd9cb4d29bc086f45f239c56a6a3c63406a073
Author: Stefano Sabatini <stefasab@xxxxxxxxx>
Date:   Mon Jul 30 19:46:36 2012 +0200
Last edited 12 years ago by ski (previous) (diff)

in reply to:  2 comment:3 by Cigaes, 12 years ago

Replying to ski:

[mpeg @ 0x170c240] max_analyze_duration 5000000 reached at 5000000

Try to raise analyzeduration to something much higher; do not forget to raise probesize too if it becomes the limitating factor. You may want to read this:
http://www.ffmpeg.org/faq.html#Why-does-FFmpeg-not-see-the-subtitles-in-my-VOB-file_003f
Although this is about subtitles, I suspect this is a similar issue.

comment:4 by Michael Niedermayer, 12 years ago

The url to download the VOB file seems not working (anymore?)

comment:5 by streamingguy, 12 years ago

Hello Michael,

I have uploaded the same file to: http://poacric.blob.core.windows.net/ffmpeg/TestClip.zip

Let me know, if you need any other details.

Thanks

comment:6 by Carl Eugen Hoyos, 12 years ago

The sample was already provided in ticket #386, now moved to samples/ffmpeg-bugs/trac/ticket948/

$ ffmpeg -probesize 9M -analyzeduration 21M -i tickets/ticket386/TestClip.VOB
ffmpeg version N-43846-g168ddcd Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 23 2012 23:35:40 with gcc 4.5.3 (GCC)
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 54.100 / 54. 54.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 13.100 /  3. 13.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
[mpeg @ 0x147f420] max_analyze_duration 21000000 reached at 21003678
Input #0, mpeg, from 'tickets/ticket386/TestClip.VOB':
  Duration: 00:04:52.34, start: 0.316978, bitrate: 4933 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 8000 kb/s, 27.25 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s
At least one output file must be specified
Note: See TracTickets for help on using tickets.