akai10tsuki / mkvbatchmultiplex

Batch multiplex video files using MKVToolnix generated command line
MIT License
51 stars 3 forks source link

[BUG] No response from the program (cause unknown) #9

Closed VegethB closed 3 years ago

VegethB commented 3 years ago

I have been experiencing an anomalous problem with the program for some time now. Sometimes, copying the command to the program returns that the command is ok but both adding to the queue (and starting it) and checking the consistency (or any other option) DO NOT give results, as if I had never pressed the key.

Windows 10 64bit 20H2; MkvToolnixGui: 5.1.0.0 MkvBatchMultiplex: 2.1.0b1.dev2 Python: 3.8.6 AMD64

Ex Command: C:\Users\MSI\Downloads\EXE\mkvtoolnix\mkvmerge.exe --ui-language it --output ^"Y:\Anime2\Isekai Cheat Magician\Stagione 01\[KH] Isekai Cheat Magician - 01 - Lost Ones from Another World.mkv^" --language 0:ja --track-name ^"0:[KH] x264 10bit BD^" --default-track 0:yes --display-dimensions 0:1920x1080 --language 1:ja --track-name ^"1:FLAC 2.0 Jpn^" ^"^(^" ^"G:\_torrent\_HEVC-Conv\[KH] Isekai Cheat Magician ^(BD 1080p^) [Dual-Audio]\Remux\[KH] Isekai Cheat Magician - 01 - Lost Ones from Another World.mkv^" ^"^)^" --language 0:it --track-name ^"0:Crunchyroll Ita^" --sync 0:1024 ^"^(^" ^"Z:\Anime Backups\Isekai Cheat Magician\[Erai-raws] Isekai Cheat Magician - 01.ass^" ^"^)^" --attachment-name arial.ttf --attachment-mime-type application/x-truetype-font --attach-file ^"Z:\Anime Backups\Isekai Cheat Magician\font\arial.ttf^" --attachment-name times.ttf --attachment-mime-type application/x-truetype-font --attach-file ^"Z:\Anime Backups\Isekai Cheat Magician\font\times.ttf^" --attachment-name trebuc.ttf --attachment-mime-type application/x-truetype-font --attach-file ^"Z:\Anime Backups\Isekai Cheat Magician\font\trebuc.ttf^" --attachment-name trebucit.ttf --attachment-mime-type application/x-truetype-font --attach-file ^"Z:\Anime Backups\Isekai Cheat Magician\font\trebucit.ttf^" --track-order 0:0,0:1,1:0

IMG's ![image](https://user-images.githubusercontent.com/17975351/102012138-e1ca4000-3d48-11eb-98cd-84b364306217.png) ![image](https://user-images.githubusercontent.com/17975351/102012143-eb53a800-3d48-11eb-8fb3-3e59590419b2.png) start worker result: ![image](https://user-images.githubusercontent.com/17975351/102012152-f4447980-3d48-11eb-8b85-eed852daf9ca.png) No job errors, Job set as done (but nothing done) and Log view: ![image](https://user-images.githubusercontent.com/17975351/102012166-14743880-3d49-11eb-8a73-8ea184fc83cb.png) The command works on MkvToolNix Gui (so it is not wrong and / or corrupt some file). In this case, if I run the command by removing the .ass from the mux then it works (HOWEVER IT'S NOT ALWAYS LINKED TO .ass, sometimes it happens with single MKVs, so I think the problem is related but elsewhere at the same time).

Log: MKVBatchMultiplex.log

Used Files: https://mega.nz/folder/xsNBXAAY#JQmLV33OOpt4_j9uHlYPGQ

or original Downloaded sources: Subs: https://txt.erai-raws.info/?dir=Sub/2019/Summer/Isekai%20Cheat%20Magician/01%20~%2012/Italian MKV: https://nyaa.si/view/1208878

In this case in the command you will notice that the files are not identical to the originals, I thought the problem was in the names (and instead even renaming and changing the file structure the problem persists)

akai10tsuki commented 3 years ago

Hi,

Was able to reproduce working on it.

VegethB commented 3 years ago

I add a small problem that happened to me. This special symbol creates .mkv 0kb size (even if I put .mks from the output form). By removing the symbol from the name, everything works.

