obs-outputs: File splitting improvements for Hybrid MP4/MOV#13386
Open
derrod wants to merge 2 commits intoobsproject:masterfrom
Open
obs-outputs: File splitting improvements for Hybrid MP4/MOV#13386derrod wants to merge 2 commits intoobsproject:masterfrom
derrod wants to merge 2 commits intoobsproject:masterfrom
Conversation
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.
Description
Fixes file splitting by ensurnig the last frame of each part is not dropped, and b-frames are accounted for in the timer
Motivation and Context
Address part of #13374.
Originally, before file splitting was introduced, I made the choice to simple ignore the last frame in the packet queue of the muxer, because frame N+1 is required to properly determine the duration and I figured nobody would notice if their recording is one frame short.
However, when using frame splitting this would result in the last frame before a split being dropped. To fix this, we can simply reuse the previous sample's duration for the final sample in a file. Since OBS only does CFR, they should all be identical anyway.
Additionally I discovered while testing that the first split would always be one GOP too long (e.g. 1m2s instead of 1m) due to the fact that b-frames and negative start DTSes were not accounted for. This is also fixed in this PR.
How Has This Been Tested?
Recorded some files, looked at them frame-by-frame to confirm none are missing now.
Types of changes
Checklist: