hama3254 / Crunchyroll-Downloader-v3.0

Downloader for Crunchyroll
837 stars 110 forks source link

Subtitles with wrong labels after merging mkv #290

Closed georgenv closed 3 years ago

georgenv commented 3 years ago

Hi, I was trying out the tool and I noticed that some episodes are being downloaded with incorrect subtitles.

For example: the content of a subtitle is in Portuguese, but its ID in Media Player indicates that it's supposed to be in English.

image

image

My settings: image

image

image

image

PS: I don't know if this is happening with others series or if it's a specific issue with this one.

Could you, please, fix this issue? Thanks for the tool, it's really amazing!

hama3254 commented 3 years ago

That an interesting error. I need to take a closer look later to see where stuff get mixed up, the only theory i have right now would be an issue with the hybrid mode since the subtile grabber is to specific to mix things up (it would most likely fail completely instead of something like this)

hama3254 commented 3 years ago

i have done some tests and can not find any issues. grafik

georgenv commented 3 years ago

I've performed more tests and realised that it is an intermittent problem. The same episode downloaded multiple times, sometimes it is correct and sometimes it is incorrect.

I've forgotten to mention the following information:

  1. I'm downloading 5 episodes at the same time
  2. I only tested with hybrid mode activated
  3. the selection of subtitle languages apparently contributes to the error happening.
hama3254 commented 3 years ago

i downloaded episode 1 to 33 with your settings and i did not find any issue. Please try another player.

georgenv commented 3 years ago

Hi,

I have performed more tests today and the issue is still happening. This time I used VLC player just like you, and also the same settings from the 1st message.

image

image

What's interesting is that this problem occurs randomly. I had to download the same batch of episodes 3 times to be able to reproduce the problem.

Finally, I used MKV Cleaver to separate the subtitles from the video file and checked their content. I have noticed that the Portuguese subtitle came duplicated inside the mkv (see the file names) and one of them was labeled as English.

image

hama3254 commented 3 years ago

Hi,

I have performed more tests today and the issue is still happening. This time I used VLC player just like you, and also the same settings from the 1st message.

image

image

Thanks for checking, now we know for sure the file has some issue.

What's interesting is that this problem occurs randomly. I had to download the same batch of episodes 3 times to be able to reproduce the problem.

That's really interesting since the downloader is "dumb" and does every time the same that's makes the only possible solution that the Data from Crunchyroll is changing.

Finally, I used MKV Cleaver to separate the subtitles from the video file and checked their content. I have noticed that the Portuguese subtitle came duplicated inside the mkv (see the file names) and one of them was labeled as English.

image

So it's definitely that the subs are the wrong file.

I try later again to find the issue.

hama3254 commented 3 years ago

i made a debug version since i'm still unable to reproduce the issue. The Copy log to clipboard now includes both the original urls and the local paths that ffmpeg uses and the ass files now contain the original url to verify it's origin after extraction. grafik

georgenv commented 3 years ago

I'm using the version 3.8-Beta-U7 and I have noticed this option in the GUI. I tested the application again and I have got that issue.

image

image

I have copied the logs from this episode and one thing caught my attention:

09/06/2021 22:27:05 Duration: N/A, bitrate: N/A 09/06/2021 22:27:05 Stream #2:0: Subtitle: ass 09/06/2021 22:27:05 Input #3, ass, from 'G:\Crunchyroll Downloader\REBORN!\S01\CRD-Temp-File-JTdFROZREeETLCaH\CRD-Temp-File-TScFJIcFbEJLZUSf.txt': 09/06/2021 22:27:05 Duration: N/A, bitrate: N/A 09/06/2021 22:27:05 Stream #3:0: Subtitle: ass 09/06/2021 22:27:05 Input #4, ass, from 'G:\Crunchyroll Downloader\REBORN!\S01\CRD-Temp-File-JTdFROZREeETLCaH\CRD-Temp-File-TScFJIcFbEJLZUSf.txt':

The application is using the same file as input for Streams 2 and 3 during the merging process.

Full logs: https://pastebin.com/UKAYr9nG

Hope this helps.

hama3254 commented 3 years ago

That's interesting, now i just need to figure out why that happens. The hybrid mode is a loop from 0 To InuputStreams.Count - 1 and if the input stream does not contain #EXT-X-VERSION:3, #EXT-X-VERSION:4 or #EXT-X-VERSION:5 then it get processed as subs which simply saves the String to a temp file and replaces the url with the local version DL_URL = DL_URL.Replace(InputURL(0), SubsFile). SubsFile should not be able to be the same path twice sind it's a random generated one and I hope 16 random chars should be enough to not get the same string twice. So i look at that after work again, now with more details to look for but I also would ask you if you could try the same thing with the debug version since it contains the original url and the local pat. https://github.com/hama3254/Crunchyroll-Downloader-v3.0/releases/tag/v3.8-Beta

georgenv commented 3 years ago

Sure! After work, I will test this version.

georgenv commented 3 years ago

Hi, again I was able to reproduce the issue, this time using the Debug version. Streams 3 and 4 have used the same .txt file.

Here the logs: https://pastebin.com/MKCF1tVW

hama3254 commented 3 years ago

Thanks for the logfile. I uploaded a version that should fix the issue even though i don't understand how that should happen. The input is ok just the output seems is wrong and seems like the random name generator gave the same name back a second time. I check for that now but it should have been highly unlikely the whole time. https://github.com/hama3254/Crunchyroll-Downloader-v3.0/releases/tag/v3.8-Beta

hama3254 commented 3 years ago

i assume the version worked so i close this now.