download all the mp4
videos from urls and convert from mp4
to mp3
.
- <= python 3.7
- ffmpeg
- download
ffmpeg
.- (if you are using homebrew, use following command in terminal
brew install ffmpeg
.)
- (if you are using homebrew, use following command in terminal
- type environment variables in
.env
file.DOWNLOAD_PATH
is a directory where you want to download to.CONVERTED_PATH
is a directory where you want to save converted videos to.VIDEOS_TEXT_FILE
is a text file with urls that you want to download.MAX_RETRY_TIMES
is how many times you want to retry when it occurs an error.LOG_FILE_PATH
is to save output log file's path (The directory must be exist).
- create virtual python environment
python -m venv venv
- or
virtualenv venv -ppy< python version(ex, 310) >
(if you have installed virtualenv)
- activate python venv
- mac
source venv/bin/activate
- window
./venv/Scripts/activate
- linux
. venv/bin/activate
- mac
- install dependencies
pip install -r requirements.txt
- use
convert
,download
,together
orone
command withpython main.py
- example :
python main.py convert
- example :
- create virtual python environment
python -m venv venv
- or
virtualenv venv -ppy< python version(ex, 310) >
(if you have installed virtualenv)
- activate python venv
- mac
source venv/bin/activate
- window
./venv/Scripts/activate
- linux
. venv/bin/activate
- mac
- install tox dependency
pip install tox
- use
tox
command
- download
- download all the urls in the text file.
- convert
- argument:
--overwrite/--no-overwrite
- ex)
python main.py convert --no-overwrite
- overwrite already converted videos (default: overwrite)
- ex)
--quiet/--no-quiet
- ex)
python main.py convert --no-quiet
- show ffmpg output log (default: quiet)
- ex)
- convert all the downloaded videos from
mp4
tomp3
.
- argument:
- together
- argument:
--overwrite/--no-overwrite
- ex)
python main.py together --no-overwrite
- overwrite already converted videos (default: overwrite)
- ex)
--quiet/--no-quiet
- ex)
python main.py convert --no-quiet
- show ffmpg output log (default: quiet)
- ex)
- download all the urls and convert all the downloaded videos.
- argument:
- one
- argument:
--url <video url>
- ex)
python main.py one --url example.com/example.mp4
- ex)
--overwrite/--no-overwrite
- ex)
python main.py one --no-overwrite
- overwrite already converted videos (default: overwrite)
- ex)
--quiet/--no-quiet
- ex)
python main.py convert --no-quiet
- show ffmpg output log (default: quiet)
- ex)
- download vid from url argument and convert the downloaded video.
- argument:
- download and convert with url argument via terminal command.
- add a progress bar to show status of downloading videos.
- add more convert options.