[FFmpeg-user] Audio delays in source Quicktime results in long audio

Bob Maple bobm-ffmpeg at burner.com
Thu Oct 25 05:05:02 CEST 2012


Been compressing a bunch of source files at home into ProRes testing the 
longer mux and that's been working great.

One thing I'm now noticing however is that I wind up with longer audio 
on the compressed result by a couple of frames.

Most of these are DSLR movies (h264 Quicktime, both long-GOP and all 
I-frame) but I've had this Animation Quicktimes rendered out of After 
Effects as well.

If I look at the source files with MediaInfo, I see on the audio track:

   Delay relative to video : 42ms

The source file shows a duration of 26s 818ms for both the audio and 
video track.  But after run through ffmpeg, the audio track shows as 26s 
966ms.. a bit more than just the 42ms of the delay, so not sure what is 
about either.  I presume (but don't know yet) that the resulting movie's 
audio is out of sync as well, but I need to create some better test 
files in order to tell for sure, all I've got right now are movies with 
a very reverby camera mic.

Is there an argument I'm missing or anything or is the Quicktime decoder 
just not aware of these tagged delays?

The test below is using the asetnsamples filter but it happens as well 
without.  I've also tried other codecs like mjpeg and it winds up 
equally long.

Commandline:

.\ffmpeg -i D:\F75C0005.MOV -codec:v prores -profile:v 2 -codec:a 
pcm_s16le -filter_complex asetnsamples=n=16384 ProRes_test_longmux3.mov

ffmpeg version N-45739-g04bf2e7 Copyright (c) 2000-2012 the FFmpeg 
developers
   built on Oct 20 2012 00:20:36 with gcc 4.7.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-pthreads 
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib 
--enable-frei0r --enable-libass --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libfreetype --enable-libgsm 
--enable-libmp3lame --enable-libnut --enable-libopenjpeg 
--enable-libopus --enable-librtmp --enable-libschroedinger 
--enable-libspeex --enable-libtheora --enable-libutvideo 
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis 
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid 
--enable-zlib
   libavutil      51. 76.100 / 51. 76.100
   libavcodec     54. 67.100 / 54. 67.100
   libavformat    54. 33.100 / 54. 33.100
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 19.103 /  3. 19.103
   libswscale      2.  1.101 /  2.  1.101
   libswresample   0. 16.100 /  0. 16.100
   libpostproc    52.  1.100 / 52.  1.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\F75C0005.MOV':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     creation_time   : 2012-03-27 22:06:22
   Duration: 00:00:26.81, start: 0.000000, bitrate: 28609 kb/s
     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p, 
1920x1080 [SAR 1:1 DAR 16:9], 27042 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 
48k tbc
     Metadata:
       creation_time   : 2012-03-27 22:06:22
       timecode        : 00:00:00:00
     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 
stereo, s16, 1536 kb/s
     Metadata:
       creation_time   : 2012-03-27 22:06:22
       timecode        : 00:00:00:00
     Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
     Metadata:
       creation_time   : 2012-03-27 22:06:22
       timecode        : 00:00:00:00

Output #0, mov, to 'ProRes_test_longmux3.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     encoder         : Lavf54.33.100
     Stream #0:0: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 
stereo, s16, 1536 kb/s
     Stream #0:1(eng): Video: prores (apcn) (apcn / 0x6E637061), 
yuv422p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 24k tbn, 
23.98 tbc
     Metadata:
       creation_time   : 2012-03-27 22:06:22
       timecode        : 00:00:00:00
Stream mapping:
   Stream #0:1 (pcm_s16le) -> asetnsamples (graph 0)
   asetnsamples (graph 0) -> Stream #0:0 (pcm_s16le)
   Stream #0:0 -> #0:1 (h264 -> prores)

frame=  643 fps= 35 q=0.0 Lsize=  449705kB time=00:00:26.96 
bitrate=136619.3kbits/s dup=2 drop=0
video:444642kB audio:5056kB subtitle:0 global headers:0kB muxing 
overhead 0.001619%


|  Bob Maple
|
|  When love is gone, there's always justice.  And when justice is gone,
|  there's always force.  And when force is gone, there's always Mom.
|  Hi, Mom!   -Laurie Anderson


More information about the ffmpeg-user mailing list