[vlc-devel] VLC ignores PTS in PES streams ?!
smile4you at gmx.ch
Sat Jan 17 02:08:19 CET 2009
I would like to change PTS/DTS in the PES stream from VDR ffnetdev
with new ones calculated from current time to solve the problem with
invalid PTS/DTS fastforward/reverse of a video recording.
Can anybody give me some lines of sample source code for creating
PTS/DTS. I didn't understand the documentation on how to build them.
Thank you and best regards.
Am 14.01.2009 um 23:36 schrieb Matthias Bauer:
> Hello Laurent
> Thank you for the fast answer.
> To clarify what I would like to do: I use VDR with the ffnetdev plugin
> as streaming server and VLC as streaming client. VDR ffnetdev plugin
> is streaming the video output to the net instead of displaying it
> VDR can play Live-TV (streaming to VLC works fine) or replay
> recordinge (streaming to VLC works also fine as long it is played in
> normal speed). But the user can fastforward, pause, rewind or
> slowmotion the recorded video while it is still streamed to VLC. The
> PTS/DTS are sent out of the recorded file, no matter in which speed it
> is played. In case of rewind the PTS/DTS even decrease.
> Now I want to patch this streaming server plugin "ffnetdev" to fix the
> problem. What do you think is the best way to manipulate the stream,
> either only while trick speed or while the whole streamed recording?
> May be I should better replace the PTS/DTS with calculated values out
> of current time?
> I get the stream and additional informations about the current speed
> and direction as input and should output a VLC compatible stream.
> Regards, Matthias
> Am 14.01.2009 um 23:05 schrieb Laurent Aimar:
>> 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
>>> 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
>> 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).
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel