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

[Triage] video downloaded with wrong audio track (automatic dubbing) #482

Closed
gfabrizi opened this issue Nov 22, 2024 · 3 comments · Fixed by #487
Closed

[Triage] video downloaded with wrong audio track (automatic dubbing) #482

gfabrizi opened this issue Nov 22, 2024 · 3 comments · Fixed by #487
Assignees

Comments

@gfabrizi
Copy link

Describe the bug

I've been using Pinchflat for months with great results (thanks so much for the great app <3)
I don't know if it's a bug or a missing feature, but in the last few days I've been noticing a problem with downloading some videos.
I follow some Italian creators and for some reason Pinchflat downloads the videos with audio automatically translated into English (generated with the automatic dubbing feature of youtube).
There are no other audio tracks embedded in the video file.
I haven't found a way from Pinchflat to set a preferred language for the audio (like there is for subtitles) or tell it to ignore the audio track automatically generated by Youtube.

To Reproduce

Steps to reproduce the behavior:

  1. add this channel as source: https://www.youtube.com/@Prattquello
  2. sync latest videos
  3. the last (at the moment) video has english audio

Direct link to a problematic video: https://www.youtube.com/watch?v=4yj3MilklIM

Expected behavior

Download video with audio track in the main language

Diagnostic info

  • App Version: 2024.10.30
  • yt-dlp Version: 2024.10.22
  • Apprise Version: v1.9.0
  • System Architecture: x86_64-pc-linux-gnu
  • Timezone: Europe/Rome

Additional context

I’m using Pinchflat docker image with docker compose

@sebastianschauenburg
Copy link

This indeed started a short time ago. I noticed this also at the "Autodoktoren" channel. Don't know if it is a setting of the content creators, or a 'feature' which has been automatically added.

It would be great if a kind of language code filter would be allowed ;-)

P.S. I also completely agree with the sentiment that the app is excellent. Many thanks!

@kieraneglin
Copy link
Owner

kieraneglin commented Nov 25, 2024

Hey there! Thanks for the report (:

This is strange! Truthfully, I didn't know this feature even existed. Looking into it, it seems like this may have been a mistake by the uploader. You can see here that while Italian is marked as the original language, English is marked as the default:

Screenshot 2024-11-25 at 2 53 27 PM

However, I'm not sure if that's actually the uploader's fault or if yt-dlp's video extractor inadvertently prefers English. Edit: this issue was kind of caused by the uploader, but it's a very reasonable mistake that I can't fault them for. Pinchflat is set to download the "best" audio and the dubbed audio tracks are reading as a higher bitrate (ie: "better") when compared to the original track. This doesn't change the advice below, but I wanted to make sure I was accurate about the cause of the issue.

In any case, I agree that it's a good idea to allow for configuration of this option! I'll look into that once I have time. Until then, you can use Custom yt-dlp Options to force the preference of your language. Just add --extractor-args "youtube:lang=it" to base-config.txt (or whatever file you think is appropriate) and it'll download in Italian! You can swap the it for de or any other language code.


(Note to self) When looking into this, see if there's a way to sort the MORE INFO column of the formats table to prefer audio that has the string original in it.

Edit: I was able to get this working with -f "bestvideo+bestaudio[format_note*=original]/best" as a proof-of-concept. I'd still need some way to differentiate fetching the original vs. fetching a specific language code.

Another note-to-self that --extractor-args "youtube:lang=<LANG>" would actually break this approach since it'd also translate the format_note string that contains the word original into another language. So these approaches are mutually exclusive and I'd have to use something like -f "bestvideo+bestaudio[lang=de]/best", for instance

@kieraneglin
Copy link
Owner

I've made this change in #487! You'll have to undo any of the earlier change I recommended, if any.

Once that new feature is launched (later today), you can go to your Media Profile (ensure Advanced Mode is enabled in the upper right) > Audio Track Language > enter it or original

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

Successfully merging a pull request may close this issue.

3 participants