hama3254 / Crunchyroll-Downloader-v3.0

Downloader for Crunchyroll
848 stars 109 forks source link

Crunchyroll-Downloader-v3.22 #941

Closed hama3254 closed 2 months ago

hama3254 commented 2 months ago

Due to changes to the API users now get promted to add there login credentials before the videos can be added. By defaul this will only be used for that session, a save option is avalible. grafik

IchYoIo commented 2 months ago
Hybrid Mode (image) ![Clip_5](https://github.com/hama3254/Crunchyroll-Downloader-v3.0/assets/166774426/e11532dc-1e9c-4a6e-b23e-f7d52ffab619)
ffmpeg (image) ![Clip_12](https://github.com/hama3254/Crunchyroll-Downloader-v3.0/assets/166774426/4c219a1c-826e-4c8e-bdfb-45f02f0820de)
hama3254 commented 2 months ago

@IchYoIo does it download anything at all with hybrid mode? there should be a lot before that part of your log like the whole hybrid mode part of it is missing it.

IchYoIo commented 2 months ago

@IchYoIo does it download anything at all with hybrid mode? there should be a lot before that part of your log like the whole hybrid mode part of it is missing it.

@hama3254 yes, only a few episodes crash at Hybrid Mode. With the new CR DL v3.22.2 I turn it back to ffmpeg and all episodes are downloading.

The log is 152 pages long, CR DL.docx

TaMaGo-TTV commented 2 months ago

@hama3254 kurze Frage zu FFmpeg und dem Hybrid Mode. Was genau ist der Unterschied und ist es normal, dass die Folgen mit dem hybrid Mode teilweise nur 600-800 MB groß sind, mit einer 8000k Bitrate? Oder liegt das an CR?

hama3254 commented 2 months ago

@TaMaGo-TTV Die datei sollte die selbe sein in beiden fällen, der Hybride Mode cached nur die daten (auf der festplatte) damit ffmpeg schneller drauf zugreifen kann. 8000k als bitrate ist normal aber mit 600-800 MB fehlt da eigentlich was, normale folgen (~24min) haben eher so 1,3GB.

TaMaGo-TTV commented 2 months ago

@TaMaGo-TTV Die datei sollte die selbe sein in beiden fällen, der Hybride Mode cached nur die daten (auf der festplatte) damit ffmpeg schneller drauf zugreifen kann. 8000k als bitrate ist normal aber mit 600-800 MB fehlt da eigentlich was, normale folgen (~24min) haben eher so 1,3GB.

Ja genau so kenn ich das nämlich auch. Die folgen sind aber tatsächlich normal abspielbar ohne Probleme... Vlt schaust du mal ob das bei dir auch so ist sonst sinds evt meine setting. Hab classroom of the elite Staffel 2 runtergeladen

hama3254 commented 2 months ago

@TaMaGo-TTV Ich kann jetzt kein problem finden, die größe passt bei mir. Es kann immer sein das teile fehlen (parr sekunden) bei netzwerk problemen, das wäre bei dem unterschied aber schon ganz schön viel, vorallem weil der Hybride Mode sogar versucht fehlgeschlagene downloads 1x zu wiederholen (für jedes fragment) grafik

hama3254 commented 2 months ago

@IchYoIo I don't see much wrong with the log, ffmpeg could not access the encryption key so it failed to process the cached data. This may be a random download issue, i see if i have to check the existence of the key file before the hybride mode starts with the video itself.

TaMaGo-TTV commented 2 months ago

@hama3254

Also hier erstmal alle settings:

(Der Download läuft durch meine VPN (Windscribe mit Standort Frankfurt))

Settings ![Screenshot 2024-04-28 190545](https://github.com/hama3254/Crunchyroll-Downloader-v3.0/assets/61699515/f4cd48ca-1c82-40d2-9a59-40602e7ef159) ![Screenshot 2024-04-28 190602](https://github.com/hama3254/Crunchyroll-Downloader-v3.0/assets/61699515/6c345dc1-b9b5-4fd2-a587-606e87db4956) ![Screenshot 2024-04-28 190607](https://github.com/hama3254/Crunchyroll-Downloader-v3.0/assets/61699515/87b79d2b-0570-4686-8bf0-1189128bbf3a)

Hab jetzt auch bishen mit der Bitrate und dem preset gespielt und das sind die ergebnisse

Screenshot 2024-04-28 202147

Hab das gleiche auch zb mit Overtake

Image ![Screenshot 2024-04-28 200012](https://github.com/hama3254/Crunchyroll-Downloader-v3.0/assets/61699515/108b7c7c-5433-48cf-a641-efd4bd98c942)

Die sache ist alle folgen funktionieren normal und beinhalten auch keine Fehler. Das ist so die sache die mich wundert.

LTech77 commented 2 months ago

@TaMaGo-TTV du hast Re-encoding an und codierst das ganze in h265 neu. Da ist es natürlich normal das die größe sinkt und nicht gleich bleibt.

TaMaGo-TTV commented 2 months ago

@TaMaGo-TTV du hast Re-encoding an und codierst das ganze in h265 neu. Da ist es natürlich normal das die größe sinkt und nicht gleich bleibt.

ayooo stimmt muss ich das dann am besten auf copy lassen oder wie?

LTech77 commented 2 months ago

@TaMaGo-TTV du hast Re-encoding an und codierst das ganze in h265 neu. Da ist es natürlich normal das die größe sinkt und nicht gleich bleibt.

ayooo stimmt muss ich das dann am besten auf copy lassen oder wie?

Ja auf -c copy stellen wenn du die Orginaldatei aus dem CR Stream haben möchtest.

TaMaGo-TTV commented 2 months ago

@TaMaGo-TTV du hast Re-encoding an und codierst das ganze in h265 neu. Da ist es natürlich normal das die größe sinkt und nicht gleich bleibt.

ayooo stimmt muss ich das dann am besten auf copy lassen oder wie?

Ja auf -c copy stellen wenn du die Orginaldatei aus dem CR Stream haben möchtest.

Da müsste ich mir mal den Quali unterschied anschauen, ob da sich optisch was verändert

hama3254 commented 2 months ago

Da müsste ich mir mal den Quali unterschied anschauen, ob da sich optisch was verändert

vermutlich nicht erkennbar, aber h265 kann problemlos mit 3000k noch genutzt werden ohne das ich was gemerkt habe.

es wird aber eher schlechter vorallem mit Hardware encodern wie nvec weil diese allgemein auf schnelligkeit ausgelegt sind.

Die sache ist alle folgen funktionieren normal und beinhalten auch keine Fehler. Das ist so die sache die mich wundert.

damit wäre der grund auch geklärt, encoding auf h265 mit schon begrenten daten von h264 mit 8000k bitrate (von CR) braucht einfach weniger als das limit von 8000k.

TaMaGo-TTV commented 2 months ago

@hama3254 @LTech77 Jo vielen dank

TaMaGo-TTV commented 2 months ago

@hama3254 okay mit copy hab ich jetzt das problem...

image

LTech77 commented 2 months ago

@TaMaGo-TTV Das liegt jetzt aber nicht am CRD. Entweder CR Problem oder dein Netzwerk.

Keiser04 commented 2 months ago

how you solve it?

image

Good morning, For my part I get this error when I try to download... I can download a maximum of 13 episodes, even if I download a full season of 24 episodes the software stops at 13. And then I have to reopen it 5/6 times before I can redownload the rest image

TaMaGo-TTV commented 2 months ago

@TaMaGo-TTV Das liegt jetzt aber nicht am CRD. Entweder CR Problem oder dein Netzwerk.

Ja dann bleibe ich bei x265 und 7k Bitrate, weil das geht aktuell bei mir

Edit: lag am Netzwerk aka meine VPN … heißt das dann ich, kann das, jetzt nur ohne VPN herunterladen?

Keiser04 commented 2 months ago

may do u now why is not working? @TaMaGo-TTV

how you solve it?

image

Good morning, For my part I get this error when I try to download... I can download a maximum of 13 episodes, even if I download a full season of 24 episodes the software stops at 13. And then I have to reopen it 5/6 times before I can redownload the rest image

TaMaGo-TTV commented 2 months ago

may do u now why is not working? @TaMaGo-TTV

how you solve it? image

Good morning, For my part I get this error when I try to download... I can download a maximum of 13 episodes, even if I download a full season of 24 episodes the software stops at 13. And then I have to reopen it 5/6 times before I can redownload the rest image

Nah sry bro, at this point I would just reinstall the programm and see if it works. If not ask hama

hama3254 commented 2 months ago

@Keiser04 this issue is most likely cause by your anti virus software, see #795.

Keiser04 commented 2 months ago

I did what it said but it only let me click on unzip (before it was like that) and now during the download of each chapter it comes out like that. @hama3254 image

hama3254 commented 2 months ago

@Keiser04 did you try all the suggestions from here : https://github.com/hama3254/Crunchyroll-Downloader-v3.0/issues/795#issuecomment-1666569666 ?

The issue is that curl as external library detects an certificate that is not signed by anyone trusted. The Internet is build on trusted entities to ensure that nobody impersonates a website or hooks into the connection. But anti virus software likes to do that. I can not say more to that, make sure to not use a VPN or Proxy and on Windows 10 and 11 the default Windows Defender is enough for most people (non commercial use).

TheWizard-maker commented 2 months ago

Hello @hama3254, I have also the same error pop-up. I could use the downloader without any error like this until the version 3.20.1 included. After that version I have regularly this pop up and the downloader skip the episode. I have read #795 since the beginning I desactivate my anti virus before using your downloader. Since 3.21 I have this error pop up even with my anti virus still desactivate so I assume it might be not related... I see that you suggest (#795) to activate "add insecure", can you explain what it is for ?

TheWizard-maker commented 2 months ago

And I have also very often the error "Invalid CR response" that I had almost never before 3.21

hama3254 commented 2 months ago

--insecure should disable the certificate checking which should make the issue go away. More about that can be found on the link above.

hama3254 commented 2 months ago

And I have also very often the error "Invalid CR response" that I had almost never before 3.21

That is a default error that i show if i have no idea what wrong, it is on a view spots so i would need to know at what point it happens.

TheWizard-maker commented 2 months ago

How can I help you ? From what I see, my usage of your downloader is always I download 1 full season and language per language. But now at the first or second language I have one of the 2 problems mentionned :

I am wondering why with exactly the same usage It was working very find until 3.20.1 with 3.22.1 Since several days I tried to use newest version and it is the same loop

hama3254 commented 2 months ago

How can I help you ? From what I see, my usage of your downloader is always I download 1 full season and language per language. But now at the first or second language I have one of the 2 problems mentionned :

i can not do long test, i fact i rarely do more that a view downloads to see how CR reacts to the changes. The downloader is not a mass download tool, i build it to download what you could watch. This means for me 12 episodes per day/session.

error message related to anti virus (The episode is skipped and the next one is downloaded)

the anti virus is just one option for curl issues (but the most likely), i just don't know enough for other causes.

Invalid CR response (the downloader stop completely)

this error message is pretty vage because i don't know why CR does not like the request this time.

I am wondering why with exactly the same usage It was working very find until 3.20.1 with 3.22.1 Since several days I tried to use newest version and it is the same loop

CR changed a lot on the background lately, just because the downloader look nearly the same i did quite some changes to keep up with CR.

  • Japanese Dub : works fine

  • English dub: 1 or more episodes skipped with white pop up error "System.Exeption.Error" or error "Invalid CR response"

  • I close and restart the downloader

  • English dub again : works fine for every episode

  • Espanol dub : 1 or more episodes skipped with white pop up error "System.Exeption.Error" or error "Invalid CR response"

That is just to much, the download is not build for that.

TheWizard-maker commented 2 months ago

Oh i was not aware of that usage ... before 3.20.1 download dub after dub with no error shown on the downloader. I hope no bug happened.

Regarding the 2 errors I have mentionned. Even if I download 12 episodes max and restart the downloader between each dubs I keep having those error. I wonder if it is not related to the new feature recently brought by crunhyroll like profil and so on

hama3254 commented 2 months ago

Even if I download 12 episodes max and restart the downloader between each dubs I keep having those error

if you just restart the downloader and you see the same as if you don't than this indicates that the issue is server side. This could be CR or cloudflare blocking something.

Keiser04 commented 2 months ago

i didn't disable the antivirus but i added the whole folder for the antivirus to ignore it. i opened all the fireware for the exe as well. also, i enabled the ignore insecure or something like that.

@Keiser04 did you try all the suggestions from here : #795 (comment) ?

The issue is that curl as external library detects an certificate that is not signed by anyone trusted. The Internet is build on trusted entities to ensure that nobody impersonates a website or hooks into the connection. But anti virus software likes to do that. I can not say more to that, make sure to not use a VPN or Proxy and on Windows 10 and 11 the default Windows Defender is enough for most people (non commercial use).

TheWizard-maker commented 2 months ago

Even if I download 12 episodes max and restart the downloader between each dubs I keep having those error

if you just restart the downloader and you see the same as if you don't than this indicates that the issue is server side. This could be CR or cloudflare blocking something.

When it fails, i restart downloader and it can works perfectly for all 12 episodes or it can fail again but not at the same moment. Something I have noticed, I have those issues when i am using Hybrid mode. I switch to ffmpeg and i every episodes are downloaded, for now i don't have the previous error anymore. But I see sometimes I have "status : token expired" but the episode is still downloaded with ffmpeg mode when it is skipped with hybrid mode with error message Does "status : token expired" a source of issues in the resulting file downloaded ?

Serpentstar commented 2 months ago

Generally Token expired means the login token that was generated when you started the program has been timed out, more than likely by CR themselves. How long (in minutes) does it typically take for you to download those 12 episodes? If you can find a baseline, it could be possible to cook in a cookie cleaning subroutine and then credential reauth.

Many web pages have timeout values set for the connections as a whole, not just as an inactivity timer. It helps the reduce server load from people who try to use an auto-clicker to keep a page open. I haven't had any issues at all, but I only download 3 or 4 episodes at a time.

hama3254 commented 2 months ago

When it fails, i restart downloader and it can works perfectly for all 12 episodes or it can fail again but not at the same moment.

So a restart fixes it sometimes but not always.

Something I have noticed, I have those issues when i am using Hybrid mode. I switch to ffmpeg and i every episodes are downloaded,

are we still talking about the curl errors ? or

for now i don't have the previous error anymore.

because curl error happen before the code even changes betweem ffmpeg and Hybrid Mode and neither uses curl.

But I see sometimes I have "status : token expired" but the episode is still downloaded with ffmpeg mode when it is skipped with hybrid mode with error message

This is just a debug/Info statement at the very beginning of the adding process. There should be no change based on the download mode since it only applys to the video file download not any API request.

Does "status : token expired" a source of issues in the resulting file downloaded ?

the full text should be Status: Token expired - refreshing and just indicates that the access_token the downloader has is more than 270 seconds old so it uses the refresh_token from CR to get an new access_token without using the login.

hama3254 commented 2 months ago

Generally Token expired means the login token that was generated when you started the program has been timed out, more than likely by CR themselves.

The token gets requested with the first download (with the login details) after starting and is valid for 300 seconds (5 min) and is used for up to 270 seconds.

it could be possible to cook in a cookie cleaning subroutine and then credential reauth.

since the cookies no longer matter with the switch api request due to the direct login i don't use any cookies.

TheWizard-maker commented 2 months ago

@hama3254 so if i have understood correctly all previous messages, you advise to use the downloader like this :

Serpentstar commented 2 months ago

since the cookies no longer matter with the switch api request due to the direct login i don't use any cookies.

I didn't mean cookies per-se but your answer covered what I was trying to get across.

Thanks.

hama3254 commented 2 months ago

@hama3254 so if i have understood correctly all previous messages, you advise to use the downloader like this :

* max 3-4 episodes (of course to be downloaded one by one and not all at the same time)

* restard downloader before next 3-4 episodes
  This is how you use the downloader and how we should use it because it is not a tool design to massive download

The 3-4 did not come from me, i do even less usually since i have more experimental version during development.

what works for you the best is some thing only you can figure out. I don't see any issue here with the downloader.