Hi Luca. > your timestamps are probably expressed in ms. I think you should first > express them to a 64bit integer (seconds * 1000 + milliseconds), and > then convert them to the stream time_base by using av_rescale_q() or > av_rescale().
Mind checking my formula? :) PTS_delta = av_rescale_q(timestamps_delta, AV_TIME_BASE_Q, time_base); where timestamp_delta is difference in milliseconds between the previous and current frame. and PTS_delta is the difference for the new PTS. Just one question here - the used timebase value is from stream structure. The den member is always equal to 90,000, no mater what FPS I set for the codec time base den memeber. Does it mean it's unrelated to codec timebase, hence the approach work safely on every possible frame rate? Or I misunderstand it's purpose. Thanks again for all your help. > > > 2) If I have no B frames, then I can ignore the DTS? > > > I think yes, but I am not sure. Thanks, will check it. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
