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.dev4.tar.gz (15.3 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.dev4-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_dlp_expand-0.4.12.dev4.tar.gz
  • Upload date:
  • Size: 15.3 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.dev4.tar.gz
Algorithm Hash digest
SHA256 25c5e86d3c3b500fad1a91af641de39856bf87dfd2f3a6d005785ce12b366002
MD5 cde00cc64c1737a91b87f14707cd3816
BLAKE2b-256 474285db2148765525ae7293893d3663f04f187e96b732c13524fd329f3875cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yt_dlp_expand-0.4.12.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 21ecf40447e728ed34a103aa0d280759434ee40b23d9d038f8ce85df9bbdb49e
MD5 c0f2d7c507fffe4bff7b0b2f86e99f3c
BLAKE2b-256 c3f8847e6e7c12e557d4899e55e2b9cea71fa51dba3354831aae087710e81e69

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