Skip to content

Fix low audio bitrate in DASH mode and audio only mode#3162

Merged
SamantazFox merged 14 commits intomasterfrom
unknown repository
Jul 11, 2022
Merged

Fix low audio bitrate in DASH mode and audio only mode#3162
SamantazFox merged 14 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Jun 22, 2022

Fix #3074
Also default highest quality m4a on audio only mode

138138138 added 2 commits June 23, 2022 02:13
Since VideoJS is unable to handle adaptive audio quality, the best audo quality is forced for every video quality.
Audio mode will automatically select highest quality m4a as default.
@ghost ghost self-requested a review as a code owner June 22, 2022 18:34
@ghost ghost requested review from unixfox and removed request for a team June 22, 2022 18:34
@ghost ghost closed this Jun 22, 2022
@ghost ghost reopened this Jun 22, 2022
@SamantazFox
Copy link
Member

The problem is that it removes entirely lower quality audio... That's not ideal for users with limited bandwidth.
I'd prefer if you could fix the audio stream selection on the client side (JS).

@ghost ghost marked this pull request as draft June 24, 2022 09:24
138138138 added 8 commits June 24, 2022 17:26
player.audioTracks() can successfully show
tracks_: Array(2)
lang has to be BCP 47 standard. Using label also can let video.js know there are 2 audio tracks.
@ghost ghost marked this pull request as ready for review June 25, 2022 11:54
@ghost
Copy link
Author

ghost commented Jun 25, 2022

When playing DASH videos, an audio button is shown to change the quality of the stream.
Screenshot_20220625_195326

Now everything defaults to the best quality m4a.
Future requests on selecting audio quality based on video quality, or having a separate audio quality preference, or enabling webm, are welcome to be discussed.
However, I think this patch needs to be merged now, since many users are suffering from low audio quality in DASH mode.

@unixfox
Copy link
Member

unixfox commented Jul 2, 2022

In testing on https://yewtu.be

@unixfox unixfox added enhancement Improvement of an existing feature in-testing This feature has been deployed and is being tested labels Jul 2, 2022
@julianfairfax
Copy link

Thank you so much for fixing this!

@LennyPenny
Copy link
Contributor

could you publish a docker image of this somehwere?

@unixfox
Copy link
Member

unixfox commented Jul 4, 2022

could you publish a docker image of this somehwere?

There is my docker image: https://hub.docker.com/r/unixfox/invidious-custom with all the patches: https://github.com/unixfox/invidious-custom/tree/master/patches.
There is a breaking change in the patches, especially the patch from this pull request: #2469

@SamantazFox
Copy link
Member

While you're at it, is it possible to fix the audio bitrate diplayed? See issue #2513

@unixfox
Copy link
Member

unixfox commented Jul 7, 2022

While you're at it, is it possible to fix the audio bitrate diplayed? See issue #2513

I think this should be tackled into another pull request, let's merge this one which fixes a wide annoying bug.

@SamantazFox
Copy link
Member

I think this should be tackled into another pull request, let's merge this one which fixes a wide annoying bug.

Mmmh, yeah, you're right!

Copy link
Member

@SamantazFox SamantazFox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition two the two changes below, I'm really wondering about having two AdaptationSet for the same audio. Doesn't that break the standard?

138138138 and others added 2 commits July 10, 2022 16:29
better syntax

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
Skip OTF streams, prevent creating empty AdaptationSet in DASH audio
@ghost
Copy link
Author

ghost commented Jul 11, 2022

The above two changes are implemented.

Regarding to AdaptationSet, theoretically audios with same content should be put into one AdaptationSet. However, most players cannot handle auto quality switching, and cannot provide a quality selector. By separating into two AdaptationSet, video.js will treat them as different languages audio tracks, which shows an audio track selector.
youtube.com also defaults to highest quality audio and does not change. Lower qualities are for YouTube Music.

@SamantazFox SamantazFox merged commit cd6c73e into iv-org:master Jul 11, 2022
@SamantazFox
Copy link
Member

Thanks for your contribution to invidious :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of an existing feature in-testing This feature has been deployed and is being tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] DASH playback results in very low Audio bitrate regardless of Video quality selected

4 participants