tubesync
tubesync copied to clipboard
Downloading wrong language
Recently, some videos in a subscribed channel are randomly downloading the Spanish language versions of the videos when I am wanting the English version. There's nothing in the settings that I can see that would make that the default.
The channel uploads their videos in English as the original and Spanish as dubbed.
The channel: https://www.youtube.com/@JaredOwen
Videos that are downloaded in Spanish:
https://youtu.be/rKp4pe92ljg
https://youtu.be/0-oQRSViZQE
https://youtu.be/GkI_2yiIb48
Thanks, I'd not seen this previously so I would assume I need to add some language selection flag.
I just realised about 1500 videos of my subscibed channel are not in spanish :( any eta on this ?
I am noticing the same issue as well. Especially with the more popular Youtube channels where they upload multiple languages, it almost never downloads with the English audio. It looks like Youtube-DL has a way to specify the language, so I would think it would be possible to do here as well. https://www.reddit.com/r/youtubedl/comments/114624f/how_to_choose_audio_language_for_youtube_video/
The ability to select the language would be nice, I’m starting to see a few channels supporting multiple language audio tracks and it never downloads the English variant.
Same here. The latest Mark Rober video downloaded the Spanish dub. It would be good to be able to set the default language as a flag somewhere in the UI, ideally on a global level.
Thanks for the reports everyone, I'll look into adding this as an option and default to English when I get time this week.
Thanks for the reports everyone, I'll look into adding this as an option and default to English when I get time this week.
I was able to modify utils.py to accomplish this, setting English to default. I added line 170 and lines 186-190. Tested with a Mark Rober video and it re-selected the correct audio track. This basically ignores any audio track with a - in the ID where the note doesn't contain English.
I also have a block of code in here to do the same with skipping (Premium) resolutions.
Thanks for your code @bawitdaba, worked a treat for me with Mark Rober's videos also :)
Attaching the modified file here for anyone else who wants to use it, without having to manually add the code themselves.
The extracted file needs to go into /app/sync
Cheers
Thanks! The premium skip looks fine. Defaulting to English with no dynamic option probably isn't sensible for everyone though. Do you want to add a PR for the premium skip section?
Defaulting to English may not be the best solution but it is likely an 80% solution.
Looking at the UI for youtube it looks like, maybe, original
is the correct default option. All the multi-language videos I found marked the language as "English original"
Turning this into a PR would be good. Then work could be done on adding a flag to the UI for downloading a preferred language with original being the fallback.
Sounds good. I just meant the defaulting to English shouldn't be in the PR. If you create PR for the rest of it I'd be happy to review it.
Hello! Is this still in the pipeline to get worked or has it been resolved? I'm not seeing anything different in my instance
I would like to see this fixed as well. I can't download any Mark Robber Videos. The audio language ranges from Russian, to Spanish, and even French. Is anyone working on this.
This is amazing because I searched for "replay media catcher downloading wrong youtube language ". I didn't mention Mark Rober in the search. I immediately came upon this thread in it. I was trying to download a Mark Rober video today and even though it played on YT in English, which I want, it downloads in Spanish. I'm actually using replay media catcher and haven't tried the program you're talking about here. I wouldn't know how to do that code mentioned above but hope a solution can be found. Thanks.
For now, you can use the file from @irishj post (fix originally provided by @bawitdaba).
If you use docker compose
you can put the file alongside your compose.yaml
and reference it like this in it:
volumes:
- ./utils.py:/app/sync/utils.py
I added in the patch via docker and triggered a re-download of an existing video with the wrong language, but I still get the same issue. Do I have to delete the whole channel rather than an individual video?
me@nas:~$ sudo docker exec -it tubesync grep -nC 11 "and not 'ENGLISH'" /app/sync/utils.py
170- format_id = format_dict.get('format_id', '').strip().upper()
171- format_full = format_dict.get('format_note', '').strip().upper()
172- format_str = format_full[:-2] if format_full.endswith('60') else format_full
173- format_str = format_str.strip()
174- format_str = format_str[:-3] if format_str.endswith('HDR') else format_str
175- format_str = format_str.strip()
176- format_str = format_str[:-2] if format_str.endswith('60') else format_str
177- format_str = format_str.strip()
178- is_hls = True
179- is_dash = False
180-
181: if '-' in format_id and not 'ENGLISH' in format_full:
182- vcodec = None
183- acodec = None
184- height = 0
185- width = 0
186-
187- if 'PREMIUM' in format_full:
188- vcodec = None
189- acodec = None
190- height = 0
191- width = 0
192-