Skip to content

Editor: seeking to the last frame fails to decode — "Preview unavailable on this machine" (off-by-one at nb_frames-1) #635

Description

@eliel-alves

Description

In the editor, seeking to the last frame of a recording fails to decode and the preview falls back to "Preview unavailable on this machine". The message suggests a machine/driver problem, but the index in the error is exactly nb_frames - 1, which points to an off-by-one in the seek/decode path rather than a hardware issue.

Everything else on this machine works on hardware: VAAPI encode is accepted with no rejections, the Vulkan/dmabuf path is active, and Whisper STT runs on Vulkan at 11.4x real-time.

Error

[live] render thread error: decode_at(frame_idx=2434) : aucune frame reçue
native bridge compositor.readFrame failed: Error: decode_at(frame_idx=2434) : aucune frame reçue
    at CP.readFrame (app.asar/dist-electron/main-FolZ9gtb.js:30644:18)
    at app.asar/dist-electron/main-FolZ9gtb.js:77279:27
  code: 'GenericFailure'

Why it looks like off-by-one

ffprobe on the recording that produced the error:

codec_name=h264
profile=High
width=1920
height=1080
pix_fmt=yuv420p
r_frame_rate=60/1
nb_frames=2435
duration=40.576000

nb_frames = 2435, so valid indices are 0..2434. The failing request is frame_idx=2434 — the last valid frame. The decoder returns no frame for it.

Reproduce

  1. Record ~40s at 1920x1080 60fps on Linux/Wayland (VAAPI encode).
  2. Open the recording in the editor.
  3. Drag the playhead to the very end of the timeline.
  4. Preview goes to "Preview unavailable on this machine"; the log shows decode_at(frame_idx=<nb_frames-1>) : aucune frame reçue.

Seeking back to any earlier point recovers, so it is specific to the final frame.

Capture pipeline (all healthy)

[capture-linux] encoder {"video":"vaapi","rejected":[]}
[d3d] adaptateur Vulkan : AMD Radeon RX 6600 (RADV NAVI23) (DiscreteGpu, Vulkan)
      -> backend Hardware, export dmabuf actif
[whisper-stt] model loaded; backend=whispercpp-vulkan
[stt] done on whispercpp-vulkan: 40.6s audio in 3.6s (0.09 rtf, 11.4x real-time)

Cursor telemetry is complete as well — 1115 move + 31 click samples spanning the full 40.559s, so the portal + evdev path is working correctly on GNOME Wayland.

Environment

OpenScreen 1.11.0 (AppImage)
OS Ubuntu 26.04 LTS, kernel 7.0.0-31-generic
Desktop GNOME 50.1, Wayland
GPU AMD Radeon RX 6600 (radeonsi, navi23, RADV NAVI23)
Mesa 26.0.3
Electron Chrome/146.0.7680.188
Encoder VAAPI (hardware), dmabuf export active

Note on the message

"Preview unavailable on this machine" reads as a capability problem and sent me looking at drivers and portals first. Since the underlying failure here is a single-frame decode error, surfacing the frame index (or a "could not decode frame N" wording) would point at the real cause much faster.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions