Skip to main content

yt-dlp wrapper for downloading YouTube videos/audio with embedded thumbnails

Project description

yt_dlp_expand

yt-dlp を使って動画・音声をダウンロードし、サムネイルを自動埋め込みするラッパーパッケージです。
iPhoneのショートカットApp + a-Shell からの呼び出しを想定して作成されました。

iPhoneでショートカットappを使って、safariからYouTubeをダウンロードする

Getting Started

Prerequisites

以下が自動的にインストールされます。 / The following are installed automatically:

また、システムに ffmpeg がインストールされている必要があります。
ffmpeg must also be installed on your system.

Installing

PyPI(a-Shell 推奨):

pip install yt_dlp_expand

git から(mac/linux 等の通常環境):

pip install git+https://github.com/souno1218/yt_dlp_expand.git

Download Modes

Mode 説明
0 bestaudio → MP3(サムネイル埋め込み)
1 bestaudio → Opus(サムネイル埋め込み)
2 720p MP4 (h264 + mp4a)(サムネイル埋め込み)
3 best MP4 (h264 + mp4a)(サムネイル埋め込み)
4 best MP4 (vp9 + opus)(サムネイル埋め込み)

Usage

Terminal / CLI

yt_dlp_expand [-h] [-p PATH] [-l DOWNLOAD_PLAYLIST] download_mode url

positional arguments:

引数 説明
download_mode ダウンロードモード (0〜4)
url 動画またはプレイリストの URL

options:

オプション 説明
-p PATH, --path PATH 保存先ディレクトリパス(省略時: PC → ~/Downloads, iOS → ~/Documents
-l, --download_playlist プレイリスト全体をダウンロードするか(default: False)

Examples:

# MP3 でダウンロード
yt_dlp_expand 0 "https://www.youtube.com/watch?v=xxxx"

# 720p MP4 で指定ディレクトリに保存
yt_dlp_expand 2 "https://www.youtube.com/watch?v=xxxx" -p ~/Movies

# プレイリストをまとめてダウンロード
yt_dlp_expand 1 "https://www.youtube.com/playlist?list=xxxx" -l true

Python ライブラリとして使う

from yt_dlp_expand import DownloadMode, ExpandYt_dlp

obj = ExpandYt_dlp(DownloadMode.AUDIO_MP3, "https://www.youtube.com/watch?v=xxxx")
obj.run()

Built With

  • yt-dlp — 動画ダウンロード
  • mutagen — MP3/Opus へのサムネイル埋め込み
  • ffmpeg-python — MP4 へのサムネイル埋め込み・クロップ

Authors

  • 河野 颯之介 (Sonosuke Kono)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yt_dlp_expand-0.4.12.dev2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_dlp_expand-0.4.12.dev2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file yt_dlp_expand-0.4.12.dev2.tar.gz.

File metadata

  • Download URL: yt_dlp_expand-0.4.12.dev2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for yt_dlp_expand-0.4.12.dev2.tar.gz
Algorithm Hash digest
SHA256 596bd02c64deba276c112edd860e662809308fc8ea485ed6160d2514f45bfe42
MD5 2c5435dc27ffa0b618cf0363094df8fd
BLAKE2b-256 436b43e726f2d07ef08d056529a0fd13fd62770661a760f66e55c16a977fa34b

See more details on using hashes here.

File details

Details for the file yt_dlp_expand-0.4.12.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for yt_dlp_expand-0.4.12.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e1ff36a61c070fdb7578e516faec49ae0d442291283d92d948cf36513789ad0
MD5 34e3db55d2fcd61f74cd8a75d5d32437
BLAKE2b-256 0ca123736be3342eb0aa6b44803f6ca923b811cb6eb561cb18e3e551d5080e2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page