diff options
| author | Brianna Rainey | 2026-02-12 15:38:54 -0500 |
|---|---|---|
| committer | GitHub | 2026-02-12 15:38:54 -0500 |
| commit | f03a3a686c7304588dd434322c73506531e53595 (patch) | |
| tree | ee41d920873e9a77c41f4a65857af019e71a4754 /src/avp/gui/mainwindow.py | |
| parent | 48a9105eab94e64101470402427564203e1d8970 (diff) | |
v2.2.4 - Quiet FFmpeg; add "invert" option to Classic Vis; fix CLI parsing for Image component (#96)
* change noisiness of terminal output
ffmpeg no longer prints everything into the terminal unless we're in `--verbose` mode. percentage progress text stays on one line while not in verbose mode.
* Added hint to run `avp --verbose` if `avp --log` is run with no avp_debug.log file present
* Classic Visualizer: add invert option
* Image component: fix path commandline option
* Image component: restrict file formats in CLI to match GUI
* Color component: add tooltip to color2 picker (second color of gradients)
* change tests to work with pytest-xdist
avp core stores its config (location of `settings.ini`) in temp directories if using multiple workers to run tests, so they don't interfere with each other. when using a single worker, the `tests/data/config` directory is still used
* check alt comp names when parsing cmdline
* rename `original.py` to `classic.py`
* move `component.py` into subpackage
* rename comp_original to comp_classic
* show traceback if renderFrame() raises exception
* do not try to insert non-existent components from project files
* add "composite" property for components
if a component returns "composite" then it will receive a frame to draw on during calls to previewRender and frameRender
* more tests of projects, actions, waveform, spectrum, image, color, classic
* do not change presetDir to "projects" within PresetManager
Diffstat (limited to 'src/avp/gui/mainwindow.py')
| -rw-r--r-- | src/avp/gui/mainwindow.py | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/avp/gui/mainwindow.py b/src/avp/gui/mainwindow.py index 3221783..fac1e41 100644 --- a/src/avp/gui/mainwindow.py +++ b/src/avp/gui/mainwindow.py @@ -25,7 +25,7 @@ from . import preview_thread from .preview_win import PreviewWindow from .presetmanager import PresetManager from .actions import * -from ..toolkit.ffmpeg import createFfmpegCommand +from ..toolkit.ffmpeg import createFfmpegCommand, checkFfmpegVersion from ..toolkit import ( disableWhenEncoding, disableWhenOpeningProject, @@ -330,26 +330,13 @@ class MainWindow(QtWidgets.QMainWindow): ) else: if not self.settings.value("ffmpegMsgShown"): - try: - with open(os.devnull, "w") as f: - ffmpegVers = checkOutput( - [self.core.FFMPEG_BIN, "-version"], stderr=f - ) - ffmpegVers = str(ffmpegVers).split()[2].split(".", 1)[0] - if ffmpegVers.startswith("n"): - ffmpegVers = ffmpegVers[1:] - goodVersion = int(ffmpegVers) > 3 - except Exception: - goodVersion = False - else: - goodVersion = True - - if not goodVersion: - self.showMessage( - msg="You're using an old version of Ffmpeg. " - "Some features may not work as expected." - ) - self.settings.setValue("ffmpegMsgShown", True) + ffmpegGoodVersion, ffmpegVersionNum = checkFfmpegVersion() + if not ffmpegGoodVersion: + self.showMessage( + msg="The version of FFmpeg ({ffmpegVersionNum}) is " + "not recognized. Some features may not work as expected." + ) + self.settings.setValue("ffmpegMsgShown", True) # Hotkeys for projects @@ -734,6 +721,23 @@ class MainWindow(QtWidgets.QMainWindow): self.progressLabel.setText(value) else: self.progressBar_createVideo.setFormat(value) + if log.getEffectiveLevel() > logging.INFO: + # if ffmpeg is quiet, print progress ourselves + if any( + [ + value.startswith("Export C"), + value.startswith("Analyzing"), + value.startswith("Loading"), + ] + ): + # Don't duplicate completion/failure messages or send too many messages + return + elif not value.startswith("Exporting"): + print(value) + else: + # overwrite previous message with next one + # if the text is our main export progress + print(f"\r{value}", end="") def updateResolution(self): resIndex = int(self.comboBox_resolution.currentIndex()) |