Command: C:\Users\MSI\Downloads\EXE\mkvtoolnix\mkvmerge.exe --ui-language it --output ^"Z:\Anime Backups\Fate Grand Order\S01\Owari ^& Pantaloni Rossi\[Owari-Pantaloni Rossi] Fate/Grand Order - Zettai Majuu Sensen Babylonia - 00v2 [96412CA0].mkv^" --no-audio --no-video --sub-charset 2:UTF-8 --language 2:it --track-name ^"2:Owari ^& Pantaloni Rossi^" --default-track 2:yes ^"^(^" ^"G:\_torrent\_Anime-Serie\Fate\[Owari-Pantaloni Rossi] Fate/Grand Order - Zettai Majuu Sensen Babylonia\[Owari-Pantaloni Rossi] Fate/Grand Order - Zettai Majuu Sensen Babylonia - 00v2 [96412CA0].mkv^" ^"^)^" --title ^"[Owari-Pantaloni Rossi] Fate/Grand Order - Zettai Majuu Sensen Babylonia - 00v2^"

akai10tsuki commented 3 years ago

HI,

New developer version.

  1. First issue was the handling of the tracks names. Any name not edited should be preserved. It was accessing null pointers.
  2. The special characters/symbols is a problem with the Windows 10 console encoding not been UTF-8 compliant. The commands are executed in a sub-process that launches a console in the background to make it easy to capture the output the console is launched in text mode so any special symbol is translated to text this changes the name and the files are not found. Now the console launches in binary mode and the names should not go through any translation. This forces the output to be read one character at a time which complicates the handling of the lines etc...

https://github.com/akai10tsuki/mkvbatchmultiplex/releases/download/v2.1.0b1.dev3/MKVBatchMultiplex-2.1.0b1.dev3-iss-AMD64.exe

Hope this solves the problem please test.

VegethB commented 3 years ago

Perfect 👍. Finished 2 batches that didn't work before and now yes. The special symbol also worked. Thanks as usual for the support

VegethB commented 3 years ago

Again it doesn't work. Always with .ass.

Command: C:\Users\MSI\Downloads\EXE\mkvtoolnix\mkvmerge.exe --ui-language it --output ^"G:\Backup Anime\Nuova cartella\DanMachi - Sword Oratoria 01.mkv^" --language 0:und --track-name 0:gdshsh --default-track 0:yes --display-dimensions 0:1920x1080 --language 1:ja --track-name 1:JPN --default-track 1:yes --sub-charset 2:UTF-8 --language 2:en ^"^(^" ^"G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv^" ^"^)^" --language 0:it --track-name 0:gsga --default-track 0:yes ^"^(^" ^"Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass^" ^"^)^" --title ^"[ApachePrime] DanMachi - Sword Oratoria 01^" --track-order 0:0,0:1,1:0,0:2

Ass: https://mega.nz/folder/xsNBXAAY#JQmLV33OOpt4_j9uHlYPGQ

