Skip to content

[bug] Intel hardware transcodes die when the VAAPI decoder rebuilds its frames context mid-stream #2813

Closed

Description

@Quick104

What happened

An HDR transcode on an Intel GPU dies about two seconds in when the HEVC source makes the VAAPI decoder rebuild its frames context mid-stream. ffmpeg reconfigures the filter graph ("Reconfiguring filter graph because hwaccel changed"), and the reconfigured graph can't hand VAAPI frames to the hardware encoder that is already open, so ffmpeg exits. Silo restarts the transcode at the next segment, and it fails the same way: one session logged restart_count=31. The viewer gets the first segment and then nothing.

It happens on every Intel hardware graph, not only one tone mapper:

Plain VAAPI decode into showinfo hits the same reconfiguration error, so the trigger is the decode, not tone mapping. Software decode of the same file gives 100 frames in 4 seconds with no change in frame size, format or SAR.

I've only seen it on one file, a Dolby Vision Profile 5 web episode (HEVC Main 10, 3840x1608). Two other Profile 5 titles ran 240 of 240 frames through the same graphs. Other sources that rebuild the decoder's frames context mid-stream would likely fail the same way.

Steps to reproduce

On an Intel Arc A310 (iHD 26.3.5, jellyfin-ffmpeg 8.1.3) in a Silo dev deployment:

  1. Decode the file with VAAPI and send the frames anywhere:
    ffmpeg -v verbose -init_hw_device vaapi=hw:/dev/dri/renderD128 -filter_hw_device hw -hwaccel vaapi -hwaccel_output_format vaapi -ss 600 -t 4 -i <file> -an -sn -vf showinfo -f null -
  2. Around frame 50 the log shows Reconfiguring filter graph because hwaccel changed, then Error reinitializing filters!, and ffmpeg stops.
  3. In Silo: play the file on a client that needs an SDR transcode, with hardware acceleration set to QSV or VAAPI. The first segment arrives and the rest return 404 while the transcode restarts.

Expected behavior

The transcode keeps running when the decoder rebuilds its frames context. If ffmpeg can't, Silo should stop restarting the same failing graph and fall back to a route that works, such as software decode or software tone mapping when policy allows.

Silo version / commit

main at 1abb94d, and the #2734 branch.

Deployment

Docker, with remote transcode nodes.

Clients affected

Not client-specific.

Relevant logs

Step 1's command at -v verbose, raw, filtered to the graph lines:

[graph -1 input from stream 0:0 @ 0x732d4c008e40] w:3840 h:1608 pixfmt:vaapi tb:1/1000 fr:25/1 sar:1/1 csp:unknown range:pc alpha:unspecified
[graph -1 input from stream 0:0 @ 0x732d4c008e40] video frame properties congruent with link at pts_time: -2
[vf#0:0 @ 0x582f47be0ec0] Reconfiguring filter graph because hwaccel changed
[graph -1 input from stream 0:0 @ 0x732d4c3c0000] w:3840 h:1608 pixfmt:vaapi tb:1/1000 fr:25/1 sar:1/1 csp:unknown range:pc alpha:unspecified
[vf#0:0 @ 0x582f47be0ec0] Error reinitializing filters!

The ffmpeg stderr lines the Silo transcode node logged for one restart of a playback session (restart_count=1, seek_seconds=602, input_path=[REDACTED: media path]), raw apart from the omitted dst: format lists and the second Link block:

Impossible to convert between the formats supported by the filter 'Parsed_sidedata_10' and the filter 'auto_scale_0'
Link 'Parsed_sidedata_10.default' -> 'auto_scale_0.default':
  Pixel formats:
    src: vaapi
[vf#0:0 @ 0x5ad071e0c0c0] Error reinitializing filters!
[vf#0:0 @ 0x5ad071e0c0c0] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x5ad071e0c0c0] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/h264_vaapi @ 0x5ad071df5a80] [enc:h264_vaapi @ 0x5ad071df2680] Could not open encoder before EOF

Each attempt ended with ffmpeg_event="ffmpeg process exit error"; the session's restart_count reached 31.

Technical notes

  • -reinit_filter 0 doesn't help: the hwaccel change forces the reconfiguration anyway.
  • Adding a passthrough scale_vaapi=format=nv12 before the encoder (as QSV's interop does) doesn't help either; QSV fails the same way.
  • Two possible directions: decode on the CPU for streams that do this (software decode plus GPU upload already exists for codecs the GPU can't decode), or have the restart path switch the session to a working route after a repeated identical failure instead of retrying the same graph.

AI harness

Claude Code (T3 Code)

AI tool(s)

Claude Code, GitHub CLI, ffmpeg on a Silo dev deployment

AI model(s)

claude-opus-5-5

AI involvement

AI-assisted: found and reproduced by an agent while reviewing #2734; the maintainer directed the work.

Confirmations

  • I searched open and recently closed issues and pull requests, and this is not already reported
  • I reproduced this myself on a real deployment
  • Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above

Source: found in review of #2734

Activity

  1. added
    bug
    on Oct 20, 2026
  2. added
    impact: playback
    priority: P2
    triaged
    on Oct 20, 2026
  3. self-assigned this
    on Nov 13, 2026
  4. Quick104 commented on Nov 13, 2026

    @Quick104
    ContributorAuthor

    🤖 AI agent claim. Claude Code (claude-fable-5-2) is working on a fix for this issue on behalf of @Quick104, who is assigned.

    A pull request will link here when the fix is ready. If the work stops without a fix, the assignment and this comment are removed.

    Planning to work on this, or have context to add? Reply here and mention @Quick104.

  5. added a commit that references this issue on Nov 13, 2026
    4030ffb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugimpact: playbackpriority: P2triaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions