Skip to content

fix(player): allow YouTube export audio - #103

Open
Jolimunium wants to merge 12 commits into
sohilsayed:mainfrom
Jolimunium:fix/youtube-sentence-audio-export
Open

fix(player): allow YouTube export audio#103
Jolimunium wants to merge 12 commits into
sohilsayed:mainfrom
Jolimunium:fix/youtube-sentence-audio-export

Conversation

@Jolimunium

Copy link
Copy Markdown
Contributor

Problem

When mining sentence audio from YouTube videos using the YouTube Extension, card creation succeeded for stills and text but failed for sentence audio, producing the warning notification: "The selected video source could not be read for sentence audio. The card was created without it."

In addition, diagnostic reporting lacked explicit rejection reason details in UI Toast notifications when input validation failed prior to probe execution.

Result

  • YouTube Extension Sentence Audio: Sentence audio mining now works seamlessly for YouTube extension videos and media CDN streams signed with sig= parameters.
  • Clear Failure Feedback: In the event of a video source rejection, Toast notifications now display the specific rejection detail.

This PR builds upon #96

- fall back only when the source has exactly one audio stream
- allow audio export from HDR video sources
- show clear warnings when sentence audio generation or Anki storage fails
- validate the selected stream before exporting sentence audio
- fall back only when FFprobe finds exactly one readable audio stream
- distinguish missing, non-audio, and protected stream failures
- distinguish original, MPV playable, and external audio inputs
- detect missing audio streams separately from restricted codecs
- show source-specific sentence audio export warnings
- retry sentence audio export from MPV's playable source only when the original has no audio stream
- preserve safe track mapping and source-specific failure diagnostics
…nce audio

Allow media stream signature query parameters (such as `sig`, `signature`, and `signed`) in SceneVideoInputResolver so that direct YouTube stream URLs (googlevideo.com) can be validated and resolved for sentence audio mining.
Previously, `sig` was included in SENSITIVE_QUERY_NAMES alongside credential tokens, causing YouTube video inputs to be rejected during request validation with SOURCE_UNAVAILABLE.
Separated input validation query names from log redaction query names so that sensitive URL query parameters are still sanitized in logcat and diagnostic logs.
@sohilsayed

Copy link
Copy Markdown
Owner

the animated mining will be reworked so if you can fix the conflicts that would be good

@sohilsayed

Copy link
Copy Markdown
Owner

is this still needed with the latest pull request

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants