-
Notifications
You must be signed in to change notification settings - Fork 422
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
Add descriptive and locale properties to audio streams #1026
Merged
Stypox
merged 10 commits into
TeamNewPipe:dev
from
AudricV:audio-streams-descriptive-and-locale-properties
Mar 1, 2023
Merged
Add descriptive and locale properties to audio streams #1026
Stypox
merged 10 commits into
TeamNewPipe:dev
from
AudricV:audio-streams-descriptive-and-locale-properties
Mar 1, 2023
Conversation
This file contains 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
AudricV
added
enhancement
New feature or request
youtube
service, https://www.youtube.com/
media.ccc.de
service, https://media.ccc.de
labels
Feb 12, 2023
Stypox
requested changes
Feb 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Code looks good to me.
Could you add some javadoc explanation about what descriptive audios are?
AudricV
force-pushed
the
audio-streams-descriptive-and-locale-properties
branch
from
February 20, 2023 18:33
3d05ee2
to
7509058
Compare
Done |
Stypox
requested changes
Feb 22, 2023
extractor/src/main/java/org/schabi/newpipe/extractor/stream/AudioStream.java
Show resolved
Hide resolved
AudricV
force-pushed
the
audio-streams-descriptive-and-locale-properties
branch
from
February 22, 2023 18:53
7509058
to
4392b18
Compare
Also improve AudioStream's audio language documentation
Getting audio tracks locales by parsing their ID or their label, should not be done by clients, but by the extractor. This commit adds the ability to store the Locale of an AudioStream, which is used to compare similar AudioStreams (in the equalStats method).
…cale when available Also use audio track setters only for audio itags.
This test uses video TjxC-evzxdk. Also improve a bit YoutubeStreamExtractorDefaultTest.AudioTrackLanguage test.
…o test audio locale property The Hindi audio track language presence test has been changed from audio track label to audio locale.
AudricV
force-pushed
the
audio-streams-descriptive-and-locale-properties
branch
from
February 26, 2023 18:06
4392b18
to
95b3f5e
Compare
Stypox
approved these changes
Feb 26, 2023
9 tasks
3 tasks
3 tasks
34 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
media.ccc.de
service, https://media.ccc.de
youtube
service, https://www.youtube.com/
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.
This PR adds support to extract descriptive audio support property in
AudioStream
(only implemented on YouTube, with a test added), which are currently not distinguished with main audio tracks.It also adds the ability to get a
Locale
for audio languages, which should make easier for clients to get a language object, and so avoid them to parse the audio track id (which may be not reliable in some services, such as MediaCCC where there is no audio track ID but only a language tag) to get aLocale
. Support and tests have been added for YouTube (streams and DASH manifests creators) and MediaCCC (other services doesn't seem to support multiple audio tracks, as far I know).A few documentation improvements and fixes (in the code and in the documentation) around the changes done have been also made.
This PR is required to add an optimal multiple audio tracks support in NewPipe.