• AnyStream is having some DRM issues currently, Netflix is not available in HD for the time being.
    Situations like this will always happen with AnyStream: streaming providers are continuously improving their countermeasures while we try to catch up, it's an ongoing cat-and-mouse game. Please be patient and don't flood our support or forum with requests, we are working on it 24/7 to get it resolved. Thank you.

Discussion How to download Crunchyroll and what you need...

tectpro

Translator (ms_MY)
Thread Starter
Joined
Feb 27, 2011
Messages
1,330
Likes
824
Hello everyone,


Since several people have been asking how to download Crunchyroll videos, I created this little tutorial.
Please note that this has been tested with Windows.

No support is provided here, for the tools listed.
Usage at your own risk!
IMPORTANT: The usage of a VPN may cause issues.



PLEASE PROCEED DIRECTLY TO THIS POST WHICH CONTAINS ALL THE LATEST UPDATES AND REVISED INSTRUCTIONS FOR THE INITIAL SETUP.



THE FOLLOWING INFORMATION IS RETAINED FOR LEGACY PURPOSES AND TO PREVENT ANY CONFUSION OR MISUNDERSTANDINGS IN FUTURE READINGS OF THIS MESSAGE AS IT WAS ORIGINALLY COMPOSED.

What you need.

1. Crunchyroll account / subscription - Necessary to download many of the videos

2. FFMPEG - can be found here:
Code:
 https://github.com/yt-dlp/FFmpeg-Builds/releases
IMPORTANT - Please use FFMPEG from that link.
More info can be found here
Code:
 https://github.com/yt-dlp/FFmpeg-Builds

3. yt-dlp - can be found here:
Code:
 https://github.com/yt-dlp/yt-dlp/releases

4. Your favourite internet browser - Here used Chrome.

5. Link Grabber for Chrome - You can use any other preferred link grabber.

6. Creation of batch files, folders and config.


First steps after downloading the above tools

Once all the tools have been downloaded or installed in the browser.

Please create a folder on your HDD called: yt-dlp.

Within that folder create the folders: batch, cache, downloads, ffmpeg

Extract the yt-dlp.exe into the folder yt-dlp.

Extract the content of the bin in the downloaded ffmpeg archive into the ffmpeg folder that has been created in the yt-dlp folder.

The files in that folder should be as per the below screenshot.

upload_2023-3-3_20-26-12.png


UPDATE:
For the latest complete update of the menu and the config please check here:

The download_batch_file.bat, download_url.bat, check_yt-dlp_update.bat and check_subtitle_language.bat are no longer needed as they are integrated in the menu.
You can go to step CONIFG.TXT.
I am going to leave the creation of the before-mentioned bat files in the tutorial.



ATTENTION: Copy the code 1:1, do not change any of the code if you do not know what it does, as it might render it useless or introduce errors during execution of the files.


Next, create a file download_batch_file.bat in the yt-dlp folder, copy and paste the below code via notepad or notepad++ and save the bat file.


Code:
@ECHO OFF
ECHO ======================================================================================================================
ECHO.
SET /P BATCH="[Enter the name of batch file to download ] "
ECHO.
ECHO ======================================================================================================================
ECHO.
yt-dlp.exe --config-locations "config.txt" --batch-file "../%BATCH%"
ECHO.
ECHO =====================================================================================================================
ECHO.
ECHO Done!
PAUSE
EXIT


Next, create a file called download_url.bat in the in the yt-dlp folder, copy and paste the below code via notepad or notepad++ and save the bat file.


Code:
@ECHO OFF
ECHO ======================================================================================================================
ECHO.
SET /P URL="[Enter the video URL of the video to download] "
ECHO.
ECHO ======================================================================================================================
ECHO.
yt-dlp.exe --config-locations "config.txt" "%URL%"
ECHO.
ECHO ======================================================================================================================
ECHO.
ECHO Done!
PAUSE
EXIT


CONIFG.TXT
Create a file called config.txt in the yt-dlp folder.

Copy and paste the code below into the config.txt and save it.

Please note that comments have been added to the config for easier understanding, please do not remove any of the #s in the file. The only # than can be removed is the one in front of #--verbose.


Code:
#Location of the ffmpeg binary
--ffmpeg-location "ffmpeg"

# Print various debugging information
#--verbose

#Suppress HTTPS certificate validation
--no-check-certificate

#Do not bypass geographic restriction via faking X-Forwarded-For HTTP headerDo not bypass geographic restriction via faking X-Forwarded-For HTTP header
--no-geo-bypass

