I am working on a project with 55 DV tapes, roughly half of which originated (I believe) with a Canon camera with the 48009 constant audio bit rate problem. (variously reported as 48005 to 48009 on the internet) What that means is if you view the DV file straight the A/V sync is fine. But if you split out the A/V streams, compress, and join them back together you end up with a slowly increasing A/V sync problem that starts to be noticable after 15 or 20 minutes. I'm having an incredibly difficult time trying to compress these broken files because most tools assume the audio is to spec and is 48000. And they won't let you override the spec 48000 with 48008. I've managed to split out the audio stream using ffmpeg to a wav file, then use ecasound -ei to alter the length of the file, but ecasound's -ei parameter doesn't hold enough precision for the very small (but absolutely critical) adjustment I need ( -ei 100.018141% ). I don't know how to resample between 4800x and 48000 because the audio file split out from the DV file claims it is 48000 already. I would GREATLY appreciate help. This is beating me to a pulp! For a reference see http://www.adamwilt.com/DV-FAQ-tech.html#LockedAudio "This was revealed at NAB '99 by Randy Ubillos, lead engineer on Final Cut Pro, who has found that while most DV cameras are pretty good, Canon cameras grab 48kHz sound at around 48.009 kHz, which can result in almost a second of video/audio slippage over the course of an hour (or around one frame every two minutes)." THANKS Heitzso
Hi On Tuesday 31 May 2005 16:08, Heitzso wrote:
I am working on a project with 55 DV tapes, roughly half of which originated (I believe) with a Canon camera with the 48009 constant audio bit rate problem. (variously reported as 48005 to 48009 on the internet)
What that means is if you view the DV file straight the A/V sync is fine. But if you split out the A/V streams, compress, and join them back together you end up with a slowly increasing A/V sync problem that starts to be noticable after 15 or 20 minutes.
I'm having an incredibly difficult time trying to compress these broken files because most tools assume the audio is to spec and is 48000. And they won't let you override the spec 48000 with 48008.
I've managed to split out the audio stream using ffmpeg to a wav file, then use ecasound -ei to alter the length of the file, but ecasound's -ei parameter doesn't hold enough precision for the very small (but absolutely critical) adjustment I need ( -ei 100.018141% ).
I don't know how to resample between 4800x and 48000 because the audio file split out from the DV file claims it is 48000 already.
I would GREATLY appreciate help. This is beating me to a pulp!
does '-async 50' help? [...] -- Michael
I am working on a project with 55 DV tapes, roughly half of which originated (I believe) with a Canon camera with the 48009 constant audio bit rate problem. (variously reported as 48005 to 48009 on the internet)
...
I'm having an incredibly difficult time trying to compress these broken files because most tools assume the audio is to spec and is 48000. And they won't let you override the spec 48000 with 48008.
...
does '-async 50' help? Not seeing this option either in "man ffmpeg" or in the online doc at the ffmpeg site. Is it an undocumented option? Thanks
One possibility to fix this problem may be to split out the audio as a raw audio stream w/o headers (necessary because the headers will inaccurately claim that the audio is 48000) and then resample the raw audio file. At one web site I ran across this ... "To extract the audio track from the source, type: ffmpeg -i <input_file> -vn <output_file> The command can be applied to both DV/DivX/XviD AVI and MPEG files." I've tried the above command against my gentoo ffmpeg version 0.4.9-pre1 and it does not work. ffmpeg -i Turman.dv -vn Turman.pcm ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard configuration: --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --disable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --enable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-ogg --enable-vorbis --disable-dts --disable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts built on Apr 26 2005 06:41:03, gcc: 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1) Input #0, dv, from 'Turman.dv': Duration: 00:34:21.6, start: 0.000000, bitrate: 28771 kb/s Stream #0.0: Video: dvvideo, 720x480, 29.97 fps, 25000 kb/s Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s Unable for find a suitable output format for 'Turman.pcm' In the above, the problem is arising because the 48000 audio stream is not really 48000, though it claims to be, but rather 4800x. But that is an aside. Right now I'm wondering how I can take the raw.dv file as input with ffmpeg and split out a nice raw.pcm file without the audio headers which I might be able to feed into a resampling program to push it from the 48008 (or whatever it is) over to the true 48000. I've tried a half dozen "-f" permutations along with some other option experiments and haven't managed to split out a clean raw.pcm file from the input raw.dv file. Could someone give me a clue re option combination? Thanks, Heitzso
On tir, 2005-05-31 at 13:25 -0400, Heitzso wrote:
Right now I'm wondering how I can take the raw.dv file as input with ffmpeg and split out a nice raw.pcm file without the audio headers which I might be able to feed into a resampling program to push it from the 48008 (or whatever it is) over to the true 48000.
Maybe you can use sox, that will allow you to override the sample rate in the headers. Example: ffmpeg -i Turman.dv -vn Turman.wav sox -r 48008 Turman.wav -r 48000 Turman_4800.wav Or for better quality, add "resample": sox -r 48008 Turman.wav -r 48000 Turman_4800.wav resample -- Kind regards, Niels Andersen
Hi, is see ffplay.c in ffmpeg, and it use packet queue functions, why use packet queue and not directly display picture/sound when we decode a frame ? Regards, Brice. -- Brice Rouanet I.N.S.A. Centre de Ressources Informatiques Complexe Scientifique 135 Avenue de Rangueil 31077 Toulouse Cedex4 (France) tel 0561559374
On Tue, 2005-05-31 at 18:36 +0200, Michael Niedermayer wrote:
does '-async 50' help?
Now can you please please please tell us what this options does and what's the meaning of the parameter?
Hi On Wednesday 01 June 2005 12:50, Erik Slagter wrote:
On Tue, 2005-05-31 at 18:36 +0200, Michael Niedermayer wrote:
does '-async 50' help?
Now can you please please please tell us what this options does and what's the meaning of the parameter?
it "stretches/sqeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed [...] -- Michael
On Sun, 2005-07-10 at 12:43 +0200, Michael Niedermayer wrote:
does '-async 50' help?
Now can you please please please tell us what this options does and what's the meaning of the parameter?
it "stretches/sqeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed
Interesting. Does it do that by resampling the audio? Also interesting that -async 1 can make the difference between having and not having a/v sync. And what does vsync do, then?
Hi On Sunday 10 July 2005 15:21, Erik Slagter wrote:
On Sun, 2005-07-10 at 12:43 +0200, Michael Niedermayer wrote:
does '-async 50' help?
Now can you please please please tell us what this options does and what's the meaning of the parameter?
it "stretches/sqeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed
Interesting. Does it do that by resampling the audio?
yes
Also interesting that -async 1 can make the difference between having and not having a/v sync.
async 1 is a special case where only the start of the audio stream is corrected without any later correction
And what does vsync do, then?
vsync is similar, if its not 0 then video will be stretched/sqeezed to match the timestamps, allthough its done by duplicating and droping frames and with -map you can select from which stream the timestamps should be taken so you can leave either video or audio unchanged and sync the remaining stream(s) to the unchanged one if you want -- Michael
participants (6)
-
brouanet@insa-toulouse.fr -
erik@slagter.name -
heitzso@bellsouth.net -
heitzso@growthmodels.com -
michaelni@gmx.at -
niels@myplace.dk