Skip to content

Commit 86f8d8a

Browse files
committed
[Refactor] Working on README.md and DOCKER.md
1 parent 0ab5596 commit 86f8d8a

File tree

2 files changed

+157
-76
lines changed

2 files changed

+157
-76
lines changed

DOCKER.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# MergeCrunch
2+
3+
## What is MergeCrunch?
4+
5+
An application for easily download video content from Crunchyroll combining youtube-dl and mkvmerge. Build a fancy-mkv file with subtitles and fonts attached
6+
7+
## Features
8+
9+
- Choose between softsub or hardsub (no transcoding!)
10+
- Choose as you want to download: individual episode, several episodies or full series
11+
- Choose which quality you want to get (from 240p to 1080p)
12+
- On softsubbing, attach only one subtitle track or all subtitles track
13+
- On softsubbing, attach your own fonts to the mkv file
14+
- On softsubbing, warn if there are fonts missing
15+
- Spoof your user-agent and cookies file for logging with your account
16+
17+
## How to use this image?
18+
19+
Before starting, you must get your cookies file (to export your Crunchyroll authentication) and know which is your user agent (even if you haven't an account, just for bypassing Cloudflare).
20+
21+
To next, you must prepare a volume where you will place your future downloads. In this folder, you must put your cookies file too. The container path for the downloads will be /downloads
22+
23+
Additionally, you could prepare a volume where you will place custom fonts. (A warning appears while downloading a video when a font is missing). The container path for the fonts will be /fonts
24+
25+
### Examples
26+
27+
# For first time or receiving updates
28+
sudo docker pull beardoverflow/mergecrunch
29+
30+
# Example
31+
sudo docker run--rm -it \
32+
-v /home/beardoverflow/downloads:/downloads \
33+
-v /home/beardoverflow/.fonts:/fonts \
34+
beardoverflow/mergecrunch \
35+
-i https://www.crunch... \
36+
--ua 'PUT HERE YOUR USER AGENT' \
37+
-c /downloads/cookies.txt \
38+
-f 720p -s esES
39+
40+
### Configuration
41+
42+
-i Input single video URL or playlist URL
43+
-c Container path to the cookies file
44+
-x Renames the file appending its CRC32 hash at the end of filename
45+
-f Video quality. Accepted values: worst, 240p, 360p, 480p, 720p, 1080p, best
46+
-s Set the default subtitle track. Required on: --one, --hard. Accepted values: enUS, esES,esLA, frFR, itIT, ptBR, ptPT, deDE, arME, ruRU, jaJP
47+
--one On softsubing, it merges only the default subtitle track. If it absents, then all available subtitles track will be merged
48+
--hard Forces hardsubing, any subtitle track will be omitted
49+
50+
## How to get your cookies file? (For using your premium account)
51+
52+
Install cookies.txt extension in your browser
53+
54+
[Firefox](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/)
55+
56+
[Chrome](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg)
57+
58+
Enter to the Crunchyroll's website and press the extension's cookie button. Place the file in the same folder where you will put your downloads
59+
60+
## How to know your user agent? (For bypassing CloudFlare)
61+
62+
Ask to google from the same browser
63+
64+
https://www.google.com/search?q=what+is+my+user+agent
65+
66+
## Advance configuration / More information
67+
68+
At https://github.com/BeardOverflow/MergeCrunch
69+
70+
![](https://raw.githubusercontent.com/BeardOverflow/MergeCrunch/master/logo.png)
71+
72+
*Update at Mar 20, 2019*

README.md

+85-76
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,106 @@
11
![](/logo.png)
22

33
***
4+
## What is MergeCrunch?
45

5-
## Description
6+
An application for easily download video content from Crunchyroll combining youtube-dl and mkvmerge. Build a fancy-mkv file with subtitles and fonts attached.
67

7-
MergeCrunch is a small bash script (/ironic off) that combines youtube-dl and mkvmerge for getting anime.
8+
## Docker image
89

9-
The main feature is to generate a pretty mkv file with all availables soft-subtitles from **Crunchyroll** site and after required fonts are attached from fontconfig.
10+
==This is the recommended way to use this application==
1011

11-
Now support to premium users!!
12+
Find this project on DockerHub. Its latest release is working fully at March 20th, 2019
1213

13-
Now support to playlist URLs and playlist selection!!
14+
**Zero-configuration, for any operating system (Windows, MacOS and Linux). Just pull and run**
1415

15-
Now support to cookies file!!
16+
More information at https://hub.docker.com/r/beardoverflow/mergecrunch
1617

17-
Now support to spoof your location!!
18+
## Features
1819

19-
Now support to spoof your user-agent!!
20+
- Choose between softsub or hardsub (no transcoding!)
21+
- Choose as you want to download: individual episode, several episodies or full series
22+
- Choose which quality you want to get (from 240p to 1080p)
23+
- On softsubbing, attach only one subtitle track or all subtitles track
24+
- On softsubbing, attach your own fonts to the mkv file
25+
- On softsubbing, warn if there are fonts missing
26+
- Spoof your user-agent and cookies file for logging with your account
2027

21-
Now support for hardsub or softsub both!!
28+
## Usage
2229

23-
==Tested in Ubuntu 16.04 Xenial, 18.04 Bionic and Debian 9 Stretch, 10 Buster==
30+
In this section, I will illustrate how to use the application with examples:
2431

25-
## Dependencies
32+
**Basic example (argument -i):**
2633

27-
You must have installed youtube-dl, fontconfig and mkvmerge, as minimum.
34+
Input URL using argument -i. Episode will be downloaded with max resolution in the current directory.
2835

29-
Rhash is recommended for calculating CRC32 hash sum.
36+
```sh
37+
./mergecrunch.sh -i URL_CRUNCH_HERE
38+
```
3039

31-
For getting this dependencies, execute the classic sudo apt-get install.
40+
**Playlist selection (append # character in input URL):**
3241

33-
Note 1. For youtube-dl, I would recommend to use [nilarimogard's ppa](https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8).
42+
For playlist selection, you must append the # character in input URL. After, use selection syntax:
3443

35-
Note 2. For mkvtoolnix, I would recommend to use [custom Bunkus' repository](https://www.bunkus.org/videotools/mkvtoolnix/downloads.html#ubuntu).
44+
- "N-M" for selecting inclusive range from N to M.
45+
- "N" for simple selection.
46+
- "," as separator for multiple selections.
3647

48+
Example #1. Select IDs items from 12 to 20.
3749
```sh
38-
sudo apt-get install youtube-dl
39-
sudo apt-get install fontconfig
40-
sudo apt-get install mkvtoolnix
41-
sudo apt-get install rhash
50+
./mergecrunch.sh -i URL_PLAYLIST_CRUNCH_HERE#12-20
4251
```
4352

44-
For solving fonts text dependencies, create a folder in your home dir called ~/.fonts and put here any font text missing.
45-
When you run this script, mkvmerge needs fonts text installed previous in your system for adding it as attachment.
53+
Example #2. Select ID item 5.
54+
```sh
55+
./mergecrunch.sh -i URL_PLAYLIST_CRUNCH_HERE#5
56+
```
4657

47-
## Usage
58+
Example #3. Select IDs items from 12 to 20 and also 2, 5, 23 to 30.
59+
```sh
60+
./mergecrunch.sh -i URL_PLAYLIST_CRUNCH_HERE#12-20,2,5,23-30
61+
```
4862

49-
For this section, I will ilustrate how to use it with examples:
63+
**Output file name (argument -o):**
64+
65+
In this example, output file will renamed as "Sket Dance 01 [CRC32_HERE].mkv"
5066

51-
**Basic example (argument -i):**
5267
```sh
53-
./mergecrunch.sh -i URL_CRUNCH_HERE
68+
./mergecrunch.sh -i URL_CRUNCH_HERE -o 'Sket Dance 01.mkv'
5469
```
55-
Episode will be downloaded with max resolution in the current directory
5670

5771
**CRC32 example (argument -x):**
72+
73+
In this example, CRC32 will be calculated and stored in the filename.
74+
5875
```sh
5976
./mergecrunch.sh -i URL_CRUNCH_HERE -x
6077
```
61-
Same top, but now CRC32 will be calculated and stored in the filename.
6278

6379
**Format example (argument -f):**
80+
81+
In this example, resolution will be 1280x720. Be careful with this argument, some resolution are availabled for premium users only.
82+
6483
```sh
6584
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p
6685
```
67-
Same top, but now resolution will be 1280x720. Be careful with this argument, some resolution are availabled for premium users only.
6886

6987
Format | Description
7088
------ | -----------
71-
worst | The worst resolution available (generally 360p or 480p)
89+
worst | The worst resolution available (generally 240p, 360p or 480p)
90+
240p | 320x240 or 420x240
7291
360p | 480x360 or 640x360
7392
480p | 640x360 or 848x480
7493
720p | 1280x720
7594
1080p | 1920x1080
76-
best | The best resolution available (generally 480p or 1080p)
95+
best | The best resolution available (generally 480p, 720p or 1080p)
7796

7897
**Preferred language (argument -s) + Only one language (argument --one):**
7998

80-
Using a preferred language, you set a default subtitle track in your mkv. Also, title description and default output filename are set according to this language.
99+
Using a preferred language, you set a default subtitle track in your mkv. In this example, set spanish subtitle track as preferred. If you append the --one argument, then esES subtitle track will merged exclusively.
81100

82101
```sh
83102
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p --one -s esES
84103
```
85-
Same top, but now I set spanish subtitle track as preferred. If you append the --one argument, then esES subtitle track will merged exclusively.
86104

87105
Language | Description
88106
-------- | -----------
@@ -98,82 +116,73 @@ arME | Forces العربية
98116
ruRU | Forces Русский
99117
jaJP | Forces 日本語
100118

101-
**Hardsub switch (argument --hard):**
119+
**Hardsubbing switch (argument --hard):**
102120

103121
If you wish download a hardsub video instead of merging a soft subtitle track, you can append the --hard argument. Require -s argument and implies --one argument.
104122

105123
```sh
106124
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p --hard -s esES
107125
```
108126

109-
**Spoof location (argument -g):**
110-
111-
Similar to choose your preferred language, you can spoof your location in order to download videos from foreign locations. The following example shows a spoof location to Russia and preferred language to American Spanish.
127+
**Account access (argument --cookies and --ua):**
112128

113-
Also, default output filename will be in russian.
129+
You must get your cookies file (to export your Crunchyroll authentication) and know which is your user agent (bypassing Cloudflare).
114130

131+
In order to get your cookie file (argument --cookies or -c), I would recommend to use an extension navigator such as [cookies.txt from Chrome Store](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg) or [cookies.txt from Firefox Add-Ons](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/).
115132
```sh
116-
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esLA -g ruRU
133+
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -c cookies.txt
117134
```
118135

119-
**Output file name (argument -o):**
120-
```sh
121-
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv'
136+
In order to get your user agent, [ask to google for getting it using the same browser where you downloaded the cookie file](https://www.google.com/search?q=what+is+my+user+agent)
137+
```
138+
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -c cookies.txt --ua 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'
122139
```
123-
Same top, but now output file will renamed as "Sket Dance 01 [CRC32_HERE].mkv"
124140

141+
## For manual install without docker: Dependencies
125142

126-
**Premium account (argument -u and -p OR argument -c):**
127-
```sh
128-
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -u BeardOverflow
129-
```
130-
Same top, but I am logging in my premium account. The console will prompt for username's password.
143+
==Manual install is not recommended way. Only for Debian an derivates. Just for testing purposes==
131144

132-
However, you may specific your password by command line.
133-
```sh
134-
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -u BeardOverflow -p mysecretpassword
135-
```
145+
Install youtube-dl, python3, fontconfig, mkvmerge and rhash
146+
147+
For getting this dependencies, execute the classic sudo apt-get install.
136148

137-
Sometimes, the login access could fail using argument -u (because youtube-dl is outdated). In this case, you could use a cookie file. In order to get your cookie file, I would recommend to use an extension navigator such as [cookies.txt from Chrome Store](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg) or [cookies.txt from Firefox Add-Ons](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/).
138149
```sh
139-
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -c cookies.txt
150+
sudo apt-get install youtube-dl python3 fontconfig mkvtoolnix rhash
140151
```
141152

142-
With the latest changes in CR, you must set your user-agent (argument --ua) and cookies file together. [Ask to google for getting it using the same browser where you downloaded the cookie file](https://www.google.com/search?q=what+is+my+user+agent)
143-
```
144-
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -c cookies.txt --ua 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'
145-
```
153+
Note 1. Latest version of youtube-dl on [all-in-on binary](https://ytdl-org.github.io/youtube-dl/download.html)
146154

147-
**Playlist selection (append # character in input URL):**
155+
Note 2. Latest version of mkvmerge on [custom Bunkus' repository](https://mkvtoolnix.download/downloads.html#debian)
148156

149-
For playlist selection, you must append the # character in input URL. After, according to selection syntaxis:
150-
- "N-M" for select range from N to M.
151-
- "N" for simple selection.
152-
- "," as separator for multiple selections.
157+
Fontconfig is the engine to search for fonts in your system. If the applicationg warns you about missing fonts, create a folder in your home path called ~/.fonts and put in here the missing fonts
158+
159+
## DEPRECATED OPTIONS
160+
161+
**Premium account (argument -u and -p):**
162+
163+
In this example, I am logging in my premium account. **Deprecated by Crunchyroll’s new verifications.** The console will prompt for username's password.
153164

154-
Example #1. Select IDs items from 12 to 20.
155165
```sh
156-
./mergecrunch.sh -i URL_PLAYLIST_CRUNCH_HERE#12-20
166+
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -u BeardOverflow
157167
```
158168

159-
Example #2. Select ID item 5.
169+
However, you may specific your password by command line.
170+
160171
```sh
161-
./mergecrunch.sh -i URL_PLAYLIST_CRUNCH_HERE#5
172+
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esES -o 'Sket Dance 01.mkv' -u BeardOverflow -p mysecretpassword
162173
```
163174

164-
Example #3. Select IDs items from 12 to 20 and also 2, 5, 23 to 30.
175+
**Spoof location (argument -g):**
176+
177+
Similar to choose your preferred language, you can spoof your location in order to download videos from foreign locations. The following example shows a spoof location to Russia and preferred language to American Spanish. **Deprecated by Crunchyroll's new verifications.**
178+
165179
```sh
166-
./mergecrunch.sh -i URL_PLAYLIST_CRUNCH_HERE#12-20,2,5,23-30
180+
./mergecrunch.sh -i URL_CRUNCH_HERE -x -f 720p -s esLA -g ruRU
167181
```
168182

169-
170183
## FEEDBACK, BUGS OR CONTRIBUTION
171-
- If you need some help, I will be glad to help you.
172-
- Please report all errors, getting them is great.
173-
- If you want to help me with something please create a pull request :)
184+
185+
Open an issue in this repository or fork this
174186

175187
## LICENSE
176188
GNU General Public License v2.0
177-
178-
179-

0 commit comments

Comments
 (0)