#Write subtitle file
--write-subs

#Languages of the subtitles to download (can be regex) or "all" separated by commas, e.g.
#--sub-langs "en.*,ja". You can prefix the language code with a "-" to exclude it from
#the requested languages, e.g. --sub-langs all,-live_chat. Use --list-subs for a list of available language tags
--sub-langs en-US

#Limit the filename length (excluding extension) to the specified number of characters
--trim-filenames 150

#Write video description to a .description file
--write-description

#Subtitle format; accepts formats preference, e.g. "srt" or "ass/srt/best"
--sub-format ass

#Number of fragments of a dash/hlsnative video that should be downloaded concurrently (default is 1)
-N 5

#Maximum download rate in bytes per second
--limit-rate 3.2M

#Video format code
-f "b"

#The paths where the files should be downloaded.
-P "downloads"

#Output filename template
-o "%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s"

#The name of the browser to load cookies from.
--cookies-from-browser chrome

#Containers that may be used when merging formats, separated by "/", e.g. "mp4/mkv".
#Ignored if no merge is required. (currently
#supported: avi, flv, mkv, mov, mp4, webm)
#--merge-output-format MKV
#Remux the video into another container if necessary
--remux-video mkv

#Embed subtitles in the video (only for mp4, webm and mkv videos)
--embed-subs

#default subtitle
--ppa "EmbedSubtitle:-disposition:s:0 default"

#Embed metadata to the video file. Also embeds chapters/infojson if present unless
#--no-embed-chapters/--no-embed-info-json are used (Alias: --add-metadata)
--embed-metadata

#Do not set any "purl" in the video metadata
--parse-metadata ":(?P<meta_purl>)"

#Do not set any "comment" in the video metadata
--parse-metadata ":(?P<meta_comment>)"

#Do not set any "description" in the video metadata
--parse-metadata ":(?P<meta_description>)"

#Do not set any "title" in the video metadata
--parse-metadata ":(?P<meta_title>)"

#Do not set any "episode_id" in the video metadata
--parse-metadata ":(?P<meta_episode_id>)"

#Do not set any "date" in the video metadata
--parse-metadata ":(?P<meta_date>)"

#Do not set any "season_number" in the video metadata
--parse-metadata ":(?P<meta_season_number>)"

#Do not set any "episode_sort" in the video metadata
--parse-metadata ":(?P<meta_episode_sort>)"

#Do not embed the infojson as an attachment to the video file
--no-embed-info-json

#Do not retrieve video comments unless the extraction is known to be quick
--no-write-comments

#Do not embed chapters/--no-embed-info-json
--no-embed-chapters

#Keep the intermediate video file on disk after post-processing
#--keep-video



What does the config file do?

It provides settings for the files that will be downloaded such as the naming convention, video quality, subtitle language etc.
The naming of the files is as per config and will create a subfolder in the downloads folder with the name of the content, the name of the season and the name of the episode.
Files will be saved as MKV with subtitles and certain metadata embedded as per the config file above.

You can adjust the config file to your needs, information regarding the commands can be found here
Code:
 https://github.com/yt-dlp/yt-dlp#usage-and-options


Once all files and folders have been created your yt-dlp folder should look like this:


upload_2023-3-3_20-26-30.png
Please note the folder called "cache" is no longer required, the standard cache folder of yt-dlp is used now as problems have been reported.



Now you’re ready to download depending on how you want to download.

If you go by URL, you just need to copy the URL to download double click on the download_url.bat and paste the URL, hit enter and wait till it’s finished.

Kindly note that you need to log in to Crunchyroll with your browser for the cookies to be created before you can download content.

If you prefer to download in batches open your preferred browser.
Go to the content that you want to download and copy the links into a txt file.
Save the txt file in the folder batch, for example, my_favourite.txt
After you’re done double click on download_batch_file.bat and enter the name of the batch file that you want to download in this example my_favourite.txt

To make it easier with copying links use Link Grabber or your favorite link extraction tool.
Extract the links you need and save them in a txt file in the folder batch.
Remember the name of the file as it is needed when you double-click on the download_batch_file.bat

Please find below additional batch file contents for updating yt-dlp and for checking available subtitle languages.

Create a file called check_yt-dlp_update.bat copy and paste the code via notepad/++ into the file and save it


