This script is a wrapper for yt-dlp, designed to download audio or video from provided URLs.
- Audio Download: Default mode downloads the best audio available in
.m4a
format. - Video Download: Optionally, you can download the best available video in
.mp4
format.
To install Poetry, follow these steps:
python -m pip install --upgrade pip
python -m pip install --user pipx
python -m pipx ensurepath
pipx install poetry
To install the project dependencies, execute the following command:
poetry install
To activate the virtual environment, run:
poetry shell
To use the script, you can specify the input file containing URLs and the output folder. Additionally, you can choose between downloading audio or video.
For command line arguments, use:
python video2images.py --help
--input_file
(default:urls.txt
): Path to the text file containing the URLs to download.--output_folder
(default:download
): Directory to save the downloaded files.--strategy
(choices:audio
,video
; default:audio
): Specify the download strategy. Useaudio
to download audio files orvideo
to download video files.--concurrent_fragments
(default:4
): Number of concurrent fragments to download for each video.
To download video from the URLs listed in urls.txt
:
python youtube-dl.py --strategy=video
By default, this command will create a folder named download
.