[FFmpeg-user] GoPro: get each frame time stamp

julien lengrand-lambert jlengrand at gmail.com
Wed Jun 5 11:07:58 CEST 2013


Thanks for answering so fast.

I am not specially thinking about a bug.
What I would like is to have the exact timestamp that is set by the gopro
while encoding the mpeg file.

If the gopro has exactly 25 fps, then fine but I want to be sure that
ffmpeg is not modifying anything.


Just to be sure : I have a mp4 file, not an mpeg ts.
And I don't see how the #2607 can help :S, sorry

My concern is that each frame is set with a precise 0.04 sec interval with
the others. This sounds strange to me that the hardware behind the gopro
can be so precise.

Here is what I got if I run : ffmpeg -debug_ts -i 3_96025.MP4 -copyts -an
%10d.png

muxer <- type:video pkt_pts:36000 pkt_pts_time:0.4 pkt_dts:36000
pkt_dts_time:0.4 size:1842613
demuxer -> ist_index:0 type:video next_dts:1080000 next_dts_time:1.08
next_pts:7 60000 next_pts_time:0.76 pkt_pts:97200 pkt_pts_time:1.08
pkt_dts:97200 pkt_dts_time:1.08 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:97200 pkt_pts_time:1.08
pkt_dts:97200 pkt_dts_time:1.08 off:0 off_time:0
decoder -> ist_index:0 type:video frame_pts:68400 frame_pts_time:0.76
best_effort_ts:68400 best_effort_ts_time:0.76 keyframe:0 frame_type:3
encoder -> type:video pkt_pts:39600 pkt_pts_time:0.44 pkt_dts:39600
pkt_dts_time:0.44

muxer <- type:video pkt_pts:39600 pkt_pts_time:0.44 pkt_dts:39600
pkt_dts_time:0.44 size:1958982
decoder -> ist_index:0 type:video frame_pts:72000 frame_pts_time:0.8
best_effort_ts:72000 best_effort_ts_time:0.8 keyframe:0 frame_type:2
decoder -> ist_index:0 type:video frame_pts:75600 frame_pts_time:0.84
best_effort_ts:75600 best_effort_ts_time:0.84 keyframe:0 frame_type:3
decoder -> ist_index:0 type:video frame_pts:79200 frame_pts_time:0.88
best_effort_ts:79200 best_effort_ts_time:0.88 keyframe:0 frame_type:3
decoder -> ist_index:0 type:video frame_pts:82800 frame_pts_time:0.92
best_effort_ts:82800 best_effort_ts_time:0.92 keyframe:0 frame_type:2
decoder -> ist_index:0 type:video frame_pts:86400 frame_pts_time:0.96
best_effort_ts:86400 best_effort_ts_time:0.96 keyframe:0 frame_type:3
decoder -> ist_index:0 type:video frame_pts:90000 frame_pts_time:1
best_effort_ts:90000 best_effort_ts_time:1 keyframe:0 frame_type:3
decoder -> ist_index:0 type:video frame_pts:93600 frame_pts_time:1.04
best_effort_ts:93600 best_effort_ts_time:1.04 keyframe:0 frame_type:2
decoder -> ist_index:0 type:video frame_pts:97200 frame_pts_time:1.08
best_effort_ts:97200 best_effort_ts_time:1.08 keyframe:0 frame_type:3
decoder -> ist_index:0 type:video frame_pts:104400 frame_pts_time:1.16
best_effort_ts:104400 best_effort_ts_time:1.16 keyframe:0 frame_type:2
muxer <- type:video pkt_pts:43200 pkt_pts_time:0.48 pkt_dts:43200
pkt_dts_time:0.48 size:1861265

Once again, I got these precise 3600 and 0.04 values all over the place.
Can I conclude that it is the gopro setting those time stamps, and that I
have to search for another way to know when exactly the frame has been
grabbed by the sensor?

Thx




On Wed, Jun 5, 2013 at 10:54 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> julien lengrand-lambert <jlengrand <at> gmail.com> writes:
>
> > I know that the output framerate is 25 fps.
> > I extracted the pts in different ways using ffmpeg and
> > ffprobe, but they all show way too perfect results for
> > me to believe them.
> >
> > Each frame/packet has a precise, 0.04 sec interal (or
> > 3600 in pts units) which conveniently enough matches
> > a perfect 25 fps.
>
> Do I understand you correctly, you believe there is a
> bug but you cannot reproduce it?
>
> Use -debug_ts for complete timestamp information, see
> ticket #2607 for an example stream that contains the
> inconveniently not matching timestamps that you seem
> to be searching.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list