File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ # How To Download Audio Of A YouTube Video?
2
+
3
+ 1 . Setup python and pip if you haven’t already
4
+
5
+ 2 . Install virtualenv
6
+
7
+ ` pip install virtualenv `
8
+
9
+ 3 . Create Virtual environment
10
+
11
+ ` virtualenv venv `
12
+
13
+ 4 . Activate virtual environment
14
+
15
+ - ` source venv/bin/activate ` (Linux)
16
+ - ` venv\Scripts\activate ` (Windows)
17
+
18
+ 5 . Install requirements
19
+
20
+ ` pip install -r requirements.txt `
21
+
22
+ 6 . Specify url of the YouTube video whoose audio you want (in YouTubeAudioDownloader.py)
23
+
24
+ ex: ` url = "https://www.youtube.com/watch?v=ZSXN_dpG5jk" `
25
+
26
+ 7 . Run YouTubeAudioDownloader.py
27
+
28
+ ![ YouTubeAudioDownloader.py Output] ( https://github.com/sejalsksagar/Amazing-Python-Scripts/blob/youtube_audio/YouTube%20Audio%20Downloader/Output.PNG )
29
+
30
+ You will find file of .webm format downloaded in the same folder.
31
+
32
+ ## How To convert .webm to .mp3 format?
33
+
34
+ 1 . Install moviepy in the same environment
35
+
36
+ ` pip install moviepy==1.0.3 `
37
+
38
+ 2 . Specify path of .webm file (in WebmToMp3.py)
39
+
40
+ ex: ` clip = mp.AudioFileClip("C:/Users/sejal/Desktop/YouTube Audio Downloader/Rainbow.webm").subclip() `
41
+
42
+ 3 . Specify path where .mp3 file should be saved (in WebmToMp3.py)
43
+
44
+ ex: ` clip.write_audiofile("C:/Users/sejal/Desktop/YouTube Audio Downloader/rainbow.mp3") `
45
+
46
+ 4 . Run WebmToMp3.py
47
+
48
+ ![ YouTube Audio Downloader Folder] ( https://github.com/sejalsksagar/Amazing-Python-Scripts/blob/youtube_audio/YouTube%20Audio%20Downloader/Folders.PNG )
You can’t perform that action at this time.
0 commit comments