[vlc-devel] VLC ignores PTS in PES streams ?!

Laurent Aimar fenrir at via.ecp.fr
Wed Jan 14 23:05:01 CET 2009


On Wed, Jan 14, 2009, Matthias Bauer wrote:
> I'm sure VLC does not ignore PTS/DTS values because I have a problem  
> with this when I'm streaming a recorded PES stream to VLC and then  
> fastforward, reverse or slowmotion the stream on the streaming server.
> 
> BTW: Do you have an idea how I could manipulate the stream while  
> fastforward, reverse or slowmotion of the stream? I tried to
> (1) remove PTS/DTS from stream, or
> (2) set all bits of PTS/DTS to 1 or even
> (3) adding trickmode info into the stream,

If you are recreating a PS stream so that it plays at X speed on a VLC
client (that you do not control) when streamed by your server you need to:
- divide the pts and dts by X.
- divide the SCR value by X.
- send it at X * original speed. (simply respecting the new SCR value
 will work).

With that it should work, provided that every video frame and audio packet have
a PTS and a DTS value (as the frame rate and audio samplerate are now wrong and
thus cannot be used to interpolate the missing values).

 Becarefull that tricking VLC this way, will prevent it to correctly fix the audio
in order to keep the pitch.

If you do have control on the VLC then it is another case (and simpler, you
just need to send the file at the modified speed and inform VLC of the right
speed to use).

Regards,

-- 
fenrir




More information about the vlc-devel mailing list