Commit Graph

2741 Commits

Author SHA1 Message Date
Jonathan Thomas
ec1bd0185a Reverting GitHub Windows builder to use ffmpeg (instead of ffmpeg 4.4), and removing version logic around swresample/avresample logic - since GitHub versions are completely different than expected (for example: avformat version: 3.100 vs avformat version: 58.45.100) 2023-03-10 14:36:08 -06:00
Jonathan Thomas
1c832dc1d5 Changing GitHub windows builder to use ffmpeg 4.4 2023-03-10 14:14:52 -06:00
Jonathan Thomas
09ce05bbf2 Many improvements for smooth audio playback when 'time' keyframes are used for time remapping.
- Added new Frame::ReverseAudio() helper method - for time keyframe support playing backwards audio
- Fixed math rounding error on time keyframe Resampler, to use the rounded source samples value
- Removed some unused args and Frame audio methods
- Reset FrameMapper resample context when non-adjacent frames are requested
- Correctly reverse Frame audio if a time keyframe is present, and reversing audio
- Rewrite Keyframe::IsIncreasing() function, to give accurate direction of time keyframes at any index (special logic to support first and last indexes)
- Fixed Keyframe unit tests - since logic has changed a bit
- Improved time mapping unit tests
- Replace many c-style casts with static_cast
- Added new sine.wav test file
2023-03-10 01:15:14 -06:00
Jonathan Thomas
d104664da3 Fixed an issue with reversed resampled audio in FrameMapper, which caused lots of clicks / seams between frames... Also, added a new overload to GetInterleavedAudioSamples, to reverse the samples before returning the float* array. Essentially, the FrameMapper is now aware of it's parent clip, and especially the 'time' keyframe, if the audio is in the forward or reverse direction. Also fixed a memory leak in time remapping. 2023-02-28 14:13:12 -06:00
Jonathan Thomas
59d46e59be Large refactor of Clip::GetFrame and time-remapping of audio samples.
- Refactor AudioLocation into own header
- AudioResampler now supports variable channels
- Adding cache back to Clips - to prevent the cost of multiple calls for the same GetFrame() frame, used in time-remapping
- Large refactor of Clip::GetFrame, to prevent multiple code paths, and much improved time-remapping
- Clip's time keyframe now supports Bezier and sub-frame precision - to you can curve audio speed using any curve shape
- Fixing # of audio samples on Clip frame's, based on timeline position (to predictably divide samples per frame)
- New Clip unit tests for time remapping and resampling audio, and reversing audio
- New Frame::GetAudioSamples arg, to allow for reversing the direction of audio samples
- Fix bug in Frame::AddAudioSilence() to correctly cache the # of audio samples
- FrameMapper clean up resample context (when changing frame rate)
- FrameMapper refactor to optimize # of calls to Reader()::GetFrame(), since calls to Clip::GetFrame are quite expensive
- Removing RepeatingFraction functionality from Keyframe object (since it was a bad implementation detail from our previous time remapping)
- Making Keyframe GetDelta method a float, and no longer an int - to allow for more precision on time remapping
- Large amount of white space fixing (to make things consistent)
2023-02-27 22:11:13 -06:00
Jonathan Thomas
8f92bac0b7 Merge pull request #899 from OpenShot/improved-captions
Improved Caption Effect
2023-02-15 13:15:03 -06:00
Jonathan Thomas
450af52f64 WIP: Experimental Unit Tests without Display (#900)
* Experimental test for unit tests without display

* Ignore unit tests running on an invalid QT Platform (i.e. offscreen - running as a test on GitHub)

* Fix whitespace on Caption effect

* Check for env variable for QT_QPA_PLATFORM == offscreen, and ignore Caption unit tests (for GitHub checks)
2023-02-14 01:44:38 -06:00
Jonathan Thomas
fbbe4571a5 Removing debug code for Caption effect unit tests 2023-02-14 00:30:25 -06:00
Jonathan Thomas
bcade0c276 Enabling high DPI support for Caption unit test, and using different values for Windows and Linux unit tests, since fonts are rendering using different systems... and are not equal. 2023-02-14 00:16:41 -06:00
Jonathan Thomas
2131d38a72 Adding debug code for failed windows unit test 2023-02-13 23:35:10 -06:00
Jonathan Thomas
52a9e3be5d - Clip reader init should consider paths with a % to use FFmpegReader by default (i.e. image sequences)
- FFmpegReader info struct should not be initialized during Open() after it is initially populated - so our SetJson() method can properly override it's values
- FrameMapper Json() method should include it's mapped Reader JSON - even though it is not yet possible to read it back in yet
- New unit tests for Timeline ApplyJsonDiff, and verification that we can override FFmpegReader info struct (i.e. updating FPS, time bases, etc...)
- Some whitespace fixes
2023-02-13 16:42:21 -06:00
Jonathan Thomas
2f08ac0c1c Allow waveform generation to happen before Clip effects are processed. Also, allow the Caption effect to add image data (i.e. waveform graphic) and allow Clip to detect that image to output it correctly. The result of all this: audio-only files now support the Caption effect, on top of the generated waveform image. Lastly, generated waveforms should use the entire Timeline size - and not a pre-determined 720x480 size. 2023-02-10 15:16:56 -06:00
Jonathan Thomas
06c140c23c Improvement to Caption effect, including Caption unit-tests, and the following fixes:
- improved regex, which now detects lines without blank lines separating them, and detects captions that start with numbers
- line wrapping fixed for languages that don't use spaces
- forced line wrapping of long strings of characters
2023-02-10 15:14:10 -06:00
Jonathan Thomas
70e86ef044 Improved Profile Class (Helper methods, Sortable, Unit tests) (#895)
* Removing legacy profile property. Add new operators for Profile classes (for comparison). Also added new functions to generate different variations of the Profile data (key, short name, long name, long name w/description).

* Add empty constructor for Profile class, and new Profile unit tets

* Adding zero padding to profile Key function, for easier sorting: 01920x1080i2997_16:09

* Clear setfill flag after creating Key() output

* Updating example exe to load an *.osp project file via C++, which makes debugging complex broken projects much easier.

* - Add new unit test to FFmpegWriter to create an animated GIF and verify it can be wrapped with a FrameMapper (with no audio track)
- Improve FrameMapper to ignore missing audio data (i.e. when no audio samples present, don't try and find them or resample them)

* Fix some whitespace issues

* Fix inline documentation mistype

* Fixed missing reuse licensing on new example profile files

* Changing Profile::Key() format to exclude the : character, since Windows file names cannot contain that

* - Large memory leak fixed in FFmpegWriter when closing the video & audio contexts
- Reducing # of cached frames and rescalers to 1, since we no longer use OMP and this is unneeded - we need to refactor much of this code out eventually

* - Fixing whitespace issues
- Code clean-up / line wrapping / etc...
2023-02-02 16:29:38 -06:00
Frank Dana
510a7690f6 Remove CODEOWNERS file (#841) 2023-01-10 15:02:04 -06:00
Jonathan Thomas
99aab0a12b Fix Brightness, Hue, and Saturation effects (#889)
* Fix Brightness, Hue, and Saturation effects to fully support pre-multiplied colors (when alpha channel found)

* Fixing whitespace on effects
2022-12-21 22:18:42 -06:00
Jonathan Thomas
4fbb4392ba Fix Transition/Mask replace_image Property (#888)
* Fix ColorShift bug when only adjusting the Y keyframes

* Fixing 'replace-image' functionality of the  Mask / Transition effect - used for debugging masks
2022-12-20 15:48:13 -06:00
Jonathan Thomas
3001d1b059 Fix ColorShift bug when only adjusting the Y keyframes (#887) 2022-12-20 12:24:16 -06:00
Jonathan Thomas
94e5f740f1 Update README.md copyright and license info, to be more clear. Also updating dates. (#886) 2022-12-19 17:08:45 -06:00
Jonathan Thomas
31a1abb557 Add COPYING file back to repository, to make it clear the primary license which affects libopenshot source code (so GitHub will display it), and fix typo in reuse dep5 file. (#885) 2022-12-19 16:46:32 -06:00
Jonathan Thomas
186a4ca5c1 Refactoring Audio Device detection (don't crash on Windows, find actual sample rate and device details) (#883)
* Close down ZMQ context to stop the zmq threads (related to sentry bug: OPENSHOT-3X)

* Add Support for Windows 7/8.1 (#881)

Adding protection around getting current sample rate for win 7, if audio device not found. Also added mutex for Singleton method. Also, making whitespace consistent on AudioPlaybackThread.cpp

* Big refactor of audio device opening - with multiple sample rates attempted, for better recovery from a missing or unsupported sample rate. Debug logs added for testing.

* Additional failure logging for windows audio device init

* Refactor of Audio Device Initialization (#882)

* Huge refactor of audio device initialization:
- Attempt requested audio device first, and then iterate through all known audio types and devices, and common sample rates. The idea is to ignore an invalid default or invalid requested device, and keep looking until we find a valid one
- New public method to return active, open audio device
- Added methods for AudioDeviceInfo struct, to make it callable from Python
- Some code clean-up and whitespace fixes
- New unit tests for AudioDeviceManagerSingleton

* Ignore audio device unit tests on systems with "No Driver" returned in the audio error message

* Ignore audio device unit tests if any error is found during initialization (i.e. build servers don't have audio cards)

* Trying to update GitHub libomp errors during build checks

* Remove zmq context shutdown call, due to the method missing on newer versions of zmq.hpp

* Downgrading GitHub Ubuntu latest image to Ubuntu 20.04, for compatibility with Catchv2

* Initialize all audio device manager variables correctly, and ignore unit test on low or missing sample rate systems (i.e. GitHub build servers)
2022-12-19 13:15:43 -06:00
Jonathan Thomas
89e4b1dabd Merge pull request #879 from OpenShot/release-20221201
Bumping version to 0.3.0, SO 23
2022-12-10 15:31:55 -06:00
Jonathan Thomas
264205da9f Bumping version to 0.3.0, SO 23, and minimum libopenshot-audio dependency to 0.3.0. v0.3.0 2022-12-01 16:04:03 -06:00
Jonathan Thomas
5493ea9afd Merge pull request #878 from OpenShot/new-linux-appimage
Support for New Linux Build Server + glibc Wrapping
2022-11-30 09:09:17 -06:00
Jonathan Thomas
5e5e052b26 Experimental AppImage glibc wrapping for backwards compatibility (older distros) 2022-11-28 16:31:35 -06:00