ffmpeg-normalize 1.45.0__tar.gz → 1.45.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/PKG-INFO +1 -1
  2. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/pyproject.toml +1 -1
  3. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/pyproject.toml.orig +1 -1
  4. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_media_file.py +11 -2
  5. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_streams.py +7 -1
  6. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/LICENSE.md +0 -0
  7. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/README.md +0 -0
  8. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/__init__.py +0 -0
  9. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/__main__.py +0 -0
  10. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_cmd_utils.py +0 -0
  11. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_console.py +0 -0
  12. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_errors.py +0 -0
  13. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_ffmpeg_normalize.py +0 -0
  14. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_logger.py +0 -0
  15. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/_presets.py +0 -0
  16. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/data/presets/music.json +0 -0
  17. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/data/presets/podcast.json +0 -0
  18. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/data/presets/streaming-video.json +0 -0
  19. {ffmpeg_normalize-1.45.0 → ffmpeg_normalize-1.45.1}/src/ffmpeg_normalize/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ffmpeg-normalize
3
- Version: 1.45.0
3
+ Version: 1.45.1
4
4
  Summary: Normalize audio via ffmpeg
5
5
  Keywords: ffmpeg,normalize,audio
6
6
  Author: Werner Robitza
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "ffmpeg-normalize"
7
- version = "1.45.0"
7
+ version = "1.45.1"
8
8
  description = "Normalize audio via ffmpeg"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "ffmpeg-normalize"
7
- version = "1.45.0"
7
+ version = "1.45.1"
8
8
  description = "Normalize audio via ffmpeg"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -40,7 +40,7 @@ _logger = logging.getLogger(__name__)
40
40
 
41
41
  # Note: this does not contain MP3, see https://github.com/slhck/ffmpeg-normalize/issues/246
42
42
  # We may need to remove other formats as well, to be checked.
43
- AUDIO_ONLY_FORMATS = {"aac", "ast", "flac", "mka", "oga", "ogg", "opus", "wav"}
43
+ AUDIO_ONLY_FORMATS = {"aac", "ast", "mka", "oga", "ogg", "opus", "wav"}
44
44
  ONE_STREAM = {"aac", "ast", "flac", "mp3", "wav"}
45
45
 
46
46
 
@@ -215,7 +215,10 @@ class MediaFile:
215
215
  elif "Video" in line:
216
216
  _logger.debug(f"Found video stream at index {stream_id}")
217
217
  self.streams["video"][stream_id] = VideoStream(
218
- self.ffmpeg_normalize, self, stream_id
218
+ self.ffmpeg_normalize,
219
+ self,
220
+ stream_id,
221
+ attached_pic="(attached pic)" in line,
219
222
  )
220
223
 
221
224
  elif "Subtitle" in line:
@@ -837,6 +840,12 @@ class MediaFile:
837
840
  if self.output_ext.lower() in AUDIO_ONLY_FORMATS:
838
841
  return False
839
842
 
843
+ # FLAC holds pictures (cover art), not video
844
+ if self.output_ext.lower() == "flac" and not all(
845
+ stream.attached_pic for stream in self.streams["video"].values()
846
+ ):
847
+ return False
848
+
840
849
  return not self.ffmpeg_normalize.video_disable
841
850
 
842
851
  def _first_pass(self) -> None:
@@ -132,9 +132,15 @@ class MediaStream:
132
132
 
133
133
  class VideoStream(MediaStream):
134
134
  def __init__(
135
- self, ffmpeg_normalize: FFmpegNormalize, media_file: MediaFile, stream_id: int
135
+ self,
136
+ ffmpeg_normalize: FFmpegNormalize,
137
+ media_file: MediaFile,
138
+ stream_id: int,
139
+ attached_pic: bool = False,
136
140
  ):
137
141
  super().__init__(ffmpeg_normalize, media_file, "video", stream_id)
142
+ # Cover art rather than a video track
143
+ self.attached_pic = attached_pic
138
144
 
139
145
 
140
146
  class SubtitleStream(MediaStream):