Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
39b0222
feat(player): Add a timeline to the native preview
dmtrKovalenko Oct 27, 2026
aa209bf
fix(player): Use the compact fframes logo for frame numbers
dmtrKovalenko Oct 28, 2026
36740fb
perf(media): Reuse converted video frames during playback
dmtrKovalenko Oct 28, 2026
c961821
perf(player): Keep playback decoders separate from the filmstrip
dmtrKovalenko Oct 28, 2026
476ce22
perf(player): Keep prefetched frames when playback resumes
dmtrKovalenko Oct 28, 2026
23a4295
perf(player): Buffer finished frames and share video decoders
dmtrKovalenko Oct 28, 2026
3747317
perf(player): Reduce preview memory and bound video workers
dmtrKovalenko Oct 28, 2026
098c57f
fix(media): Release hardware devices when decoders close
dmtrKovalenko Oct 28, 2026
71505d8
perf(player): Release idle decoders and map VideoToolbox frames in pr…
dmtrKovalenko Oct 29, 2026
ae9c9af
perf(player): Reduce memory use for vector previews on Mac
dmtrKovalenko Oct 29, 2026
f5245f0
test(renderer): Define the audio fixture before playback assertions
dmtrKovalenko Oct 29, 2026
7992844
perf(player): Release unused Skia GPU resources during preview
dmtrKovalenko Oct 29, 2026
40ab586
perf(player): Select preview workers without starting Rayon
dmtrKovalenko Oct 30, 2026
164d946
refactor(player): Draw scenes directly with Skia and buffer prepared …
dmtrKovalenko Oct 30, 2026
a43b631
perf(media): Reuse the pixel buffers of released video frames
dmtrKovalenko Oct 31, 2026
fa02805
perf(player): Prepare only the pointer frame while scrubbing
dmtrKovalenko Oct 31, 2026
2faf74d
perf(player): Feed the audio callback from a lock-free ring
dmtrKovalenko Oct 31, 2026
dfda523
perf(player): Present without waiting for the GPU
dmtrKovalenko Oct 31, 2026
de143f8
perf(player): Share source decoders between a few playback workers
dmtrKovalenko Oct 31, 2026
e1bafc0
fix(player): Keep 100 text cache entries per worker
dmtrKovalenko Oct 31, 2026
161feae
feat(media): Keep one shared decoder per playback speed
dmtrKovalenko Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,19 @@ cargo fframes new my-video
cd my-video && cargo run --release -- preview
```

The preview timeline sits below landscape and square videos and to the left of portrait videos.
Drag the filmstrip to scrub, or click a scene marker to pause on its first frame. Use `[` and `]`
to jump between scenes and `,` and `.` to step one frame. Press `Space` to play or pause, or `T`
to hide the timeline and expand the video.

On macOS the studio tries VideoToolbox for supported source videos and falls back to software
for unsupported formats. `preview --software-decode` uses the CPU for decoding while keeping
the selected drawing backend. Playback and filmstrip workers release idle source decoders.
The GPU preview draws each scene through Skia directly into the window drawable or swapchain.
The default buffer holds up to four prepared scene trees, and only the frame under the pointer
is prepared while you drag the timeline. Decoders reuse the pixel buffers of frames that no
scene tree holds any more. The CPU backend draws directly into the window buffer.

`cargo fframes new` takes `--template single-scene|multi-scene`, `--format landscape|portrait|square|uhd`, `--fps`,
`--title` and `--backend`. On macOS and Linux (arm64, x86_64) the first build downloads prebuilt Skia and ffmpeg
libraries and takes under a minute on a fast machine; other targets and feature combinations
Expand Down
4 changes: 2 additions & 2 deletions examples/arm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ fn main() -> ExitCode {
..Default::default()
};

let cpu = args.app.cpu;
let needs_export_gpu = !args.app.cpu && !matches!(args.command, Some(cli::Command::Preview(_)));
let command = cli::new(&video, options)
.args(args)
.preview(fframes_native_player::cli_preview)
.default_output("out.mp4");
if cpu {
if !needs_export_gpu {
return command.run();
}

Expand Down
4 changes: 3 additions & 1 deletion fframes-media/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ mp3lame = ["ffmpeg-sys-fframes/build-lib-mp3lame"]
opus = ["ffmpeg-sys-fframes/build-lib-opus"]
vpx = ["ffmpeg-sys-fframes/build-lib-vpx"]
# enable various hardware accelerations
videotoolbox = ["ffmpeg-sys-fframes/build-videotoolbox"]
# The player opts in on macOS without changing decoding policy for exports.
preview-videotoolbox = ["ffmpeg-sys-fframes/build-videotoolbox"]
videotoolbox = ["preview-videotoolbox"]
audiotoolbox = ["ffmpeg-sys-fframes/build-audiotoolbox"]
vaapi = ["ffmpeg-sys-fframes/build-vaapi"]
nvidia = ["ffmpeg-sys-fframes/build-nvidia"]
Expand Down
Loading
Loading