MXF: Fix OP47 Teletext not being probed as a Text track for short-duration files. - #2671
Conversation
…ation files. This fixes a regression from commit 6e03ccb. Prior to this commit, MXF would do a supplemental probe of 64 MiB at the midpoint of the file to identify captions. After this commit, the supplemental probe's start-point and window-size were made configurable, defaulting to a start-point of 50% by byte- offset and a window size of 30 seconds (extrapolated from average bitrate.) However, for very short files, there may not _be_ 30 more seconds of content after the midpoint of the file. This commit handles that scenario by clamping the size of the probe window so it fits in the file, rather than skipping the probe altogether.
|
Thank you for the report and PR. |
|
Thanks for the update. Was there a test suite I should have run prior to putting up my PR? I saw some directories that looked related to testing, but I did not see frequent/recent commit activity there, and nothing that looked like testing against a library of media files. But, I did not look that close. |
Unfortunately the suite is not public. |
|
I figured. well, you can share the one I included with the PR :) |
And I appreciate that, OP47 files are rare. |
|
I'll just plug the product I work on then, AWS Elemental MediaConvert, which semi-recently added a Teletext encoder and can now convert most text-based caption types to Teletext, and will use the OP47 format when you add a Teletext track to an MXF output. |
…_mxf MXF: Fix premature Fill of ANC essence causing Teletext loss when content is sparse (different from #2671)
This fixes a regression from commit 6e03ccb. Prior to this commit, MXF would do a supplemental probe of 64 MiB at the midpoint of the file to identify captions. After this commit, the supplemental probe's start-point and window-size were made configurable, defaulting to a start-point of 50% by byte- offset and a window size of 30 seconds (extrapolated from average bitrate.)
However, for very short files, there may not be 30 more seconds of content after the midpoint of the file. This commit handles that scenario by clamping the size of the probe window so it fits in the file, rather than skipping the probe altogether.
Symptom of the regression is that, for short duration MXF files containing OP47 Teletext, the "Text" track goes missing from the output after commit 6e03ccb. (Sometimes I have seen it still reported as an "Other" track, which I still consider regressed behavior; other times it's completely gone.)
I have created this test file to reproduce the bug; you are free to keep it and use it for regression testing or any other purpose.
op47_teletext_regression_for_mediainfo.mxf.gz
Bad output (note, the
Texttrack is missing)Good output (note, the
Texttrack is now present)