[MPlayer-dev-eng] How do I synchronize audio and video stream correctly after a seek in .rm
rgselk
rgselknospam at yahoo.com
Wed Nov 19 13:01:56 CET 2003
[snip]
rgselk wrote:
> > The next problem is synchronizing the audio and video stream
> correctly.
> > The audio and video keyframes are not there at the same time. Not
> even
> > close. It happens a lot of time that they are about 2 seconds apart
> > from each other.
> > After the seek the resulting 'A-V' figure is 'a bit' off. This is
> > corrected very quickly if I use '-mc 10 -autosync 1' but I would
> like a
> > better solution.
--- Arpi <arpi at thot.banki.hu> wrote:
> No, in G1 it's the only way now, unless you change the a-v sync core
> :(
>
> > Is it possible that
> > 1. after a seek one stream waits for the other to catch up
> > 2. decoded audio is skipped until it matches the timestamp of video
> > 3. silence is inserted in audio until video catches up.
> > 4. or something else?
>
> probably the best would be moving the audio block reordering from
> ad_read to
I guess you mean libmpdemux/ad_realaud.c? ad_read is nowhere in my
tree.
> demux_real, so you could seek audio stream more accurate.
> currently you seek to big block boundary, which blcok is constructed
> from
> reordered small (few 100 bytes) sub-blocks.
On a block basis should be fine already as a first try. At this moment
I get 2 seconds offset between the two streams. If that can be reduced
to less than half a second I am much happier.
It is also very easy for me to guarantee that the audio stream is older
than the video. What I need is to decode audio to /dev/null until I am
at the same position as the video.
I did have a look at other demuxers as well before asking here, but up
to now I could not find something I could use :-(
I will look at ad_realaud.c
> it should be done anyway, as libavcodec's real decoders expect
> reordered
> blocks.
>
> btw, we have demux_realaudio and demux_real, so we should first merge
> them
> to avoid code duplication (block reorders for various formats)
>
>
> A'rpi / Astral & ESP-team
Thanks,
rgselk.
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
More information about the MPlayer-dev-eng
mailing list