Log: ``` 2021-01-07 17:06:00,242 INFO root MAI0001: Start Logging. 2021-01-07 17:08:28,599 DEBUG vsutillib.pyqt.classes.QOutputTextWidget OTW0003: Command looks ok. 2021-01-07 17:08:31,038 DEBUG vsutillib.pyqt.classes.QOutputTextWidget OTW0003: Command looks ok. 2021-01-07 17:08:31,248 DEBUG vsutillib.pyqt.classes.QOutputTextWidget OTW0003: Checking files... 2021-01-07 17:08:31,251 DEBUG vsutillib.pyqt.classes.QOutputTextWidget OTW0003: Generating Commands... 2021-01-07 17:08:31,358 DEBUG vsutillib.media.classes.MediaFileInfo MFI0001: Structure equality test between [G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv] and [G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv] 2021-01-07 17:08:31,359 DEBUG vsutillib.media.classes.MediaFileInfo MFI0002: FORMAT: Matroska 2021-01-07 17:08:31,359 DEBUG vsutillib.media.classes.MediaFileInfo MFI0012: Structure found ok. 2021-01-07 17:08:31,359 DEBUG vsutillib.mkv.classes.verifystructure VFS0005: Structure seems ok. Source: G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv Base Source: G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv 2021-01-07 17:08:31,409 DEBUG vsutillib.media.classes.MediaFileInfo MFI0001: Structure equality test between [Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass] and [Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass] 2021-01-07 17:08:31,409 DEBUG vsutillib.media.classes.MediaFileInfo MFI0002: FORMAT: None 2021-01-07 17:08:31,410 DEBUG vsutillib.media.classes.MediaFileInfo MFI0012: Structure found ok. 2021-01-07 17:08:31,410 DEBUG vsutillib.mkv.classes.verifystructure VFS0005: Structure seems ok. Source: Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass Base Source: Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass 2021-01-07 17:08:31,411 DEBUG vsutillib.pyqt.classes.QOutputTextWidget OTW0003: 1. Source: ['G:\\_torrent\\_HEVC-Conv\\DanMachi - Sword Oratoria\\DanMachi - Sword Oratoria 01.mkv', 'Z:\\Sottotitoli Backup\\Netflix\\Sword Oratoria\\ass\\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass'] Destination: G:\Backup Anime\Nuova cartella\DanMachi - Sword Oratoria 01.mkv Structure looks Ok. 2021-01-07 17:08:32,752 DEBUG vsutillib.media.classes.MediaFileInfo MFI0001: Structure equality test between [G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv] and [G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 02.mkv] 2021-01-07 17:08:32,752 DEBUG vsutillib.media.classes.MediaFileInfo MFI0002: FORMAT: Matroska 2021-01-07 17:08:32,752 DEBUG vsutillib.media.classes.MediaFileInfo MFI0012: Structure found ok. 2021-01-07 17:08:32,752 DEBUG vsutillib.mkv.classes.verifystructure VFS0005: Structure seems ok. Source: G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 02.mkv Base Source: G:\_torrent\_HEVC-Conv\DanMachi - Sword Oratoria\DanMachi - Sword Oratoria 01.mkv 2021-01-07 17:08:32,833 DEBUG vsutillib.media.classes.MediaFileInfo MFI0001: Structure equality test between [Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E01.WEBRip.Netflix.it.ass] and [Z:\Sottotitoli Backup\Netflix\Sword Oratoria\ass\Sword.Oratoria_.Is.It.Wrong.to.Try.to.Pick.Up.Girls.in.a.Dungeon_.On.the.Side.S01E02.WEBRip.Netflix.it.ass] 2021-01-07 17:08:32,834 DEBUG vsutillib.media.classes.MediaFileInfo MFI0002: FORMAT: None 2021-01-07 17:08:32,834 DEBUG vsutillib.media.classes.MediaFileInfo MFI0004: Number of tracks mismatched 0 - 1 2021-01-07 17:08:32,834 DEBUG vsutillib.media.classes.MediaFileInfo MFI0013: Structure not ok. ```

Windows 10 x64 MKVToolNix GUI 52.0.0 (and 51 / 48).

akai10tsuki commented 3 years ago

New developer version:

In the subs provided I found that only the first file is UTF-8 with BOM the others don't have BOM which make them different. When checking the structure the first file generate no track information the others generate one track so the structure check fails. Now the program will check for known suffixes used for the text files that mkvtoolnix supports and will ignore any track information. If the files are not mixed i.e. All with BOM or all without BOM the program worked fine.

The content of the files are not important. I remove the BOM and it works then added a BOM in another set of files it failed the check. (Hope this is not to technical.)

https://github.com/akai10tsuki/mkvbatchmultiplex/releases/download/v2.1.0b1.dev4/MKVBatchMultiplex-2.1.0b1.dev4-iss-AMD64.exe

Please test.

VegethB commented 3 years ago

I hadn't thought about the BOM ... I know it (Big Endian, Little Endian). Probably (nay, definitely) it's due to SubtitleEdit (which I use to convert .vtt to .ass), it will save .ass with UTF8 instead of UTF8-BOM. Then since the .vtt have no styles (no fonts, nothing at all) I only open the first .ass (ep1) I insert the minimum parameters to make those subs play well with that video track and save the .ass file from Aegisub (aegisub works with UTF8-BOM, so if the file is UTF8 it is converted to UTF8-BOM), then I open the remaining ep's with notepad++ and copy and paste the "new" part of the styles section of the .ass. The problem is that when I save (notepad++) it leaves UTF8. So from now on I will force BOM saves from Notepad++.

Anyway, I gave it a try. It worked without problems 👍.

The test was done with the files as they were passed (1 with BOM and the rest without BOM). Now I'm finishing another set of .ass (OCR conversion> .srt> .ass) and see what comes out if I try to mux them (this will take me a while). Thanks as usual for the support

akai10tsuki commented 3 years ago

Hi,

Did you test the original files without any changes? The program should work now either way mixed or not. There should be no need to set or remove the BOM so the program can function.

VegethB commented 3 years ago

Did you test the original files without any changes?

Yes