-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
59 lines (52 loc) · 2.18 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
_ _
_ _| |_ __ _ ___| |_
| | | | __/ _` |/ _ \ __|
| |_| | || (_| | __/ |_
\__, |\__\__, |\___|\__|
|___/v1.1|___/by slowbro
--------------------------
- Gets youtube videos
- Quality Selector (use number, based on: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs)
- Herpaderp
Requirements
-------------
- bash shell (or similar)
- curl
- a Youtube Link
- ffmpeg
* recommended at least libfaac, mpeg-4, and libmp3lame. faac and mpeg-4 is required for most of the videos
Arguments
----------
-d "<url>" : display information about <url>
-f "<args>" : pass args directly to ffmpeg
-h : help
-i "<url>" : input link. use whole link IN QUOTES (eg "http://www.youtube.com/watch?v=U7mPqycQ0tQ " [gee gee gee gee baby baby baby])
-I "<path>" : input file
-n : don't encode: output raw youtube video
-o <file> : output file. extention decides format. (uses ffmpeg. usual extentions: .aac .mp3 .mpg .mp4 .avi .wmv .oog etc...)
-p <pass> : youtube password (for age-restricted videos)
-q <num> : quality number. default is 18 (360p)
-Q : be quiet (no output except for errors)
-r <bit/s> : pass video bitrate to ffmpeg (ex: 600k, 1200k [def: 96k])
-R <bit/s> : pass audio bitrate to ffmpeg (ex: 64k, 128k [def: 96k])
-u <user> : youtube username (for age-restricted videos)
-v : verbose output: use for debugging. overrides -Q
Examples
---------
- Get quality 34 ("high quality"/480p) audio
./ytget -o some_audio.mp3 -i "http://www.youtube.com/watch?v=U7mPqycQ0tQ " -q34
- Get quality 5 ("low quality"/240p) video, and suppress output
./ytget -o /path/to/some_video.avi -i "http://www.youtube.com/watch?v=U7mPqycQ0tQ " -q5 -Q
- List details about a video
./ytget -d "http://www.youtube.com/watch?v=U7mPqycQ0tQ "
- Login and download an age-restricted video
./ytget -i "http://youtube.com/watch?v=m6VojYGrnpg " -u"[email protected]" -p"mypassword" -o "somefile.mp3"
Return Codes
-------------
0 : success
1 : youtube page get failed (did you supply the whole URL? in quotes?)
2 : youtube video get failed
3 : ffmpeg encode failed
4 : argument error
5 : ffmpeg codec error (codec not available)
6 : youtube login fail or missing user/pass