MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.36k stars 160 forks source link

MP4 time code track output is not fully valid #929

Open dp4 opened 2 weeks ago

dp4 commented 2 weeks ago

When showing the MP4 time code, the display is in format hh:mm:ss:ff. The frame number is calculated with the tmcd frame per seconds integer scale "NumberOfFrames", e.g. 29. The frame rate shown is however the full frame rate, e.g. 30000/1001. In result the time code frame number is not fully plausible. Sample file: atom has 1 sample with sample pos = 1045869 frames. NumberOfFrames = 29, Frame rate is 30000/1001. Output: Frame rate : "29.970 (30000/1001) FPS" and "Time code of first frame : 10:01:04:13".

The time code is calculated with (integer) 29 fps, which leads to the mathematical correct 10:01:04:13. If you calculate with the shown 30000/1001 fps, you will not get the value from the frame count. The viewer has no chance to know, for which fps the last 13 frames are calculated. Alternative solution: show the time code as seconds and milliseconds: 10:01:04,448

JeromeMartinez commented 2 weeks ago

Incoherent (does 29 fps time code exist in the real world?) content leads to incoherent output, sure...

Alternative solution: show the time code as seconds and milliseconds: 10:01:04,448

this would be no more a time code, but a time stamp, and even less sense. Maybe showing a tip that the base of the time code is not in sync with the frame rate e.g. "10:01:04:13S29" (we use "S" already for e.g. time code of audio with tip of the sample rate, it is used e.g. in ADM BS.2076, so we would reuse this format).

What is the output of other tools with such case?

dp4 commented 1 week ago

That additional "S" would be also a good improvement. I did come across this while correcting my own output (Vegas Pro) and comparing with MediaInfo. I didn't check other tools.