[FFmpeg-user] failed to export timecodes from the mp4 file

Vladimir Bogdanov vlabogd at yahoo.com
Fri Jan 15 23:02:22 EET 2021


Dear ffmpeg experts,
I have a very basic question about the timestamps of MP4 files. Forour biomedical research project we need so extract the timecode for every frameform several mp4 videos in order to synchronize them. Could you please kindlyhelp to find the right command?

I tried ffmpeg.exe -i video.mp4 -f null -vf showinfo - 2>otcome.txt, however instead of meaningful timecodes it gives lines like thefollowing: 

[Parsed_showinfo_0 @ 000001ff420478c0] n:   2 pts:  3600 pts_time:0.04    pos:   324285 fmt:yuvj420p sar:1/1 s:1280x720 i:Piskey:0 type:P checksum:414039D2 plane_checksum:[F8D7F402 182C69AC 1D47DC06]mean:[106 126 137 ] stdev:[55.9 6.2 12.9 ]

[Parsed_showinfo_0 @ 000001ff420478c0]   side data - timecode - 00:00:00:00

[Parsed_showinfo_0 @ 000001ff420478c0] color_range:pccolor_space:bt709 color_primaries:bt709 color_trc:bt709

[Parsed_showinfo_0 @ 000001ff420478c0] n:   3 pts:  5400 pts_time:0.06    pos:   447916 fmt:yuvj420p sar:1/1 s:1280x720 i:Piskey:0 type:P checksum:39DF4A10 plane_checksum:[BF1C0043 C7516C75 D2FDDD49]mean:[106 126 137 ] stdev:[55.9 6.2 12.9 ]

[Parsed_showinfo_0 @ 000001ff420478c0]   side data - timecode - 00:00:00:00

[Parsed_showinfo_0 @ 000001ff420478c0]color_range:pc color_space:bt709 color_primaries:bt709 color_trc:bt709

[Parsed_showinfo_0 @000001ff420478c0] n:   4 pts:   7200 pts_time:0.08   pos:   485527 fmt:yuvj420p sar:1/1 s:1280x720 i:P iskey:0type:P checksum:92670C5D plane_checksum:[91B6B2F5 2C68839D 5B6DD5AD] mean:[107126 137 ] stdev:[56.1 6.2 12.9 ]

[Parsed_showinfo_0 @000001ff420478c0]   side data -timecode - 00:00:00:00
etc...
The pts_time for all the videos starts from zero and the sequence is exactly identical in different cameras (with the same settings) and this does not help tosynchronize videos with different onsets.

Interestingly the first timecode, is available and correct:
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1280x720 [SAR 1:1 DAR 16:9], 30315 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)    Metadata:      creation_time   : 2021-01-14T00:01:57.000000Z      handler_name    :  GoPro AVC      vendor_id       : [0][0][0][0]      encoder         : GoPro AVC encoder      timecode        : 00:01:58:35
Excuse me for such a basic and naïve question, unfortunately mysearch did not yield any clear and available solution so far.
Thank you in advance for any help!
Sincerely yours,

Volodymyr



More information about the ffmpeg-user mailing list