Code:
@ECHO OFF
ECHO ======================================================================================================================
ECHO.
yt-dlp --update
ECHO.
ECHO ======================================================================================================================
ECHO.
PAUSE
EXIT


Create a file called check_subtitle_language.bat copy and paste the code via notepad/++ into the file and save it.


Code:
@ECHO OFF
ECHO ======================================================================================================================
ECHO.
SET /P URL="[Enter the video URL to check available subtitle languages] "
ECHO.
ECHO ======================================================================================================================
ECHO.
yt-dlp.exe --verbose --no-check-certificate --no-geo-bypass --list-subs --cookies-from-browser chrome "%URL%"
ECHO.
ECHO ======================================================================================================================
ECHO.
ECHO Done!
PAUSE
EXIT
 
Last edited:
Something seems off ...
Code:
======================================================================================================================

https://www.crunchyroll.com/de/watch/GK9U3X8GE/sanjis-mutation--the-two-arms-in-crisis

======================================================================================================================

[Cookies] Extracting cookies from chrome
[Cookies] Extracted 45 cookies from chrome
[generic] Extracting URL:
ERROR: [generic] None: '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube

======================================================================================================================

Done!
Press any key to continue . . .

What am I missing?


EDIT: Found it ... had to remove the "/P " from line 4
Also in the download_batch_file
Then it works ... and how it works ... that's WAY faster than the Fab competition.:eek:
 
Last edited:
Something seems off ...
Code:
======================================================================================================================

https://www.crunchyroll.com/de/watch/GK9U3X8GE/sanjis-mutation--the-two-arms-in-crisis

======================================================================================================================

[Cookies] Extracting cookies from chrome
[Cookies] Extracted 45 cookies from chrome
[generic] Extracting URL:
ERROR: [generic] None: '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube

======================================================================================================================

Done!
Press any key to continue . . .

What am I missing?


EDIT: Found it ... had to remove the "/P " from line 4
Also in the download_batch_file
Then it works ... and how it works ... that's WAY faster than the Fab competition.:eek:

Thank you @cartman0208
I will have a look at it.
Yes, it is indeed fast and keeps the subtitle formatting intact
 
Thank you @cartman0208
I will have a look at it.
Yes, it is indeed fast and keeps the subtitle formatting intact

Regarding subtitles ... I changed two other settings:
Code:
--sub-langs all
better to have all subtitles than missing some ;)

Code:
--sub-format best
in case there is no ASS available
 
Regarding subtitles ... I changed two other settings:
Code:
--sub-langs all
better to have all subtitles than missing some ;)

Code:
--sub-format best
in case there is no ASS available

Yes, there are many adjustments possible ;)
 
@cartman0208
You may want to check the embedded subtitles info via mediainfo.
As the config file sets one subtitle as default since it was meant for one subtitle.

Code:
#default subtitle
--ppa "EmbedSubtitle:-disposition:s:0 default"
 
@cartman0208
You may want to check the embedded subtitles info via mediainfo.
As the config file sets one subtitle as default since it was meant for one subtitle.

Code:
#default subtitle
--ppa "EmbedSubtitle:-disposition:s:0 default"

Thanks.

EDIT: Forget what was posted here ... I had some misconfiguration
 
Last edited:
UPDATE:

For easier handling I created a menu.
Here some screenshots

Main Menu

upload_2023-3-4_10-50-33.png

Download via URL

upload_2023-3-4_10-50-42.png

Download via BATCH file will also show all the files in the batch folder, in case you forgotten the name of the batch file ;)

upload_2023-3-4_10-50-58.png

Check update for YT-DLP
upload_2023-3-4_10-52-35.png





Please create a file called download_menu.bat in the yt-dlp folder.

Copy and paste the below code into the newly created bat file via notepad or notepad++ and save it.
Once done you can double click the download_menu.bat to use the menu, which should make it a bit easier.

ATTENTION: Copy the code 1:1, do not change any of the code if you do not know what it does, as it might render the menu useless. Or introduce errors during execution of the menu.

