Skip to main content

yt-dlp postprocessor plugin for audio normalization using ffmpeg-normalize

Project description

yt-dlp-audio-normalize

ffmpeg-normalize を使用した音声正規化のための yt-dlp PostProcessor プラグイン。

要件

  • Python >= 3.10
  • yt-dlp >= 2024.01.01
  • ffmpeg (システムにインストール済みであること)

インストール

pip install (GitHub)

pip install -U "yt-dlp-audio-normalize @ git+https://github.com/9c5s/yt-dlp-AudioNormalize.git"

ローカル開発

pip install -e ./yt-dlp-AudioNormalize

使い方

--use-postprocessor

# デフォルトの正規化
yt-dlp --use-postprocessor AudioNormalize URL

# パラメータを指定
yt-dlp --use-postprocessor "AudioNormalize:target_level=-14.0;audio_codec=aac" URL

# 実行タイミングを指定
yt-dlp --use-postprocessor "AudioNormalize:when=after_move" URL

--ppa (PostProcessor Arguments)

yt-dlp --ppa "AudioNormalize:-t -14.0 -c:a aac -b:a 128k" URL

--use-postprocessor の kwargs と --ppa の両方が指定された場合、PPA が優先される。

Python API

from yt_dlp_plugins.postprocessor.audio_normalize import AudioNormalizePP

with yt_dlp.YoutubeDL(opts) as ydl:
    ydl.add_post_processor(AudioNormalizePP(), when="after_move")
    ydl.download([url])

サポートされるパラメータ

FFmpegNormalize.__init__() のすべてのスカラーパラメータは、ロングフラグ(例: --target-level, --audio-codec)で自動的にサポートされる。

ショートフラグ

フラグ パラメータ 説明
-nt normalization_type 正規化タイプ
-t target_level ターゲットレベル
-p print_stats 統計情報の表示
-lrt loudness_range_target ラウドネス範囲ターゲット
-tp true_peak トゥルーピーク
-c:a audio_codec 音声コーデック
-b:a audio_bitrate 音声ビットレート
-ar sample_rate サンプルレート
-ac audio_channels 音声チャンネル数
-koa keep_original_audio 元の音声を保持
-prf pre_filter プリフィルター
-pof post_filter ポストフィルター
-vn video_disable 映像を無効化
-c:v video_codec 映像コーデック
-sn subtitle_disable 字幕を無効化
-mn metadata_disable メタデータを無効化
-cn chapters_disable チャプターを無効化
-ofmt output_format 出力フォーマット
-ext extension 拡張子
-d debug デバッグモード
-n dry_run ドライラン
-pr progress 進捗表示

ライセンス

Unlicense

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_audio_normalize-0.1.0.tar.gz (13.0 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_audio_normalize-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file yt_dlp_audio_normalize-0.1.0.tar.gz.

File metadata

  • Download URL: yt_dlp_audio_normalize-0.1.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for yt_dlp_audio_normalize-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f207417be275d031bbc19711750af0519b066024d280c03d9863cf089c63a1d0
MD5 051d5153f38c096ff2f7213dc3a473df
BLAKE2b-256 e1c7ffc79f6c424e8a3f30d0456c646f8f1d753a696e46fca2fbe3c70fc77296

See more details on using hashes here.

File details

Details for the file yt_dlp_audio_normalize-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yt_dlp_audio_normalize-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97ecd1b735969a562d10739d7a9e34f2da06ded4a0c45e2f730175dd651ce145
MD5 f880543ec1016e596d77104122a933d9
BLAKE2b-256 ae0499776545da5a5c023fd1ca4c72ba858f5bf4c31aab1fbea5c2823aaba8e8

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