vendredi 22 novembre 2013

Extract PTS from a video stream

 

I often used ffmpeg to extract raw_video data from compressed file or device stream, but when we do that we lost a useful information the PTS (presentation timestamp) of each frame.

For example, if you have a program using the output of ffmpeg (pipe mode),

ffprobe –show_frames –select_streams v:0 input.ts | grep pkt_pts_time= >> output.pts

output.pts file will contain:

pkt_pts_time=0.000000
pkt_pts_time=0.034022
pkt_pts_time=0.067689
…..

those number are in seconds, so you can use them easily in any software you develop.

Aucun commentaire :

Enregistrer un commentaire