From 2698efd0ee27e093222aa28a35ef413de908ec31 Mon Sep 17 00:00:00 2001 From: Werner Robitza Date: Mon, 27 Feb 2017 19:54:00 +0100 Subject: [PATCH] clarify merge option --- HISTORY.rst | 5 +++++ README.rst | 3 +-- ffmpeg_normalize/__init__.py | 2 +- ffmpeg_normalize/__main__.py | 8 ++++---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0d9f4c2..ab20995 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.4.2 (2017-02-27) +__________________ + +* Clarify use of merge option + 0.4.1 (2017-02-13) __________________ diff --git a/README.rst b/README.rst index cc85adb..a3b5e08 100644 --- a/README.rst +++ b/README.rst @@ -43,8 +43,7 @@ Options: - ``-v``, ``--verbose`` — Enable verbose output - ``-n``, ``--dry-run`` — Show what would be done, do not convert - ``-d``, ``--debug`` — Show debug output -- ``-u``, ``--merge`` — Don’t create a separate WAV file but update the - original file. Use in combination with -p to create a copy +- ``-u``, ``--merge`` — Take original file's streams and merge the normalized audio. Note: This will not overwrite the input file, but output to ``normalized-``. - ``-a``, ``--acodec `` — Set audio codec for ffmpeg (see `ffmpeg -encoders`) (will be chosen based on format, default pcm_s16le for WAV) - ``-r``, ``--format `` – Set format for ffmpeg (see `ffmpeg -formats`) to use for output file [default: wav] diff --git a/ffmpeg_normalize/__init__.py b/ffmpeg_normalize/__init__.py index 3d26edf..df12433 100644 --- a/ffmpeg_normalize/__init__.py +++ b/ffmpeg_normalize/__init__.py @@ -1 +1 @@ -__version__ = "0.4.1" +__version__ = "0.4.2" diff --git a/ffmpeg_normalize/__main__.py b/ffmpeg_normalize/__main__.py index 4ca084a..7d8c4db 100644 --- a/ffmpeg_normalize/__main__.py +++ b/ffmpeg_normalize/__main__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python """ -ffmpeg-normalize 0.4.1 +ffmpeg-normalize 0.4.2 ffmpeg script for normalizing audio. @@ -27,7 +27,7 @@ -v --verbose Enable verbose output -n --dry-run Show what would be done, do not convert -d --debug Show debug output - -u --merge Don't create a separate WAV file but update the original file. Use in combination with -p to create a copy + -u --merge Take original file's streams and merge the normalized audio. Note: This will not overwrite the input file, but output to `normalized-`. -a --acodec Set audio codec for ffmpeg (see `ffmpeg -encoders`) to use for output (will be chosen based on format, default pcm_s16le for WAV) -r --format Set format for ffmpeg (see `ffmpeg -formats`) to use for output file [default: wav] -e --extra-options Set extra options passed to ffmpeg (e.g. "-b:a 192k" to set audio bitrate) @@ -287,9 +287,9 @@ def adjust_volume(self): if self.merge: # when merging, copy the video and subtitle stream over and apply the audio filter - cmd += '-strict -2 -c:v copy -c:s copy -filter:a "volume=' + str(self.adjustment) + 'dB" ' + cmd += '-strict -2 -c:v copy -c:s copy -map_metadata 0 -filter:a "volume=' + str(self.adjustment) + 'dB" ' if not self.acodec: - logger.warn("Merging audio back into original file, but encoder was automatically chosen. Set '--acodec' to overwrite.") + logger.warn("Merging audio with the original file, but encoder was automatically chosen. Set '--acodec' to overwrite.") else: # when outputting a file, disable video and subtitles cmd += '-vn -sn -filter:a "volume=' + str(self.adjustment) + 'dB" '