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.dev3.tar.gz (14.9 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.dev3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_dlp_expand-0.4.12.dev3.tar.gz
  • Upload date:
  • Size: 14.9 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.dev3.tar.gz
Algorithm Hash digest
SHA256 a1855c82c5ff2682d931bd8531b2f59614c19276fc4a495e95e79d6bf5daccab
MD5 4c9c36b53ff2b79d4cb56ed34185f533
BLAKE2b-256 063fb0b60c56ffe43922e4e13b6146baf567aab62001b38d5bf85197eea457c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yt_dlp_expand-0.4.12.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 b0b717f66eea061d5904cd2560efd761c4661bad26ea58e92c114665cb0e711c
MD5 f4360f54299cd28d6c56f0afea88c526
BLAKE2b-256 587387797348fcd8f28b55885ce074d8d4f3b33c3eed24ac1faec0a4ee3c4186

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