diff options
| author | Brianna Rainey | 2026-01-22 16:29:46 -0500 |
|---|---|---|
| committer | GitHub | 2026-01-22 16:29:46 -0500 |
| commit | a12be862e22bdec6a243a3f0b5f4f28d69084a2a (patch) | |
| tree | 7f2b21f58cf54deb81bfe77d7ef45358c80454f0 /src/avp/video_thread.py | |
| parent | 36760579a0ae604074034c4b78cda2e3f3b001de (diff) | |
fix #89 with Image component v2.0 + 23 tests (#90)
* qtbot is needed in any test that uses a QObject
previously these tests would fail if they ran before qtbot was initialized by another test. I'm now running tests in a random order
* add tests for drawBars, readAudioFile, BlankFrame
* replace numpy.seterr with numpy.errstate
* fix incorrect comment
* add MockVideoWorker and imageDataSum
* test further into visualization (less likely to be a false positive)
* test FloodFrame function
* add failing test for Image component
one step towards fixing #89
* test component name CLI parsing
* prevent log warning when 1 setting changed
* correct tests to use widgets when needed
* test undo and blockSignals
* remove stretch_scale (use scale only)
* image ignores scale if stretch checkbox checked
fixes #89
* test Title Text component, ffmpeg command
* Image v2: replace stretched setting with resizeMode
3 resize modes are scale, cover, and stretch. Scale only applies when resizeMode is set to scale. Cover uses ImageOps.fit() to stretch while maintaining aspect ratio. Also, spinBox_scale was moved to be underneath comboBox_resizeMode.
* change transformData into staticmethod
the purpose is to allow easier reuse in other components
* add respondToAudio option to Image component
this causes the image to scale up and down slightly based on the input audio file
* cache static portion of image when animating
increases rendering speed of a 1-minute video by 12 seconds (based on two manual tests anyway)
Diffstat (limited to 'src/avp/video_thread.py')
| -rw-r--r-- | src/avp/video_thread.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/avp/video_thread.py b/src/avp/video_thread.py index 5d72409..967d2fe 100644 --- a/src/avp/video_thread.py +++ b/src/avp/video_thread.py @@ -253,18 +253,16 @@ class Worker(QtCore.QObject): @pyqtSlot() def createVideo(self): """ - 1. Numpy is set to ignore division errors during this method - 2. Determine length of final video - 3. Call preFrameRender on each component - 4. Create the main FFmpeg command - 5. Open the out_pipe to FFmpeg process - 6. Iterate over the audio data array and call frameRender on the components to get frames - 7. Close the out_pipe - 8. Call postFrameRender on each component + 1. Determine length of final video + 2. Call preFrameRender on each component + 3. Create the main FFmpeg command + 4. Open the out_pipe to FFmpeg process + 5. Iterate over the audio data array and call frameRender on the components to get frames + 6. Close the out_pipe + 7. Call postFrameRender on each component """ log.debug("Video worker received signal to createVideo") log.debug("Video thread id: {}".format(int(QtCore.QThread.currentThreadId()))) - numpy.seterr(divide="ignore") self.encoding.emit(True) self.extraAudio = [] self.width = int(self.settings.value("outputWidth")) |
