[MPlayer-dev-eng] [PATCH] Alternative RealAudio decoder

Arpi arpi at thot.banki.hu
Thu Jun 13 14:32:58 CEST 2002


Hi,

> > sorry, i did it sunday, thought you'll see it monday (you said you won't
> > start audio stuff before monday)
> > 
> 
> No problem. ;) The problem is that I am recently changing my 
> telephone/internet provider and don't have internet access all day.
> I think it's done in a few weeks (the ex-monopolist is quite slow in
> case of lending phone lines). :(

i really didn't want to duplicate your work :(
i've just found it easy to implement based on your docs, of course it turned
out at the end that it is not so easy (interleaving etc) but i didn't gave
it up then ;)

> >>frame rate. My exmple (still_still_still.ram) plays wqith 15 fps in 
> >>realplay, but with 12 fps in mplayer.
> > 
> > 
> > how did you fix that?
> > i spent last night with this issue, and found that first 3 bytes of
> > compressed video frame has I/P/B frame type flags and 12 bits of very
> > accurate timestamp, but i have to cleanup my implementation, it's messy as
> > hell
> > 
> 
> I have just seen the correct fps value in real player and searched for
> the value inside the stream. So I didn't look at the timestamps. But my 
> sample plays correctly, except of a slight a/v sync problem.

yes, i see it in your patch now
anyway it's more difficult imho, there is the lotr_trailer2.rm, it plays
well with 20fps, but actually it uses 30fps, but lots of skipped frames

anyway the trick i use is not perfect, when there are more B frames than the
encoder predicted (when encoded the next reference frame), the timestamp is
bad (behind the previous in time). in such cases i have to re-calc it, by
adding 1/fps to the previous valid timestamp

i've found what the numbers in transform_out[5] means:
[0] - number of decoded frames (zero for first P frame after I)
[1] - flags: keyframe, predicted frame (frame type I/P/B can be determined)
[2] - timestamp (it's calculated from that 12 bits in video data and the
packet timestamp you pass in transin1[])
[3] - w
[4] - h

so, realplayer probably gets the accurate timestamp (so fps is not used)
from the video decoder.

anyway rv30 is nice, it uses 2..6 B frames between P frames


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list