failed to export timecodes from the mp4 file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

failed to export timecodes from the mp4 file

FFmpeg-users mailing list
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

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: failed to export timecodes from the mp4 file

PaulYurt


On Jan 15, 2021, at 4:03 PM, Vladimir Bogdanov via ffmpeg-user <[hidden email]> wrote:

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

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


Valadimir, if your starting time is good then what makes you think the video is going to go out of sync? I’m my experience with video production, once you get things aligned and I sync, they will mostly stay in sync over the duration of a recorded sequence.

If the camera are stopped and started then you have a different issue.

I se the time codes are 0 in some of the data you’ve supplied.

Paul

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: failed to export timecodes from the mp4 file

FFmpeg-users mailing list
On Jan 15, 2021, at 4:03 PM, Vladimir Bogdanov via ffmpeg-user <[hidden email]> wrote:

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

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


Valadimir, if your starting time is good then what makes you think the video is going to go out of sync? I’m my experience with video production, once you get things aligned and I sync, they will mostly stay in sync over the duration of a recorded sequence.

If the camera are stopped and started then you have a different issue.

I se the time codes are 0 in some of the data you’ve supplied.

Paul


Dear Paul,
Thank you for your reply!  Though the initial timecode is mostly correct, there is a varied delay of about 200-300 ms between the GoPro AVC encoder timecode and the real timecodes for the frames which I can not read. This results in asynchronicity of the videos recorded by two cameras which must be corrected manually and this I prefer to avoid.
Can there be a different ffmpeg command than what I use to be able to read the "side data - timecode". The fact that it is always 00:00:00:00 looks strange. 
Really appreciate any suggestions!

Sincerely yours,Volodymyr  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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