anidl / multi-downloader-nx

Downloader for Crunchyroll, Hidive, AnimeOnegai, and AnimationDigitalNetwork with CLI and GUI
MIT License
262 stars 42 forks source link

Request: Add audio and video length checking #471

Open DAREK0N opened 1 year ago

DAREK0N commented 1 year ago

I encountered an issue with RE: Zero whilst downloading. It's an older show on crunchy where the different dubs have different preroles. After muxxing all dubs together with the Japanese Video, the German and the English dub were out of sync with the Video.

My suggestion is that there could be a background check if the to be downloaded files are the same lenght and if that's not the case, throw an error/ warning like: "Audio and Video are different lengths/ out of sync: Press 'C' to Continue anyway or 'S' to skip"

Gordhen commented 1 year ago

Hi! Complementing the request, if the script also allowed to pass a custom delay to the track that would be awesome.

UnhealthyKraken commented 1 year ago

-750ms needed for English track when downloading Dual Audio (Jap & Eng) for One Piece. Currently doing this manually but would be great to have an option to sync up audio or enable a custom delay per track.

AnimeDL commented 1 year ago

Version 4.3.0 adds a new flag called --syncTiming which attempts to automatically sync the timing between multi-dub downloads. Please test it out and let me know how it goes!

@Gordhen @UnhealthyKraken @DAREK0N

Gordhen commented 1 year ago

Hi, thanks for following up on this request, I tested with the cli binaries for windows and linux and got the following error, there seems to be a problem with ffprobe. @AnimeDL

https://paste.ee/r/N2n42

command used

./aniDL --service crunchy --srz GRVNMG93Y --dlsubs es-419 --dubLang jpn spa-419 -q 0 -e 1 --syncTiming

AnimeDL commented 1 year ago

Hi, thanks for following up on this request, I tested with the cli binaries for windows and linux and got the following error, there seems to be a problem with ffprobe. @AnimeDL

https://paste.ee/r/N2n42

command used

./aniDL --service crunchy --srz GRVNMG93Y --dlsubs es-419 --dubLang jpn spa-419 -q 0 -e 1 --syncTiming

I included a static binary library for ffprobe so that it wouldn't be another dependency for the user to setup and install, but it appears that the static binary is missing for you, did any errors come up when you ran pnpm i?

Gordhen commented 1 year ago

I'm not sure what happened, I did the test with the prebuilt binaries. Just now I did the test by compiling myself and it worked, a delay was applied based on the duration of both audio tracks.

But the sync problem persisted, in this case the script adds a delay of 1961ms, but comparing manually the needed setting is ~1007ms. It seems that CR is adding/removing empty audio at the beginning of the episodes in this case.

https://i.imgur.com/aq3CH2l.png

I tried also with Dr Stone s1 (GYEXQKJG6), which has a small CrunchyRoll Originals intro in the Japanese version that is not in the Latin dub, the script adjusts the audio of the Japanese version perfectly to the video of the Latin version but the subtitles do not. I'm not sure if anything can be done with cases like the first one, those dead times in the audio tracks makes the problem more complex.

AnimeDL commented 1 year ago

Ah it looks like, the executable can't properly be included in the pre-built. I might have to have it has a dependency after all

Could I get the command you used for the first one to see if there is anything that can be done?

I might have an idea to fix the subtitles timing for crunchyroll, still not sure how I'll handle it for properly for hidive (without a lot of guesswork) though.

Gordhen commented 1 year ago

Of course, here are the commands for both cases

Log Horizon node index.js --service crunchy --srz GRVNMG93Y --dlsubs es-419 --dubLang jpn spa-419 -q 0 -e 1 --syncTiming

Dr Stone node index.js --service crunchy --srz GYEXQKJG6 --dlsubs es-419 --dubLang jpn spa-419 -q 0 -e 1 --syncTiming