Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segment collection end timestamp calculation #102

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

Qizot
Copy link
Member

@Qizot Qizot commented Feb 22, 2024

When collecting a CMAF segment we are trying to collect the amount of samples whose total duration will exceed certain threshold. Previously the decision was purely based on the end timestamp that took into account only the last sample's DTS while we also need to take into account the sample duration. When the sample duration is pretty small (duration of a single sample e.g. 16ms) the problem was not visible, but when we take into consideration frame gaps between video frames (e.g. 2 seconds) this caused huge mismatches between e.g. audio and video segment durations.

@Qizot Qizot requested a review from mat-hek as a code owner February 22, 2024 13:10
@Qizot Qizot requested a review from mat-hek February 22, 2024 14:24
lib/membrane_mp4/muxer/cmaf.ex Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@Qizot Qizot requested a review from mat-hek February 23, 2024 14:50
lib/membrane_mp4/muxer/cmaf.ex Outdated Show resolved Hide resolved
lib/membrane_mp4/muxer/cmaf.ex Show resolved Hide resolved
@Qizot Qizot force-pushed the fix-sample-collection-condition branch from fc60864 to 6f5db82 Compare February 23, 2024 15:08
@Qizot Qizot requested a review from mat-hek February 23, 2024 15:09
@Qizot Qizot merged commit ae4bad2 into master Feb 23, 2024
3 checks passed
@Qizot Qizot deleted the fix-sample-collection-condition branch February 23, 2024 15:44
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.

None yet

2 participants