Date: Sun, 12 Jan 2003 14:38:40 +0100 From: Andre Albsmeier <andre.albsmeier@siemens.com> To: "Steve O'Hara-Smith" <steve@sohara.org> Cc: Andre Albsmeier <andre.albsmeier@siemens.com>, freebsd-multimedia@FreeBSD.ORG Subject: Re: AV sync on ffmpeg captures - was Re: FreeBSD 4.7R: no sound when recording with ffmpeg? Message-ID: <20030112143840.A90750@curry.mchp.siemens.de> In-Reply-To: <20030110190040.00bc5dda.steve@sohara.org>; from steve@sohara.org on Fri, Jan 10, 2003 at 07:00:40PM %2B0100 References: <Pine.BSF.4.21.0210292118440.11617-100000@brain.stagecraft.cx> <20021029194220.7fb532ad.steve@sohara.org> <20030106115851.A12349@curry.mchp.siemens.de> <20030106215821.60130d42.steve@sohara.org> <20030107085526.A14263@curry.mchp.siemens.de> <20030107191359.12abeb78.steve@sohara.org> <20030109144913.A30175@curry.mchp.siemens.de> <20030109192247.0602e203.steve@sohara.org> <20030110082231.A32663@curry.mchp.siemens.de> <20030110190040.00bc5dda.steve@sohara.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 10-Jan-2003 at 19:00:40 +0100, Steve O'Hara-Smith wrote: > On Fri, 10 Jan 2003 08:22:31 +0100 > Andre Albsmeier <andre.albsmeier@siemens.com> wrote: > > AA> On Thu, 09-Jan-2003 at 19:22:47 +0100, Steve O'Hara-Smith wrote: > AA> > On Thu, 9 Jan 2003 14:49:13 +0100 > AA> > Andre Albsmeier <andre.albsmeier@siemens.com> wrote: > > AA> > Yep - I've played a lot of VOBs and AVIs in mplayer without sync > AA> > problems too. Timestamping in streams is an amazingly complex thing > AA> > (ie. > AA> > AA> Well, let me ask you one question: What happens if you play a ffmpeg > AA> generated stream with mplayer? Is the problem reproducible? > > I haven't seen slippage since the last iteration of the grab code, > before that I did. I don't think you are the only one seeing it now > though. > > AA> This doesn't help a lot. The interesting thing is, when playing > AA> without the -fps option, mplayer tells me that the frame rate is > AA> 25.00: > > Good the header is at least partially valid :) > > AA> However, I have got the impression that the whole -fps stuff doesn't > AA> work a good as it should be. E.g., if you use -fps and let a file > AA> play normally until a certain position, the AV-offset is different as > AA> it is if you seek 20 seconds before the same point and let it play > AA> from there. > > Ugh! > > AA> Unfortunately, I can't help here. But in case you want me to do some > AA> tests I am happy to help... > > Thanks, I'll let you know if/when I get anywhere with it. Well, I think, I have interesting news on it. I think it is best if I tell you the whole story: I am collecting Laurel and Hardy movies :-). I have a specific movie in good quality but in english. Today the same movie appeared in TV in german language. Since the quality of the english version was a lot better, I decided to try to mix the german sound with the english movie. This is what I did: 1. Grab the german movie using ffmpeg -y -vcodec mpeg1video -me zero -intra -b 9600 -s 384x288 -ac 2 -ab 224 2. Load the resulting mpg into virtual dub. 3. Save the raw audio track to harddisk. 4. Load the english movie into virtual dub. 5. Selected the german audio track. 6. Wrote the resulting movie to disk. The result was interesting: The new movie had a growing audio offset as well. The first shot I tried was to use 25.045 as the new frame rate. No the audio was perfect in sync! Since the orignal english version was coming from the internet (not grabbed by myself), I assume that the audio part in ffmpeg generated movies has it's problems. I also played both movies simultaneously and they were playing nearly synchronously (picture-wise). Could it be that the audio sampling rate does not correspond to what ffmpeg is thinking? This could also explain why others don't see the de-sync effects if they use a different sound card. I have got the pcm0: <SB16 DSP 4.16> at io 0x220 irq 5 drq 1:5 bufsz 4096d (1p/1r/0v channels duplex) I will experiment a bit with the soundcard as soon as time permits. Just an idea, -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030112143840.A90750>