Skip to content

[YouTube] extract additional stream information#1412

Merged
TobiGr merged 3 commits intoTeamNewPipe:devfrom
FineFindus:feat/additional-itag-data
Nov 30, 2025
Merged

[YouTube] extract additional stream information#1412
TobiGr merged 3 commits intoTeamNewPipe:devfrom
FineFindus:feat/additional-itag-data

Conversation

@FineFindus
Copy link
Copy Markdown
Contributor

Implements support for extracting lastModified, xtags and isDrc (whether a format is using dynamic range compression) from formats. They are required for initiating SABR playback, but may also be useful on their own (e.g. to filter audio streams with DRC).

Ref: TeamNewPipe/NewPipe#12248

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

Implements support for checking whether an extracted audio format is using
dynamic range compression (DRC).

Ref: https://en.wikipedia.org/wiki/Dynamic_range_compression
@FineFindus FineFindus force-pushed the feat/additional-itag-data branch from f36ef21 to 6a7ef46 Compare November 30, 2025 10:31
Copy link
Copy Markdown
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

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

LGTM, just one small thing

Build fails:

/home/runner/work/NewPipeExtractor/NewPipeExtractor/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/ItagItem.java:710: error: incompatible types: unexpected return value
        return xtags;
               ^

Comment on lines +681 to +688
/**
* When the stream was last modified.
*
* @return unix timestamp of when the stream was last modified
*/
public long getLastModified() {
return lastModified;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add a LAST_MODIFIED_UNKNOWN constant and document its use here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, though I don't think that is necessary, since every format always has a lastModified field.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah, ok. I didn't know that, I just saw that there was a fallback value and thought that having documentation for it might be useful.

@TobiGr TobiGr added the YouTube Service, https://www.youtube.com/ label Nov 30, 2025
Extracts the `lastModified` field of format, which is need for initiating SABR
playback.
Extracts the `xtags` field, which encodes additional data of the format, such
as if the format is using dynamic range compression.
This is required for using SABR.
@FineFindus FineFindus force-pushed the feat/additional-itag-data branch from 6a7ef46 to 0617c88 Compare November 30, 2025 10:57
@FineFindus FineFindus requested a review from TobiGr November 30, 2025 10:58
@TobiGr TobiGr merged commit ae2755b into TeamNewPipe:dev Nov 30, 2025
4 checks passed
@FineFindus FineFindus deleted the feat/additional-itag-data branch November 30, 2025 11:24
@FineFindus FineFindus mentioned this pull request Mar 7, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants