hama3254 / Crunchyroll-Downloader-v3.0

Downloader for Crunchyroll
843 stars 108 forks source link

Don't finish downloading #822

Closed Davis092 closed 10 months ago

Davis092 commented 10 months ago

Some videos don't finish downloading. They have a few seconds left at the end. Someone else happens?

For example:

https://www.crunchyroll.com/es-es/watch/G0DUNJ2WV/to-you https://www.crunchyroll.com/es-es/watch/GWDU8EZEX/sleepover https://www.crunchyroll.com/es-es/watch/G8WUNGVWP/the-hero-weeps

The last second is missing.

Thanks for all. ^^

hama3254 commented 10 months ago

This is more or less the same as #802. I was not able to find a solution for it back then since it is not a issue of the Downloader.

I however had a pretty stupid idea while checking your urls. While checking the frist two episodes i noticed that ffmpeg displays the correct time at the beginning

08.10.2023 11:05:19 Duration: 00:23:39.96, start: 0.101000, bitrate: 0 kb/s

but still ended the second short

08.10.2023 11:07:27 [out#0/matroska @ 00000269683493c0] video:1379456kB audio:22148kB subtitle:19kB other streams:0kB global headers:2kB muxing overhead: 0.051519% 08.10.2023 11:07:27 frame=33984 fps=267 q=-1.0 Lsize= 1402346kB time=00:23:37.41 bitrate=8104.9kbits/s speed=11.1x

so i checked the last file of the m3u8 playlist (segment 354 of 354) and it should be longer that it was. this made me check the next file which should not exist (segment 355 of 354?) since i used the last one but i found that it actually exists without being listed in the stream file.

This contaied the missing second for the frist episode.

i can add a check for an out of bounds segements with the hybrid mode but not with the default download.

Davis092 commented 10 months ago

Yep, is the same as #802.

hama3254 commented 10 months ago

i added v3.15.7 which looks for that missing file and uses it if avalible. please check if you find any unwanted issue with this change.

Davis092 commented 10 months ago

Thank you so much. Works. :D