Converting PTS to seconds
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 | * tsinghal18@gmail.com
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
participants (2)
-
Moritz Barsnick -
tarun singhal