Simple helper to download YouTube videos as MP4 using yt-dlp.
Project description
pn_yt2slides
pn_yt2slides is a minimal Python helper that downloads YouTube videos as MP4 files using yt-dlp.
Features
- Fetches the best available MP4 (video + audio) rendition for a YouTube URL.
- Saves the file to a configurable output directory.
- Returns the absolute path to the downloaded video for easy scripting/integration.
Installation
pip install pn_yt2slides
For local development:
git clone https://github.com/PurnimaNahata/pn_yt2slides.git
cd pn_yt2slides
pip install -e .
Usage
from pn_yt2slides import download_video
file_path = download_video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
print(file_path)
By default the video is saved to a downloads/ directory in the current working directory. You can override this by passing a custom path:
download_video(url, output_path="/path/to/folder")
Command-Line Demo
The repository ships with a small example script:
python testing.py
It downloads the sample video and prints the final file path.
Requirements
- Python 3.8+
- FFmpeg available on your PATH (required by
yt-dlpwhen merging video/audio streams). - Python dependency:
yt-dlp
License
MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pn_yt2slides-0.2.0.tar.gz.
File metadata
- Download URL: pn_yt2slides-0.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44efeb4660f17d43db9bbc1d740de6eb662c58ac426c70d3ea51702172488ad2
|
|
| MD5 |
748409e79735ea231fadedfb74a9e461
|
|
| BLAKE2b-256 |
6586c25da61ba451a8c1623fbca063dc7fa995ac15ad3627516904409c3e70f3
|
File details
Details for the file pn_yt2slides-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pn_yt2slides-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b5f32318d9e1d5dbe51f1bf15a731772abfbb4e2ce83735d06588c41138dfe9
|
|
| MD5 |
8306f767cf774808a3df8a6299699f1c
|
|
| BLAKE2b-256 |
a5aaeef77203f0974ecac2d9b3f096bdef5ede3147eccdd3fba6d6de37ba615c
|