tubesync icon indicating copy to clipboard operation
tubesync copied to clipboard

Downloading wrong language

Open corbin-lounsbury opened this issue 1 year ago • 16 comments

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

corbin-lounsbury avatar Apr 09 '23 14:04 corbin-lounsbury

Thanks, I'd not seen this previously so I would assume I need to add some language selection flag.

meeb avatar Apr 10 '23 05:04 meeb

I just realised about 1500 videos of my subscibed channel are not in spanish :( any eta on this ?

ryjogo avatar Aug 28 '23 17:08 ryjogo

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/

mckayc avatar Sep 24 '23 12:09 mckayc

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.

davidkylenz avatar Oct 01 '23 03:10 davidkylenz

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.

mylogon341 avatar Oct 01 '23 23:10 mylogon341

Thanks for the reports everyone, I'll look into adding this as an option and default to English when I get time this week.

meeb avatar Oct 02 '23 09:10 meeb

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.

image

bawitdaba avatar Nov 25 '23 08:11 bawitdaba

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.

utils.zip

The extracted file needs to go into /app/sync

Cheers

irishj avatar Nov 25 '23 20:11 irishj

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?

meeb avatar Nov 26 '23 05:11 meeb

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.

frob avatar Dec 02 '23 19:12 frob

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.

meeb avatar Dec 03 '23 03:12 meeb

Hello! Is this still in the pipeline to get worked or has it been resolved? I'm not seeing anything different in my instance

corbin-lounsbury avatar Mar 25 '24 17:03 corbin-lounsbury

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.

jsclifford avatar Apr 13 '24 18:04 jsclifford

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.

tack32 avatar May 17 '24 03:05 tack32

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

djismgaming avatar Jun 20 '24 19:06 djismgaming

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-

Catchwa avatar Jul 02 '24 11:07 Catchwa