Xonshiz / anime-dl

Anime-dl is a command-line program to download anime from CrunchyRoll and Funimation.
MIT License
229 stars 37 forks source link

MKVMERGE Muxing Issue #103

Open leptoid opened 4 years ago

leptoid commented 4 years ago

Hey, it's been a while... Could you take a look and see if you are having an issue muxing subtitles with video files? This is the error I receive:

Error: There is no translation available for 'en_US'.
Sees like I couldn't mux the files.

Check whether the MKVMERGE.exe is in PATH or not.

Command 'mkvmerge --output "Blackfox - 00 [848x480].mkv" "Blackfox - 00 [848x480].mp4" --track-name 0:English_US --ui-language en_US --language 0:eng --default-track 0:yes --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].enUS.ass"  --track-name 0:Arabic --language 0:ara --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].arME.ass"  --track-name 0:Espanol_Espana --ui-language es_ES --language 0:spa --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].esES.ass"  --track-name 0:Espanol --ui-language es_ES --language 0:spa --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].esLA.ass"  --track-name 0:Portugues_Brasil --ui-language pt_BR --language 0:por --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].ptBR.ass"  ' returned non-zero exit status 2

Stream couldn't be muxed. Make sure MKVMERGE is in the path.
-----------------------------------------------------------

For reference, MKVMERGE is in the path, it fails even in the same folder. I did not try this with the Python files, only the latest precompiled Windows version.

leptoid commented 4 years ago

I'm back... it's been minutes. So the issue lies in the command itself.

mkvmerge --output "Blackfox - 00 [848x480].mkv" "Blackfox - 00 [848x480].mp4" --track-name 0:English_US --ui-language en_US --language 0:eng --default-track 0:yes --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].enUS.ass" --track-name 0:Arabic --language 0:ara --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].arME.ass" --track-name 0:Espanol_Espana --ui-language es_ES --language 0:spa --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].esES.ass" --track-name 0:Espanol --ui-language es_ES --language 0:spa --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].esLA.ass" --track-name 0:Portugues_Brasil --ui-language pt_BR --language 0:por --default-track 0:no --sub-charset 0:utf-8 "X:\Downloaders\anime-dl\Blackfox - 00 [848x480].ptBR.ass"

Removing --ui-language en_US allows it to function. I do not know where that is in your code (yet). I will download the python version and explore a bit.

leptoid commented 4 years ago

Issue is an MKVTool problem. Workaround:

Crunchyroll.py Beginning line 311, replace entire if then else elseif statement (lines 311 to 360) with the following:

if sub_file.endswith(".enUS.ass"):
                subtitles_files.insert(0,
                    "--track-name 0:English_US --language 0:eng --default-track 0:yes --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')

            elif sub_file.endswith(".enGB.ass"):
                subtitles_files.append(
                    "--track-name 0:English_UK --language 0:eng --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')

            elif sub_file.endswith(".esLA.ass"):
                subtitles_files.append(
                    "--track-name 0:Espanol --language 0:spa --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".esES.ass"):
                subtitles_files.append(
                    "--track-name 0:Espanol_Espana  --language 0:spa --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".ptBR.ass"):
                subtitles_files.append(
                    "--track-name 0:Portugues_Brasil --language 0:por --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".ptPT.ass"):
                subtitles_files.append(
                    "--track-name 0:Portugues_Portugal --language 0:por --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".frFR.ass"):
                subtitles_files.append(
                    "--track-name 0:Francais_France --language 0:fre --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".deDE.ass"):
                subtitles_files.append(
                    "--track-name 0:Deutsch --language 0:ger --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".arME.ass"):
                subtitles_files.append(
                    "--track-name 0:Arabic --language 0:ara --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".itIT.ass"):
                subtitles_files.append(
                    "--track-name 0:Italiano --language 0:ita --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            elif sub_file.endswith(".trTR.ass"):
                subtitles_files.append(
                    "--track-name 0:Turkce --language 0:tur --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
            else:
                subtitles_files.append(
                    "--track-name 0:und --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
                        os.path.realpath(sub_file)) + '" ')
Xonshiz commented 4 years ago

Thanks for such hard work. I'll be re-writing this library and will see if that works properly or not and I'll keep this one in mind.

leptoid commented 4 years ago

Thanks! I hope this gets working right for me again soon... I don't like the other options or how they function.

leptoid commented 4 years ago

Other options being other people's scripts.

leptoid commented 4 years ago

Well... it works for me now. ;)