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

Question about removing remuxEmptyAudio #6528

Open
raxxarr opened this issue Jul 1, 2024 · 3 comments
Open

Question about removing remuxEmptyAudio #6528

raxxarr opened this issue Jul 1, 2024 · 3 comments
Labels

Comments

@raxxarr
Copy link

raxxarr commented Jul 1, 2024

What do you want to do with Hls.js?

Hi, I notice that there is a workaround has been removed by this commit, but i cannot fully understand the descripiton: "Remove empty audio track workaround because it causes gaps in live streams with audio PES carryover", could you please help to explain further?
Because this workaround could resolve a problem caused by my broken vod stream: the audio data suddenly disappears after a certain fragment. If I added this workaround back in my code, what potential risks might there be?
Thank you.

What have you tried so far?

No response

@raxxarr raxxarr added Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Question labels Jul 1, 2024
@robwalch
Copy link
Collaborator

robwalch commented Jul 1, 2024

In muxed audio video segments audio samples ending before video, this call to remuxEmptyAudio could insert silent audio that may be carried in the next segment.

Silent audio insertion is now only handled in remuxAudio.

@robwalch robwalch removed the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Jul 1, 2024
@raxxarr
Copy link
Author

raxxarr commented Jul 2, 2024

Thanks for the answer, now I understand why it's removed.

If there will be no more audio data in the rest of the stream, remuxAudio will not handle this, I think it will only insert silent frames when met large audio PTS delta.

I know this is actually a problem of the stream, but is there any other way to make a workaround? for example, still use remuxEmptyAudio, but check overlap and drop some silent frames when next segment arrived?

@robwalch
Copy link
Collaborator

robwalch commented Jul 2, 2024

You could get the audio SourceBuffer from BUFFER_CREATED, and try appending silent audio after FRAG_BUFFERED based on fragments.elementaryStreams.

robwalch added a commit that referenced this issue Jul 2, 2024
@robwalch robwalch mentioned this issue Jul 2, 2024
3 tasks
robwalch added a commit that referenced this issue Jul 3, 2024
@robwalch robwalch modified the milestone: 1.6.0 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants