[vlc] Re: help with error deciphering.
Jean-Paul Saman
jean-paul.saman at planet.nl
Tue May 1 09:33:30 CEST 2007
Kim Schulz wrote:
>
>
> On Tue, 01 May 2007 09:04:46 +0200, Jean-Paul Saman <jean-paul.saman at planet.nl> wrote:
>
>> Actually it sounds like you are sending a malformed stream to VLC. The
>> timestamp is meant to increase and is used to time when a frame must be
>> sent to decoder and display. VLC uses the timestamps to set and drive
>> its internal clock.
>>
>
> So what information about a frame do I need? I know the clock freq is 90000,
> and I can get the pts/dts for each frame + whatever there is to find in the codecCtx,
> formatCtx and AVPacket in ffmpeg :-)
> can I use any of those to calculate the timestamp.
> I foundan example that used something like:
> time_stamp = (uint32_t) ((90000 * sample.dts) / AV_TIME_BASE);
> bit that gives me the same errors, so I guess that this is wring too.
The DTS and PTS are the timestamps that are important for the decoder
and output threads of the media player.
Then there is the timestamp that is used to determine when to send the
packet on the network. Logically this must hold true:
timestamp < DTS < PTS
If your video data has DTS/PTS based on a 90kHz clock, then you could
use an offset from the frames DTS value. (for instance dts - 3600 and
correct for negative values!)
I don't know much about codec internals, so your milage may vary ;-)
Gtz,
Jean-Paul Saman.
--
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
More information about the vlc
mailing list