On 17-07-2019 12:08 AM, Stéphane Chauveau wrote:
It seems that the pts value depends of the stream time_base so the formula 'N*30' is probably not valid in the general case.

So if FR is not available in you meg file then I propose the following:

Find the time_base value with

ffprobe -hide_banner -show_streams -select_streams v  input.mpg | grep time_base

For example, that could be 1/1000

Then use the formula 'N/(30*(1/1000))' assuming fps=30 and time_base=1/1000

If you get the right formula then the frame n=30 should have pts_time=1.00  in the showinfo dump.

The constant TB is available, so to retime the stream as a 30 fps stream, it would be

    -vf setpts=N/30/TB

If a framerate value has been set then

    -vf setpts=N/FR/TB


Gyan
_______________________________________________
ffmpeg-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to