Skip to main content

yt-dlp-audio-normalize

CI codecov PyPI Python License: Unlicense

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

要件

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

インストール

pip install -U yt-dlp-audio-normalize

使用方法

--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=pre_process" URL

when を省略した場合、自動的に after_move で実行される。これにより、ファイルが最終パスに移動された後に音量正規化が行われる。

--ppa (PostProcessor Arguments)

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

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

自動推定

ダウンロード済みファイルのメタデータから以下のパラメータが自動的に設定される:

パラメータ ソース 説明
extension ext 出力ファイルの拡張子
audio_codec acodec 音声コーデック(デコーダ名→エンコーダ名に自動変換)
sample_rate asr サンプルレート(未取得時は 48000 Hz)
audio_bitrate abr 音声ビットレート

ユーザーが明示的に指定した値は自動推定値より優先される。

Python API

import yt_dlp
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

Metadata

Release files for yt-dlp-audio-normalize 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yt-dlp-audio-normalize 0.3.1
File Size Uploaded
yt_dlp_audio_normalize-0.3.1.tar.gz 18.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yt-dlp-audio-normalize 0.3.1
File Interpreter ABI Platform
yt_dlp_audio_normalize-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.9 kB

Release files / yt_dlp_audio_normalize-0.3.1.tar.gz

Download URL yt_dlp_audio_normalize-0.3.1.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a4c1614b9c04b42ce4900ccd376ebaa7ddd43af8556a801108696a3c84ae0aab
BLAKE2b-256 checksum
How to use checksums
825780497d3643c4fb1e4230fe8cd235a6a7085f2c01a0d004b8e518ace3d70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release files / yt_dlp_audio_normalize-0.3.1-py3-none-any.whl

Download URL yt_dlp_audio_normalize-0.3.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e39f5594efe92fca1af4173630d9c2964ec9616cf56f21121e29827823357a46
BLAKE2b-256 checksum
How to use checksums
edb42d3839498da8060a1b2fa50060560f22f515bba1e3ac630f6d5590638603
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page