Skip to content

fix: Fix timecode rate detection for MOV-MXF#1190

Open
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver:mxf-prores-file-skipping-frames
Open

fix: Fix timecode rate detection for MOV-MXF#1190
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver:mxf-prores-file-skipping-frames

Conversation

@mcoliver
Copy link
Contributor

@mcoliver mcoliver commented Mar 5, 2026

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

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>
@mcoliver mcoliver marked this pull request as ready for review March 5, 2026 00:28
@mcoliver mcoliver changed the title Fix timecode rate detection for MOV-MXF fix: Fix timecode rate detection for MOV-MXF Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MXF file playback is broken

1 participant