Code:
ECHO OFF
CLS
:MENU
ECHO.
ECHO ...............................................
ECHO Download Crunchyroll
ECHO ...............................................
ECHO.
ECHO 1 - Download via URL
ECHO 2 - Download via BATCH file
ECHO 3 - Check update for YT-DLP
ECHO 4 - Check available Subtitle Languages
ECHO 5 - EXIT
ECHO.
SET /P M=Type 1, 2, 3, 4 or 5 then press ENTER:
IF %M%==1 GOTO URL
IF %M%==2 GOTO BATCH
IF %M%==3 GOTO UPDATE
IF %M%==4 GOTO SUBTITLE
IF %M%==5 GOTO EOF
ECHO.
ECHO %M% is not a valid input.
GOTO MENU
:URL
CLS
ECHO ...............................................
ECHO Download via URL
ECHO ...............................................
ECHO.
SET /P URL="[Enter the video URL of the video to download] "
yt-dlp.exe --config-locations "config.txt" "%URL%"
ECHO ...............................................
ECHO Done!
GOTO MENU
:BATCH
CLS
ECHO ...............................................
ECHO Download via BATCH file
ECHO ...............................................
ECHO.
ECHO Batch files in BATCH folder:
ECHO.
dir /B "batch"
ECHO.
ECHO ...............................................
ECHO.
SET /P BATCH="[Enter the name of batch file to download ] "
yt-dlp.exe --config-locations "config.txt" --batch-file "batch\%BATCH%"
ECHO.
ECHO ...............................................
ECHO Done!
GOTO MENU
:UPDATE
CLS
ECHO ...............................................
ECHO Check update for YT-DLP
ECHO ...............................................
ECHO.
yt-dlp --update-to nightly
GOTO MENU
:SUBTITLE
CLS
ECHO ...............................................
ECHO Check available Subtitle Languages
ECHO ...............................................
ECHO.
SET /P URL="[Enter the video URL to check available subtitle languages] "
yt-dlp.exe --verbose --no-check-certificate --no-geo-bypass --list-subs --cookies-from-browser chrome "%URL%"
ECHO ...............................................
ECHO Done!
GOTO MENU

FYI the other bat files are no longer needed with this menu.
There is no need to delete them if you still want to use them.
 
Last edited:
Thank you to everyone who provided feedback.

The link to FFMPEG has been changed to the special FFMPEG version to be used with yt-dlp (see 1st post).

Here are some applied changes regarding the feedback:
Adjusted the config to set a maximum download rate in bytes per second.
Changed the simultaneous connections from 8 to 5.
 
Thank you again for your input and feedback.

The cache folder has been removed from the config and the standard YT-DLP folder is now used. As some reported problems.

New:
The menu is now updated with number selection when batch download is selected - You see numbers in front of your batch file and only need to input that number.
Currently, 99 files are supported (no plan of supporting more). This should be faster compared to input the full name of the batch file.

The menu now also supports checking the YT-DLP version that is on your machine and the version online, before you perform an update via the menu.

Possibility to clear the YT-DLP cache from the menu. Please use this only when needed. Which should be rare.

For the new menu please copy and paste the below code into a new bat file or overwrite the old code in your existing bat file.
Note: You can create a new bat file to test the menu before switching.

