Jonathan Thomas
d70e80eac4
Harden playback/cache path for malformed media and concurrent timeline updates
...
- Invalidate timeline cache on ApplyJsonDiff() clip insert (remove affected frame range).
- Add lock in Timeline::ClearAllCache() for safe concurrent access.
- Make VideoCacheThread cross-thread state safe (atomics + seek-state mutex).
- Lock CacheMemory::Contains() to avoid races.
- Handle malformed audio streams in FFmpegReader by disabling invalid audio and continuing video-only.
- Add FPS/timebase safety fallbacks in FFmpeg frame/PTS math.
- Guard Frame::GetSamplesPerFrame() against invalid inputs.
- Add/adjust regression tests for cache invalidation and invalid rate handling.
2026-02-11 20:11:47 -06:00
Jonathan Thomas
57c1fb2ec3
Merge pull request #1034 from OpenShot/sparse-vfr-support
...
Fix sparse-VFR stall and stabilize missing-frame image fallback
2026-02-10 12:02:07 -06:00
Jonathan Thomas
149456d13f
Merge pull request #1032 from OpenShot/cache-before-playhead
...
VideoCacheThread: Add Directional Pre-roll
2026-02-10 11:51:21 -06:00
Jonathan Thomas
2e4e12d2c7
Setting a minimum # of frames (floor) in Timeline, FFmpegReader, and FrameMapper - so low cpu/thread systems don't end up with a tiny # that makes passing our unit tests difficult.
2026-02-09 22:10:32 -06:00
Jonathan Thomas
6f63254c08
More changes to seek logic to pass unit tests on Windows.
2026-02-09 21:35:06 -06:00
Jonathan Thomas
d6b54091d7
Adding minimum cache size floor, for systems with very few cores. This is required to fix a failure running unit tests on our GitLab runners.
2026-02-09 21:14:45 -06:00
Jonathan Thomas
367d21affe
Fix FFmpeg seek fallback to avoid overshoot frame mismatches. Harden FFmpegReader::CheckSeek() when seek retries are exhausted.
2026-02-09 20:51:24 -06:00
Jonathan Thomas
01e60463db
FFmpegReader: fix sparse-VFR stall and stabilize missing-frame image fallback
...
- prevent ReadStream() infinite loop when packet counters stall at EOF with no packet/hold state by detecting no-progress and forcing EOF completion
- improve missing-frame handling on sparse timelines by preferring chronological image sources:
- previous finalized frame (f->number - 1)
- last finalized video frame (last_final_video_frame)
- last decoded video frame only if not from the future
- black frame only as last resort
- use the same finalized/decoded fallback when largest_frame_processed is no longer cached
- track/reset last_final_video_frame across finalize/seek/close lifecycle
Fixes:
- hard stall around gap frames
- black flashing from cache churn on sparse streams
- out-of-order jitter caused by reusing future-decoded frames
2026-02-07 22:40:43 -06:00
Jonathan Thomas
f3c4504662
Improve benchmark regression caused by aggressive memory trimming, and caches that were too small. A new debounce strategy for memory trimming (1 time max per 30 seconds).
2026-02-06 23:11:00 -06:00
Jonathan Thomas
de012ac6c8
Improve seek retry fallback and clean up hw decode logging
...
- add adaptive seek fallback and switch fprintf to ZmqLogger
- improves seeking on certain files by up to 30% (faster)
- avoids situations where seeking too far would sometimes freeze on certain videos
2026-02-06 16:46:40 -06:00
Jonathan Thomas
43f9ed89ae
VideoCacheThread: add directional preroll
...
- start cache rebuilds with a preroll offset (settings-based)
- tighten isReady to require frames ahead/behind playhead add unit tests for preroll clamping and readiness
2026-02-05 12:39:06 -06:00
Jonathan Thomas
47b308122f
Merge pull request #1026 from OpenShot/install-prefix-python
...
Take 2: Trying again to fix the python fallback directory detection f…
2025-12-16 23:23:44 -06:00
Jonathan Thomas
3f60f601ca
Take 2: Trying again to fix the python fallback directory detection for Launchpad build servers
2025-12-16 23:23:07 -06:00
Jonathan Thomas
faa6827f1c
Merge pull request #1025 from OpenShot/install-prefix-python
...
Fixing Cmake fallback python folder detection (to not return /usr/local)
2025-12-16 21:53:04 -06:00
Jonathan Thomas
353e6ae4f1
Changing python install detected folder, to be relative folder. This is breaking on some build servers, due to returning an absolute path that is installed outside of the install prefix.
2025-12-16 21:05:23 -06:00
Jonathan Thomas
ff45df1e99
Merge pull request #1024 from OpenShot/missing-sstream-includes
...
Adding missing <sstream> includes
2025-12-16 19:02:22 -06:00
Jonathan Thomas
16f791a55a
Adding missing <sstream> includes for older compilers, and because it should be included anyway
2025-12-16 18:23:57 -06:00
Jonathan Thomas
13e1d9d0b3
Merge pull request #1016 from OpenShot/release-20250612
...
Release of 0.5.0 libopenshot (for OpenShot 3.4)
2025-12-16 02:03:54 -06:00
Jonathan Thomas
2a82bed607
Adding upscaling for crop effect + resize property - so cropping into higher resolution content does not become blurry.
v0.5.0
2025-12-15 23:34:48 -06:00
Jonathan Thomas
bd59e6bb37
Fix mixing licensing headers
2025-12-15 21:13:34 -06:00
Jonathan Thomas
7fdd145dc2
Adding new memory trimming to more forcefully return memory to the OS after major memory clearing events (i.e. clearing all cache, closing readers, or large amounts of cache cleared). Also, refactoring default cache sizes in Timeline, FrameMapper, and FFmpegReader to better support high frame rate and high resolution videos (i.e. 4k 60 fps) so we don't immediately run out of memory.
2025-12-14 23:53:36 -06:00
Jonathan Thomas
1f06f03e9c
Adding unit tests for image magic durations
2025-12-10 18:38:07 -06:00
Jonathan Thomas
94fab00048
Updating video_length and duration calculations to be consistent on image readers also (QtImageReader, ImageReader)
2025-12-08 18:33:23 -06:00
Jonathan Thomas
eea55982fd
FFmpegReader: add duration strategy modes and unify duration/frame calculations. This is a potentially breaking change, where we ensure all durations and video_length calculations coming from FFmpegReader are now fully consistent - even if we must slightly adjust a duration from the video or audio stream. This keeps the 2 attributes identical in meaning (video_length X FPS == duration, no exceptions). Unknown durations are no longer -1 video_length but 0, and 0 duration.
2025-12-08 17:07:21 -06:00
Jonathan Thomas
af9a4893ed
Fixing regression inside AudioWaveformer so it uses a proper detached reader, and no longer mutates the Clip's reader (preventing a bug which caused our video to disappear when waveforms were used on the clip)
2025-11-24 18:33:25 -06:00