[openbeos] Re: Solution to MediaKit sync issue resolved
- From: "David McPaul" <dmcpaul@xxxxxxxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Tue, 29 Jun 2004 17:45:58 +1000 EST
Zenja,
Have you tested this with an AVI containing a Variable Bit Rate
MP3?
I can see how the problem discussed below can cause the problem
which suggests that some/all? of the media decoders are using 1024 as
the time divider in places or do you think it is at the media player
code?
I think most problems people have with AVI (where the problem is
often reported) is because the MP3 audio they use is VBR and so it can
be difficult to seek correctly. Simply because 10 frames of VBR audio
will vary depending on where you are in the track.
The other issue is simply that the recorded audio simply cannot be
syncronised with the video as the frame rate of each track is too
different.
For the record the 3ivx decoder uses 1000 as a base when seeking by
time.
Cheers
David
> Hi everyone. I dont know if this has been reported before, if not I
> apologise for hogging bandwidth, but its a discovery I made last
> night so I
> think I ought to share it with those of you who dont know. Anyone
> who has
> used BeOS's media kit (even for watching videos) must have observed
> the
> sound sync issue (or lack of it) when dealing with encoded audio.
> I've been
> working on a MediaPlayer clone (for now, grander plans later) and
> decided to
> roll up my sleves and figure out what was the issue with audio sync.
>
> The issue seems to be with bitrate calculations, specifically, moving
> from
> BINARY kilo bits per second (where a kilo is 1024) to DECIMAL kilo
> bits per
> second (where a kilo is the SI quantity of 1000). When you pass the
> real
> time to either seek or play decoders, it will perform its
> calculations on
> BINARY kilo, when in fact it should have done the operation in
> DECIMAL kilo,
> since time itself is decimal (bigtime_t). When you manually adjust
> the seek
> and play times with this offset, you finally get proper audio sync.
>
> Eg. For 128Kbps audio codec (MP3), you need to adjust your seek/play
> time
> with 128000/(128*1024)
>
> Anyway, my video player using native BeOS codecs is finally 100% in
> sync,
> and I'll gladly donate it to OBOS when its done. In my software
> philosophy,
> software ain't done until it fulfills the following 3 requirements:
>
> - Functional (it's useless if it doesn't do what it needs to do)
> - Fast (which also means responsive)
> - Fun (how intuitive is it, does it frustrate the user, does is save
> settings and remember window positions and directories, stuff like
> that)
>
> I've got the functional and fast bits sorted out, now the difference
> between
> a good app and a great app is how much fun it is to use. So I'll be
> spending my time on the fun requirement for now.
>
> /me crawls back under rock
--
"You've got to think about tomorrow!"
"TOMORROW! I haven't even prepared for *_________yesterday* yet!"
- References:
- [openbeos] Solution to MediaKit sync issue resolved
- From: Solaja, Zenja
Other related posts:
- » [openbeos] Solution to MediaKit sync issue resolved
- » [openbeos] Re: Solution to MediaKit sync issue resolved
- » [openbeos] Re: Solution to MediaKit sync issue resolved
- » [openbeos] Re: Solution to MediaKit sync issue resolved
- » [openbeos] Re: Solution to MediaKit sync issue resolved
- [openbeos] Solution to MediaKit sync issue resolved
- From: Solaja, Zenja