https://github.com/cuuupid/python-youtube-to-mp3
youtube --> mp3 solution in python (built for 3.6, compatible with flask)
https://github.com/cuuupid/python-youtube-to-mp3
Last synced: 29 days ago
JSON representation
youtube --> mp3 solution in python (built for 3.6, compatible with flask)
- Host: GitHub
- URL: https://github.com/cuuupid/python-youtube-to-mp3
- Owner: cuuupid
- Created: 2017-08-13T19:30:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-13T19:47:27.000Z (over 7 years ago)
- Last Synced: 2025-02-09T21:45:03.641Z (3 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Youtube to mp3
## Performance
Very low performance library (downloading as mp4, converting to mp3).
Testing speed using `benchmark.py` resolves `9.236s` for `3:03` video with moving visuals.
Converting to mp3 creates overhead --> resolve using opened pipe in stdout. TODO exists for this.
`ffmpeg` accounts for ~4 seconds.
## Dependencies
1. `ffmpeg`
2. `python`
3. `requests` module (`pip install requests`)
4. `pytube` module (`pip install pytube`)## Usage
```
from youtube_downloader import download_youtube_videomp3_filepath = download_youtube_video("https://www.youtube.com/watch?v=VIZibp4cQ7E")
os.system('open \"'+mp3_filepath+'\"') # open mp3 in default player for playback
```