[MPlayer-dev-eng] Re: mpeg muxer & dvd pack scr
Tobias Diedrich
ranma at tdiedrich.de
Tue Jul 19 05:58:23 CEST 2005
Nico Sabbi wrote:
> Tobias Diedrich wrote:
> >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,
> >
> >
>
> the pcr/scr must follow one very important constraint:
> SCR + 0.7 seconds <= [PD]TS
Do you have a pointer to that statement?
AFAICS it is only required, that SCR_N + 0.7 <= SCR_N+1 (0.1 for
transport streams) and PTS_N + 0.7 <= PTS_N+1 .
However, I found that the data is supposed to be delivered at the
mux_rate, but it may be bursty, i.e. you get a data burst for
picture n and then there is no data transmitted for a short time
until you get the next data burst for picture n+1.
This should be reflected in the scr fields and actually that
behaviour is present in my samples, however I didn't see it before,
since I only looked at the first 8 packs...
> You see much higher scr_increments in mencoder's output because
> the real muxrate is much lower than 10.8 Mb/s: at all effects the
> real instant muxrate is used to calculate the SCR increment (in
> terms of the bitrates of the duration of a/v data you are writing;
> video is grouped in gops). When I was in the early stages of
> development I used the nominal_muxrate, but I experienced a lot of
> problems.
AFAICS now the scr should only jump between different audio/video frames,
within one frame (especially video, since probably audio frames
normally fit into one pack) the scr should increase at the nominal
muxrate.
--
Tobias PGP: http://9ac7e0bc.uguu.de
More information about the MPlayer-dev-eng
mailing list