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.dev1.tar.gz (14.7 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.dev1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_dlp_expand-0.4.12.dev1.tar.gz
  • Upload date:
  • Size: 14.7 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.dev1.tar.gz
Algorithm Hash digest
SHA256 56d21419425484d06d868dfb5299cb857440be2c893295c3e027749fc9e6f537
MD5 ffad502815ce8f826b8f40c37c092389
BLAKE2b-256 669d1cbf5b1283ce9aa59d139d4f732453d113276dace4f5a265bcdcd69cf3bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yt_dlp_expand-0.4.12.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 5de0aef807025235da32838bcbd2ed3b82773ed9d72c565e1036c1d7f371278c
MD5 3dbfeab1d7f4e06b357b34ae74872be8
BLAKE2b-256 ead6dfa5facb642d52c982a8f47cdcb104b231ffc8cce1d83ecf2fb84269f849

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