[MPlayer-dev-eng] mpeg muxer & dvd pack scr
Nico Sabbi
nsabbi at tiscali.it
Sat Jul 16 08:26:11 CEST 2005
Tobias Diedrich wrote:
>Hi Nico,
>
>I'm currently comparing the output from mplex and mencoder -of mpeg
>and found that mencoder seems to put wrong scr timestamps into the
>pack headers.
>
>Looking at stream generated by mplex it looks like this:
>
>pack scr_base scr_ext scr △scr
>0 0 0 0
> 43885
>1 146 85 43885
> 43886
>2 292 171 87771
> 43886
>3 438 257 131657
>
>
>This looks alright, since the pack size is 2048Byte, muxrate is
>10080kbit and reference clock is 27MHz, so reading the sector
>should take 2048/(10080*1000/8)*27000000 = 43885.7136 cycles.
>
>However mencoder generates the following:
>
>pack scr_base scr_ext scr △scr
>0 0 0 0
> 0
>1 0 0 0
> 252300
>2 841 0 252300
> 253200
>3 1685 0 505500
> 253800
>4 2531 0 759300
>
>Looking at the code, it seems that the muxer uses the same reference
>clock for both audio/video and the pack headers, which is wrong
>AFAICT (and explains why the first two packs have the same scr).
>
>
the scr doesn't change in the first two packs because it's the same for
the first NAVI pack
and the first video pack (and for every other navi pack preceding a
video pack).
The method for calculating the SCR is flawed, and surely needs fixing,
but it's not at all easy.
Also, the interleaving should be performed in such a way as to not
overflow/underflow the demux_stream
buffers.
Any advise is welcome :)
>It also does not write the scr extension even though it has an extra
>function for writing mpeg2 scr.
>
>Note that dvdauthor recalculates this anyway, so this is not
>terribly important, but still...
>
>
>
More information about the MPlayer-dev-eng
mailing list