Lightningbeam/lightningbeam-ui/lightningbeam-editor/src
Skyler Lehmkuhl 3e4f29c297 Wire zero-copy VAAPI H.264 into video+audio export
When exporting H.264 with audio, try the gpu-video-encoder ZeroCopyEncoder:
render each frame to RGBA and hardware-encode it into a VAAPI surface
inline, on the encoder's own VAAPI-capable wgpu device — no GPU->CPU
readback, no swscale, no software-encoder thread. Falls back to the
existing software path verbatim when VAAPI/the device is unavailable
(non-Linux, non-H264, or init failure), so it's additive.

- VideoExportState gains zero_copy: Option<ZeroCopyVideo> (encoder + its own
  vello renderer + ExportGpuResources + a reused RGBA target, all on the
  encoder's device).
- start_video_with_audio_export builds it for H.264 and skips spawning the
  software encoder thread when present.
- render_next_video_frame routes to a zero-copy arm that reuses
  render_frame_to_gpu_rgba on the encoder's device, then encode_rgba; on the
  last frame finish() writes the temp .mp4 and sets video_progress=Complete
  so the existing mux runs. video_thread=None makes the mux join a no-op.

Separate export device (vs modifying the eframe device) keeps this contained
to export. Video-only export stays on the software path for now. Runtime
verification (an actual H.264 export) is pending — cannot run the editor in
the dev container.
2026-06-25 15:44:50 -04:00
..
export Wire zero-copy VAAPI H.264 into video+audio export 2026-06-25 15:44:50 -04:00
panes Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
preferences Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00
tools Add drawing tablet input support 2026-03-11 10:58:30 -04:00
widgets make sample load menus consistent 2026-02-16 19:12:21 -05:00
config.rs Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00
cqt_gpu.rs Add clip split and duplicate commands 2026-02-15 02:11:57 -05:00
curve_editor.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
custom_cursor.rs Add tool skeletons 2026-03-06 07:22:50 -05:00
debug_overlay.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
default_instrument.rs clean up some compiler warnings 2025-12-03 06:39:26 -05:00
effect_thumbnails.rs Fix gamma handling and improve brush canvas performance 2026-06-16 08:32:39 -04:00
gpu_brush.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
gpu_timer.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
keymap.rs Onion skinning (raster): toggle + tinted ghosts of the active layer 2026-06-20 23:05:57 -04:00
main.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
main.rs.backup Select and move shapes 2025-11-18 00:22:28 -05:00
menu.rs Onion skinning (raster): toggle + tinted ghosts of the active layer 2026-06-20 23:05:57 -04:00
notifications.rs Fix video export resolution scaling and post-export UI hang 2026-06-16 08:35:52 -04:00
raster_tool.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
sample_import.rs Repair test suite + fix sample key-range overlap bug 2026-06-23 19:07:06 -04:00
sample_import_dialog.rs Initial work on movie clips 2026-02-21 00:54:38 -05:00
tablet.rs fix build issues 2026-06-02 13:41:10 -04:00
test_mode.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
theme.rs Repair test suite + fix sample key-range overlap bug 2026-06-23 19:07:06 -04:00
theme_render.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
waveform_gpu.rs Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00