Code:
ECHO OFF
CLS
:MENU
ECHO.
ECHO ...............................................
ECHO Download Crunchyroll
ECHO ...............................................
ECHO.
ECHO 1 - Download via URL
ECHO 2 - Download via BATCH file
ECHO 3 - Check available Subtitle Languages 
ECHO 4 - Check update for YT-DLP
ECHO 5 - Check YT-DLP version on your system and current version available online
ECHO 6 - Clear the YT-DLP cache folder
ECHO 7 - EXIT
ECHO.
SET /P M=Type 1, 2, 3, 4, 5, 6 or 7 then press ENTER:
IF %M%==1 GOTO URL
IF %M%==2 GOTO BATCH
IF %M%==3 GOTO SUBTITLE
IF %M%==4 GOTO UPDATE
IF %M%==5 GOTO VERSION
IF %M%==6 GOTO CLEAR
IF %M%==7 GOTO EOF
ECHO.
ECHO %M% is not a valid input.
GOTO MENU
:URL
CLS
ECHO ...............................................
ECHO Download via URL
ECHO ...............................................
ECHO.
SET /P URL="[Enter the video URL of the video to download] "
yt-dlp.exe --config-locations "config.txt" "%URL%"
ECHO ...............................................
CLS
ECHO Done.
GOTO MENU
:BATCH
CLS
ECHO ...............................................
ECHO Download via BATCH file
ECHO ...............................................
ECHO.
@echo off
CLS
setlocal enabledelayedexpansion
:input
set count=100
for /f "delims=" %%a in ('dir /b batch') do (
  set /a count+=1
  echo !count:~-2!] %%a
)
set /a countMax=count-100
set "countNr=%count:~-2%"
ECHO.
<nul set /p "=Enter the number of the batch file to use: (01...%countNr%, 00 for Menu): "
choice /c 1234567890 /n >nul
set first=%errorlevel:~-1%
<nul set /p "=%first%"
choice /c 1234567890 /n >nul
echo %errorlevel:~-1%
set ch=%first%%errorlevel:~-1%
REM echo that was %ch%
set /a line=1%ch%-101
if "%ch%" == "00" goto escape
if %ch% gtr %countMax% echo bad input&goto :input
for /f "delims=" %%a in ('dir /b batch^|more +%line%') do set "file=%%a"&goto :cont
:cont
ECHO.
echo You selected: %ch% - %file%
ECHO.
echo Task started for batch file: %file%.
ECHO.
yt-dlp.exe --config-locations "config.txt" --batch-file "batch\%file%"
GOTO MENU
:escape
echo you choosed '00' for exit.
GOTO MENU
:UPDATE
CLS
ECHO ...............................................
ECHO Check update for YT-DLP
ECHO ...............................................
ECHO.
yt-dlp --update-to nightly
GOTO MENU
:SUBTITLE
CLS
ECHO ...............................................
ECHO Check available Subtitle Languages
ECHO ...............................................
ECHO.
SET /P URL="[Enter the video URL to check available subtitle languages] "
yt-dlp.exe --verbose --no-check-certificate --no-geo-bypass --list-subs --cookies-from-browser chrome "%URL%"
ECHO ...............................................
ECHO Done.
GOTO MENU
:VERSION
CLS
ECHO ...............................................
ECHO Check YT-DLP version on your system
ECHO and current version available online
ECHO ...............................................
ECHO.
yt-dlp --update
GOTO MENU
:CLEAR
CLS
ECHO ...............................................
ECHO Clear the YT-DLP cache folder
ECHO ...............................................
ECHO.
yt-dlp --rm-cache-dir
GOTO MENU

As mentioned in the 1st post.
You can adjust the config file to your needs, information regarding the commands can be found here
Code:
 https://github.com/yt-dlp/yt-dlp#usage-and-options
 
Thank you for your feedback.
Here is some information and updates regarding the feedback.

1. As mentioned you can change settings in the config.txt but should remember to test the changes done before loading in batches for example.

2. The download speed is slow.
The previous update mentioned that there had been changes to the config.txt regarding speed and connections, you can change them to your needs. Please do so in moderation. Changing these values might come with drawbacks.

3. When yt-dlp uses no re-container option it will not download the same Episode again when using batch download.
That this is correct. To my understanding, yt-dlp will check the file that is in that folder/location if the file does not exist, for example, star.mp4 but star.mkv, yt-dlp will redownload the start.mp4.
The config.txt has been updated regarding this with
Code:
#Keep the intermediate video file on disk after post-processing
#--keep-video
Simply remove the # in front of
Code:
--keep-video
This should solve the problem and keep the mp4. Kindly note that this will use more space on your disk.

4. Please always make sure that you have enough space on the disc that you are going to download.
The files are usually around 1.5 GB so downloading 12 episodes needs 18GB space, if you going to keep the intermediate files (mp4) too it will be double, roughly 36GB.
 
ATTENTION: Important update to the config

Apparently there can be some episodes that have extreme long file names.
To avoid error messages and unsuccessful downloads below option has been added and limits to 150 characters.

Code:
#Limit the filename length (excluding extension) to the specified number of characters

--trim-filenames 150

You might increase the number if you need to, but be careful and always test settings that you changed.
 
how can you remove special characters from filename like : in windows
Any example for a episode?

According to the help in the link mentioned way at the beginning, you might want to try this one.

Code:
In some cases, you don't want special characters such as 中, spaces,
 or &, such as when transferring the downloaded filename to a Windows system 
or the filename through an 8bit-unsafe channel. 
In these cases, add the --restrict-filenames flag to get a shorter title.

Other than that, once the file is downloaded you might want to use FileBot to rename the file.
 
Last edited:
once the file is downloaded
The issue might be that it can't even create the file since these charakters are forbidden. As such, you don't have any file to rename in the first place.
I haven't used it till now, so it is only a guess, but I would say that this was the reason for eint3 asking that.
 
Just as tectpro showed in the code:
add
Code:
--restrict-filenames
to the config file
Oops, haven't read the line that far 😓
So "other than that" is probably meant to be for other stuff than restricted characters? In that case, I never said anything.
 
Back
Top