fix: Fix timecode rate detection for MOV-MXF#1190
Open
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Open
fix: Fix timecode rate detection for MOV-MXF#1190mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
RV was parsing the 48000 Hz Alexa audio tracks as the MXF's master video framerate resulting in bloated frame numbers and what appeared to be frozen/missing frames Signed-off-by: Michael Oliver <mcoliver@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RV was parsing the 48000 Hz Alexa audio tracks as the MXF's master video framerate resulting in bloated frame numbers and what appeared to be frozen/missing frames.
MovieFFMpegReader::getFirstFrame() attempts to fallback to the format's metadata timecode to calculate the starting frame. To do this, it needs the video framerate (e.g. 23.976), so it loops through all the .mxf track streams sequentially, overwriting the tcRate value each time. Because the alexa MXF metadata places the PCM audio streams at the end (streams 1 through 5 in this case), the fallback logic loops past the video stream and selects the 48000 Hz time-base from the final audio stream.
RV then feeds 48000 into av_timecode_init_from_string(), which throws a framerate warning in my terminal inflated the starting frame that RV requests from the decoder when seeking.
Fixes #1189
Before
mxf-before_compressed.mp4
After
mxf-after_compressed.mp4