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

ngx-live: fix audio ends before video issue #208

Merged
merged 3 commits into from
Jun 9, 2024

Conversation

erankor
Copy link
Collaborator

@erankor erankor commented Jun 8, 2024

the segmenter may try to cut a segment at the audio end timestamp, there is no video key frame at this timestamp - the video segments come out empty, and some of the audio frames are discarded. then it tries to create another segment, but the segments of all tracks come out empty, and the channel is failed.
the fix is to avoid averaging the min/max split pts when the span is too large. in this case, the target pts will be the audio end pts, the video segments will come out empty, and the trailing audio will be discarded.

erankor added 3 commits June 8, 2024 22:16
the segmenter may try to cut a segment at the audio end timestamp, there
is no video key frame at this timestamp - the video segments come out
empty, and some of the audio frames are discarded. then it tries to
create another segment, but the segments of all tracks come out empty,
and the channel is failed.
the fix is to avoid averaging the min/max split pts when the span is too
large. in this case, the target pts will be the audio end pts, the video
segments will come out empty, and the trailing audio will be discarded.
@shamamayair shamamayair merged commit 1a4d215 into master Jun 9, 2024
8 checks passed
@shamamayair shamamayair deleted the ngx-live-audio-ends-before-video-fix-2 branch June 9, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants