Converting PTS to seconds

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting PTS to seconds

Tarun singhal
Hi,

I am able to extract PTS of each frame in a video using mkvtimestamp_v2.

Now since eventually i am trying to find timestamp in seconds of that
frame. Can you please help me how to convert PTS into seconds?

I got to know that mkvtimestamp_v2 provides PTS in timebase of 1/1000 is it
same for all formats of content. How to use this timebase to convert PTS
value to seconds

Regards,
Tarun Singhal

Senior Software Engineer

Accenture - India
( - +91-8105061683 | *  [hidden email]
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Converting PTS to seconds

Moritz Barsnick
On Wed, May 17, 2017 at 18:04:48 +0530, tarun singhal wrote:
> I am able to extract PTS of each frame in a video using mkvtimestamp_v2.

Why use that muxer? How about ffprobe?

> Now since eventually i am trying to find timestamp in seconds of that
> frame. Can you please help me how to convert PTS into seconds?

ffprobe does that for you.

Something like:

$ ffprobe -show_entries packet=pts_time,duration_time -of default=noprint_wrappers=1 input.mp4

should be the kind of magic you need.

> I got to know that mkvtimestamp_v2 provides PTS in timebase of 1/1000 is it
> same for all formats of content. How to use this timebase to convert PTS
> value to seconds

As someone else wrote in the other thread: timestamp = PTS * timebase.

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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