View Full Version : ts timing
Dave1024
15th March 2012, 19:34
Hi,
Is it possible to encode VBI lines with VITC or ATC to MPEG-2 TS container?
How can i detect those lines in a TS container ?
Thanks
Dave
Guest
15th March 2012, 20:40
What exactly are you trying to accomplish?
Obviously VBI is an analog thing while transport streams carry digital compressed data.
You could capture the VBI data and then send it as user data in the video stream.
Dave1024
17th March 2012, 08:32
Hi,
I try to address the output video frame using a time value.
will it possible to do with clock reference time present in transport stream ?
Thanks
Dave
Guest
17th March 2012, 13:58
Can't you just use the frame rate to calculate the mapping from time to frame number?
Dave1024
18th March 2012, 10:46
Hi,
I agree, but already Program clock reference is in the container, then why I wait till the frame rate decoding is over ?
Thanks
Dave
Guest
18th March 2012, 14:14
If you want to use transport stream timestamps, then PTS would be the correct one to use, rather than PCR. You'll run into at least two problems trying to make this work: 1) Streams very often have discontinuities in the timestamps, and 2) you'll need to account for frame re-ordering (decode versus display order).
You can do a very fast initial parse of the stream to get the frame rate.
Dave1024
21st March 2012, 19:33
Hi,
I checked the PCR and PTS data part. For PCR I got only program_clock_reference_base and program_clock_reference_extension. In pts a 33 bit absolute value. How can I derive a relation between these two measures for addressing each frame with a time value ?
Thanks
Dave
Guest
21st March 2012, 22:08
Call the first PCR in the stream PCR0. Then a given PTS can be turned into a time offset in the stream by subtracting PCR0.
But I'm telling you, this is not a reliable approach. For example, the PCR can roll over back to 0 in the middle of the stream, and there are other cases of discontinuities. Also, it is not required for every frame to have its own PTS.
Just use the frame rate to convert from a time value to a frame number. Why are you trying to make this so complicated?
pandy
22nd March 2012, 12:09
Neuron have right, PCR is used to recover synchronization between Headend and local crystal oscillator in receiver - for random (ie file) it is not important (usually PCR can't be used to adjust local clock but it is not needed anyway)
Dave1024
26th March 2012, 18:17
Hi,
Thanks to replay's.
I had some more doubts.
I successfully decoded PES packets obviously PTS and DTS. But here I need to know
a) how I delimit a video frame I.e the decoded PTS is part of which frame ?
b) As per specification PTS( k) = ((system clock frequency x tpn ( k)) DIV 300) % 2^33, the decoded PTS value can placed for tpn ( k) and clock frequency is 90 Hz, this assumption is correct ?
c) what is the indicator for a new frame in PES packets.
:thanks:
Dave
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.