diff --git a/pyproject.toml b/pyproject.toml index f67a3a9..542e18c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,10 +7,8 @@ name = "binary-waterfall" version = "3.7.0" readme = "README_pypi.md" description = "A Raw Data Media Player" -license= {file = "LICENSE"} -authors = [ - {name = "Ella Jameson", email = "ellagjameson@gmail.com"} -] +license = { file = "LICENSE" } +authors = [{ name = "Ella Jameson", email = "ellagjameson@gmail.com" }] classifiers = [ "Topic :: Multimedia", "Topic :: Multimedia :: Graphics", @@ -21,15 +19,15 @@ classifiers = [ "Topic :: Multimedia :: Sound/Audio :: Players", "Topic :: Multimedia :: Video", "Topic :: Multimedia :: Video :: Conversion", - "Topic :: Multimedia :: Video :: Display" + "Topic :: Multimedia :: Video :: Display", ] dependencies = [ - "pyyaml", - "Pillow", - "PyQt5", - "pydub", - "moviepy", - "proglog" + "pyyaml==6.0.3", + "Pillow==11.3.0", + "PyQt5==5.15.11", + "pydub==0.25.1", + "moviepy==2.2.1", + "proglog==0.1.12", ] [project.urls] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7d538f7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# All the dependencies are now tracked in the pyproject.toml, this file is provided for legacy reasons. +-e . diff --git a/src/__main__.py b/src/__main__.py new file mode 100644 index 0000000..c0060bf --- /dev/null +++ b/src/__main__.py @@ -0,0 +1,4 @@ +import binary_waterfall + +if __name__ == "__main__": + binary_waterfall.run() diff --git a/src/binary_waterfall/dialogs.py b/src/binary_waterfall/dialogs.py index e11f60d..46a3fab 100644 --- a/src/binary_waterfall/dialogs.py +++ b/src/binary_waterfall/dialogs.py @@ -1010,7 +1010,7 @@ def __init__(self, parent=None): self.icon_label.setFixedSize(self.icon_size, self.icon_size) self.about_text = QLabel( - f"{constants.TITLE} v{constants.VERSION}\nby {constants.COPYRIGHT}\n© Copyright 2023\n\n" + f"{constants.TITLE} v{constants.VERSION}\nby {constants.COPYRIGHT}\n© Copyright 2026\n\n" f"{constants.DESCRIPTION}\n\n" f"Project Home Page:\n{constants.PROJECT_URL}\n\n" f"Donate:\n{constants.DONATE_URL}") diff --git a/src/binary_waterfall/outputs.py b/src/binary_waterfall/outputs.py index 945e8de..ac36c5d 100644 --- a/src/binary_waterfall/outputs.py +++ b/src/binary_waterfall/outputs.py @@ -4,7 +4,8 @@ import time import tempfile import pydub -from moviepy.editor import ImageSequenceClip, AudioFileClip +# moviepy 2.x exposes core classes at package root; import directly for compatibility +from moviepy import ImageSequenceClip, AudioFileClip from PIL import Image from PyQt5.QtCore import QUrl from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent @@ -294,7 +295,8 @@ def export_frame(self, resized = source else: if keep_aspect: - output_size = helpers.get_size_for_fit_frame(content_size=source.size, frame_size=size)["size"] + output_size = helpers.get_size_for_fit_frame( + content_size=source.size, frame_size=size)["size"] else: output_size = size @@ -320,10 +322,12 @@ def export_audio(self, filename): shutil.copy(self.bw.audio_filename, filename) elif filename_ext == constants.AudioFormatCode.MP3.value: # Use Pydub to export MP3 - pydub.AudioSegment.from_wav(self.bw.audio_filename).export(filename, format="mp3") + pydub.AudioSegment.from_wav( + self.bw.audio_filename).export(filename, format="mp3") elif filename_ext == constants.AudioFormatCode.FLAC.value: # Use Pydub to export FLAC - pydub.AudioSegment.from_wav(self.bw.audio_filename).export(filename, format="flac") + pydub.AudioSegment.from_wav( + self.bw.audio_filename).export(filename, format="flac") def get_frame_count(self, fps): audio_duration = self.bw.get_audio_length() / 1000 @@ -350,7 +354,8 @@ def export_sequence(self, for frame in range(frame_count): frame_number = str(frame).rjust(frame_number_digits, "0") - frame_filename = os.path.join(directory, f"{frame_number}{image_format.value}") + frame_filename = os.path.join( + directory, f"{frame_number}{image_format.value}") frame_ms = round((frame / fps) * 1000) if progress_dialog is not None: @@ -409,14 +414,16 @@ def export_video(self, if progress_dialog.wasCanceled(): shutil.rmtree(temp_dir) return - progress_dialog.setLabelText("Splicing final video file... (program may lag)") + progress_dialog.setLabelText( + "Splicing final video file... (program may lag)") # Export audio self.export_audio(audio_file) # Prepare the custom logger to update the progress box if progress_dialog is not None: - custom_logger = helpers.QtBarLoggerMoviepy(progress_dialog=progress_dialog) + custom_logger = helpers.QtBarLoggerMoviepy( + progress_dialog=progress_dialog) else: custom_logger = "bar"