[MPlayer-dev-eng] Re: mpeg muxer & dvd pack scr

Tobias Diedrich ranma at tdiedrich.de
Sat Jul 16 10:02:52 CEST 2005


Nico Sabbi wrote:

> the SCR issue is much more complicate than this: at the moment it's 
> determined
> in terms of the dts; if you set it wrong it may (and very likely will) 
> be in advance
> of the PTS or it may be far from it.
> Overall it's the most difficult term to manage in mpeg.

Well, iso138181 says "Program Clock Reference; PCS [system]: A time
stamp in the Transport Stream from which decoder timing is derived".
And "PCR(i) is the time encoded in the PCR field measured in units
of the period of the 27 MHz system clock where i is the byte index
of the final byte of the program_clock_reference_base field".
Also "The value of the system clock frequency is measured in Hz and
shall meet the following constraints: 27 000 000 - 810 <=
system_clock_frequency <= 27 000 000 + 810, rate of change of
system_clock_frequency with time 75*10^-3 Hz/s, Note - Sources of
coded data should follow a tighter tolerance in order to facilitate
compliant operation of consumer recorders and playback equipment"

So AFAICS the PCR does not have to be synced with PTS or DTS,
instead it is synced with the rate that the data is supposed to be
read from disc.
And the mplex source says "Did they *really* need to put a 27Mhz
clock source into the system stream.  Does anyone really need it for
their decoders?  Get real... I guess they thought it might allow
someone somewhere to save on a proper clock circuit."

> I don't have time to test your code right now (did you?), I'll do it 
> when I'm back.

I did test it (but only the format=dvd case) and it produced nearly
identical SCR as mplex and dvdauthor:

pack  scr_base   scr_ext   scr
0     0          0         0
1     146        85        43885
2     292        171       87771
3     438        256 (257) 131656 (131657)
4     585        42        175542
5     731        128       219428
6     877        214       263314
7     1024       0         307200

The values in brackets is where mplex uses a different value (due to
rounding I guess).

And this is from two dvds:
pack  scr
0     0
1     43885 (43886)
2     87771 (87772)
3     131657 (131658)
4     175542 (175544)
5     219428 (219430)
6     263314 (263316)
7     307199 (307202)

-- 
Tobias						PGP: http://9ac7e0bc.uguu.de




More information about the MPlayer-dev-eng mailing list