On Mon, 2010-12-13 at 19:49 -0800, Pushkar Pradhan wrote: > I need to compute the 33 bit 90 khz Packetized Elementary Stream timestamp > from a FLV timestamp (in millisecs). Can anyone tell me where is the > function in ffmpeg that does this calculation? > I am not sure about some aspects of the formula like: > 90 kHz = 90000 cycles/sec or 90x1024 cycles/sec? > Is it as simple as 1 sec = 90 K cycles => 1 millisec = 90 cycles? > Of course this is before the formatting into the PES timestamp format. > > Thanks, > pushkar
pes_ts = av_rescale_q(flv_ts, (AVRational){1,1000},
(AVRational){1,90000});
But, since it sounds like you're remuxing you'll probably want to make
the code a bit more general, like:
pes_ts = av_rescale_q(flv_ts, flv_st->time_base, ts_st->time_base);
Where flv_st is the AVStream in the FLV demuxer and ts_st is the
AVStream in the TS muxer.
/Tomas
signature.asc
Description: This is a digitally signed message part
_______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
