Question about MPEG-TS duration and framecount
A unified display of relevant technical and tag data for A/V files
Brought to you by:
guillaumeroques,
zenitram
Hi,
Investigating a problem with frame count discrepancies on SD MPEG-TS files. Problem seen on files with odd second durations for example 5 secs or 15 secs. The frame count on these files is 1 frame short. Files with even durations, for example 10, 20, 30, 40, 60 and 120 seconds report the expected frame count. All files are from same transcode source / profile. All outputs report video track 20ms (1/2 frame) short but only 5 secs or 15 secs samples round this duration down resulting in a frame count 1 frame shorter than expected.
Comparison of MediaInfo outputs not showing obvious point where discrepancy is introduced:
[cid:43e6d665-a8f2-4823-b354-f664a6f0c31b]
Looking for some guidance on how durations and frame counts are calculated on ts files. Basic understanding is MediaInfo determines the frame count based on the duration and the frame rate of the media (i.e. duration x frame rate). Would like some detail on other variables that impact that calculation.
On the example above, video stream on both the 10s file and 15s files are 20ms (1/2 frame short @ 25fps). Not clear why the framecount on the "9s 980ms" video gets rounded up to the expected 10s frame count (250 frames) and the "14s 980ms" video gets rounded down so frame count is 1 frame short of expected 15s (374 frames).
Thanks!
The computing of duration is last timestamp minus first time stamp plus duration of a picture (field for interlaced content).
If you are sure that you get 375 full (both fields) frames, please share a sample file (link to be sent to info@mediaarea.net if you can not share it publicly).
Thanks for the feedback. Sent sample file privately. Media owner has run the files through an analyser and indicated all 375 frames present. My tests with various tools (including ffprobe, premiere pro etc) suggest the same.
From: discussion@mediainfo.p.re.sourceforge.net discussion@mediainfo.p.re.sourceforge.net on behalf of Jerome Martinez zenitram@users.sourceforge.net
Date: Wednesday, 16 August 2023 at 19:53
To: [mediainfo:discussion] 297610@discussion.mediainfo.p.re.sourceforge.net
Subject: [mediainfo:discussion] Question about MPEG-TS duration and framecount
The computing of duration is last timestamp minus first time stamp plus duration of a picture (field for interlaced content).
If you are sure that you get 375 full (both fields) frames, please share a sample file (link to be sent to info@mediaarea.net if you can not share it publicly).
Question about MPEG-TS duration and framecount https://sourceforge.net/p/mediainfo/discussion/297610/thread/5e071b94b7/?limit=25#a88a
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/mediainfo/discussion/297610/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
I confirm that we correctly detect all expected frames when we check manually. There is an issue somewhere in the code for computing the timestamp of last field of a MPEG Video stream, definitely on our side.
Warning: non-paid requests are set to low priority, we don't know when we have time to handle them.
If you desire to accelerate the development, don't hesitate to contact us for a quotation.
Thanks for confirming. Should I raise a separate bug report or is this thread sufficient?
We keep it in mind but tracking would be easier if you fill a ticket at https://sourceforge.net/p/mediainfo/bugs/ or https://github.com/MediaArea/MediaInfoLib/issues
[bugs:#1187]
Related
Bugs:
#1187