Skip to content

[bug] Original M4B download with attached cover art fails with H.264/AAC client capabilities #3486

Closed

Description

@ellermw

Reproduced by Codex in a fresh, isolated running Silo deployment using synthetic media. Human review is pending; no personal reproduction by the operator is claimed.

What happened

On commit 6aa6791e, an Original-quality download of a synthetic M4B audiobook was accepted as a transcode with effective quality 20mbps and a 1080p H.264/AAC target. The file contains AAC audio and a JPEG attached picture, with no moving-video stream. All three worker attempts failed with:

Could not find tag for codec h264 in stream #0, codec not currently supported in container

The same file downloaded successfully when the Original-quality request omitted caps. The returned 35,290 bytes matched the synthetic source exactly. This is one failed download creation with three automatic preparation attempts, plus one successful control download creation.

The reproduction was performed by Codex through the normal Silo HTTP API in a disposable server using the same image digest as the production deployment. It concerns the beta audiobook feature.

Steps to reproduce

These steps were executed by Codex against an isolated running server, not by the human operator:

  1. Using the pinned image's FFmpeg, generate a two-second AAC stereo M4B with a generated JPEG attached picture:

    ffmpeg -nostdin -hide_banner -loglevel error -f lavfi -i color=c=blue:s=500x500 -frames:v 1 -c:v mjpeg -threads 1 -y cover.jpg
    ffmpeg -nostdin -hide_banner -loglevel error -f lavfi -i sine=frequency=440:sample_rate=44100:duration=2 -i cover.jpg -map 0:a:0 -map 1:v:0 -c:a aac -ac 2 -c:v copy -disposition:v:0 attached_pic -y synthetic.m4b

    Inside the pinned image the FFmpeg binary is /usr/lib/jellyfin-ffmpeg/ffmpeg; the commands above abbreviate that path. The generated fixture uses no private or copyrighted media.

  2. Start a fresh Silo server from the pinned image below with the synthetic media mounted read-only, and complete first-run administrator/profile setup. The test used bundled PostgreSQL/Redis, no GPU, no remote nodes, no published ports, and internal-only Docker networking.

    The executed bootstrap used this equivalent container configuration. Use a new test-only SECRET_KEY in the shell environment; no production key or database is needed. Replace [SYNTHETIC-FOLDER] with the absolute local test folder containing media/Synthetic audiobook/synthetic.m4b.

    docker network create --internal silo-audiobook-isolated-20261104
    docker run -d --name silo-audiobook-isolated-20261104 \
      --network silo-audiobook-isolated-20261104 --memory 2g --cpus 2 --pids-limit 512 --ulimit core=0 \
      --tmpfs /config:rw,exec,size=1g --tmpfs /tmp:rw,exec,size=512m \
      --mount type=bind,source=[SYNTHETIC-FOLDER],target=/mnt/media,readonly \
      -e SECRET_KEY -e ENABLE_REDIS=true -e PUID=1000 -e PGID=1000 \
      -e SILO_NET_TCP_CONGESTION=off -e SILO_NET_TCP_SEND_BUFFER=off \
      ghcr.io/silo-server/silo-server@sha256:c7b19fe7db6588d6e63c92d08a140c1566b6f94206a84fae1a14f8bec521bad5

    All HTTP requests run inside this container using docker exec and curl against http://127.0.0.1:8080, because no ports are published. Wait until GET /api/v2/system/info succeeds. Complete first-run setup with POST /api/v2/auth/setup, Content-Type: application/json, and the body below, replacing the password placeholder with a fresh test password:

    {"username":"repro-admin","email":"[email protected]","password":"[NEW-TEST-PASSWORD]","create_default_profile":true}

    Retain the returned access token privately. Authenticate subsequent requests with Authorization: Bearer [TEST-ACCESS-TOKEN]. GET /api/v2/profiles returns the newly created primary profile ID; send it as X-Profile-Id on profile-scoped requests. Neither placeholder represents a published credential.

  3. Put synthetic.m4b in a readable audiobook library directory. In the isolated test this was /mnt/media/media/Synthetic audiobook/synthetic.m4b. Create the library with POST /api/v2/libraries, Content-Type: application/json, bearer authentication, and this body:

    {"name":"Synthetic audiobook reproduction","type":"audiobooks","paths":["/mnt/media/media"],"realtime_monitoring":false,"trickplay_enabled":false,"chapter_thumbnails_enabled":false}

    Wait until GET /api/v2/catalog lists the fixture, then record its content_id. The fixture appeared in the test catalog after library creation.

  4. In the isolated test, these settings were enabled through PUT /api/v2/admin/settings/{key}, with bearer authentication, Content-Type: application/json, If-Match: *, and body {"value":"true"}: download.enabled and download.transcode_enabled.

  5. With Content-Type: application/json, the test administrator's bearer authentication, and its primary X-Profile-Id header, send POST /api/v2/downloads. No X-Silo-Device-Id was sent. Replace the fixture-specific content ID below with the ID from step 3:

    {
      "content_id": "150518802247865033",
      "quality": "original",
      "caps": {
        "codecs_video": ["h264"],
        "codecs_audio": ["aac"],
        "containers": ["mp4", "m4b"],
        "max_resolution": "1080p",
        "hdr": false
      }
    }
  6. Observe HTTP 202 with quality=original, effective_quality=20mbps, delivery_format=transcode, target_bitrate_kbps=141, and status=preparing. The first GET /api/v2/admin/downloads/preparations showed MP4/H.264/AAC, resolution 1080p, attempts=1, and state=retrying with the muxer error.

  7. For the control, send another POST /api/v2/downloads containing only the same content_id and "quality":"original". This returned delivery_format=original, effective_quality=original. GET /api/v2/downloads/{id}/file successfully returned 35,290 bytes, byte-for-byte identical to the source. The file-download harness did not separately capture its HTTP status code. SHA-256: 7321e4bebb04d879c924ec54bdcc281091966941f6f77e20eadb74bc5dc82f79.

  8. Allow the failed prepared download to finish its automatic retries. After the control completed, GET /api/v2/admin/downloads/preparations showed state=failed, attempts=3, max_attempts=3.

Expected behavior

An Original-quality audiobook request should produce a usable audio download when the client supports its AAC audio and MP4 container. Attached cover art should not require an H.264 video conversion that fails. The successful no-capabilities request provides a comparison using the identical source.

Silo version / commit

6aa6791e, returned by the isolated server's GET /api/v2/system/info.
Pinned image: ghcr.io/silo-server/silo-server@sha256:c7b19fe7db6588d6e63c92d08a140c1566b6f94206a84fae1a14f8bec521bad5.

Deployment

Docker (other), Ubuntu 22.04.5 LTS / x86_64, Linux kernel 6.8.0-138-generic: fresh disposable Docker container, bundled PostgreSQL and Redis, 2 CPU limit and 2 GiB memory limit, fresh RAM-backed state, read-only synthetic-media mount, internal-only network, and no published ports. The reproduction used software encoding (hw_accel=none). Production uses a separate deployment and was unchanged.

Area

Playback and transcoding.

Clients affected

Other/not client-specific — exercised using a scripted HTTP API client. This does not claim every native client is affected.

Client app and device

Codex-driven curl requests inside the isolated container. The exact capability payload is above. No browser or mobile app was used for the reproduction. The original reporting user's client remains unknown.

Media and playback details

This is download preparation, not playback. The synthetic source is 35,290 bytes and the preparation API reports a two-second duration and 141 kbps overall bitrate. FFprobe returned AAC audio (stereo) and one MJPEG attached picture (attached_pic=1). The generator specifies 44,100 Hz and 500×500 cover dimensions.

Diagnostics report reference

Not supplied.

Relevant logs

Complete final-attempt lines from the isolated Silo server. Only the test node identity is replaced with [TEST-NODE]. The media title and path are deliberately synthetic and safe to disclose. Any ...) already in the worker's error text is Silo's own logged truncation; these lines have not been rewritten.

time=2026-11-04T09:11:50.650Z level=INFO msg="ffmpeg event" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_event="ffmpeg process starting"
time=2026-11-04T09:11:50.796Z level=INFO msg="ffmpeg stderr" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_line="[mp4 @ 0x55ba858b7a80] Could not find tag for codec h264 in stream #0, codec not currently supported in container" line_index=1
time=2026-11-04T09:11:50.796Z level=INFO msg="ffmpeg stderr" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_line="[out#0/mp4 @ 0x55ba858a1840] Could not write header (incorrect codec parameters ?): Invalid argument" line_index=2
time=2026-11-04T09:11:50.796Z level=INFO msg="ffmpeg stderr" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_line="[vf#0:0 @ 0x55ba858cf640] Error sending frames to consumers: Invalid argument" line_index=3
time=2026-11-04T09:11:50.797Z level=INFO msg="ffmpeg stderr" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_line="[vf#0:0 @ 0x55ba858cf640] Task finished with error code: -22 (Invalid argument)" line_index=4
time=2026-11-04T09:11:50.797Z level=INFO msg="ffmpeg stderr" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_line="[vf#0:0 @ 0x55ba858cf640] Terminating thread with return code -22 (Invalid argument)" line_index=5
time=2026-11-04T09:11:50.811Z level=INFO msg="ffmpeg stderr" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_line="[out#0/mp4 @ 0x55ba858a1840] Nothing was written into output file, because at least one of its streams received no packets." line_index=6
time=2026-11-04T09:11:50.819Z level=INFO msg="ffmpeg event" component=ffmpeg playback_session_id=download-prepare-150518840751575753 node_id=[TEST-NODE] node_type=integrated execution_mode=download_prepare restart_count=0 target_resolution=1080p target_video_codec=h264 target_audio_codec=aac hw_accel=none seek_seconds=0 start_segment_number=0 input_path="/mnt/media/media/Synthetic audiobook/synthetic.m4b" ffmpeg_event="ffmpeg process exit error" exit_error="exit_code=234: exit status 234"
time=2026-11-04T09:11:50.819Z level=WARN msg="download artifact encode failed" component=downloads artifact_id=150518840751575753 error="transcode process failed: exit status 234 (stderr: [mp4 @ 0x55ba858b7a80] Could not find tag for codec h264 in stream #0, codec not currently supported in container\n[out#0/mp4 @ 0x55ba858a1840] Could not write header (incorrect codec parameters ?): Invalid argument\n[vf#0:0 @ 0x55ba858cf640] Error sending frames to consumers: Invalid argument\n[vf#0:0 @ 0x55ba858cf640] Task finished with error code: -22 (Invalid argument)\n[vf#0:0 @ 0x55ba858cf640] Terminating thread with return code -22 (Invalid argument)\n[out#0/mp4 @ 0x55ba858a1840] Nothing was w...)"

Technical notes

Suspected mechanism: the download quality resolver applies video compatibility to an audio-focused file. At the deployed commit, internal/downloads/policy.go calls playback.Resolve for Original requests carrying capabilities; internal/playback/resolver.go checks video codec compatibility in its direct/remux branches. ResolveDownloadTranscodeTarget builds video targets, and both appendPreparedTrackArgs and appendStreamSelectionArgs select 0:v:0. The first video stream of this fixture is its attached cover. The API reproduction demonstrates the unwanted preparation route and resulting muxer error. The complete explanation of attached-picture disposition inheritance remains an inference; no Silo fix was implemented.

A standalone test using the same image's FFmpeg also produced the same muxer error when mapping the cover to H.264; an audio-only control succeeded. That standalone command was reconstructed for diagnosis and is not claimed to be Silo's exact emitted argument list.

The production retained artifact previously inspected showed the same H.264 muxer error and a segmentation fault under VA-API. This isolated reproduction used software encoding and exited with status 234; it did not reproduce the segmentation fault. It used no remote node, so remote path-approval rejection is not required for this reproduced muxer failure. The original production artifact could not be conclusively linked to the reporting user; this fresh synthetic reproduction is separate evidence.

Duplicate checks found no confirmed match. Searches sampled open and recently closed issues/PRs using audiobook/download, audio-only/download, m4b, attached_pic, and the exact muxer error. The earlier checks encountered rate limits. A fresh review completed twelve qualified searches; broad PR coverage was 20/196, 20/58 and 20/69 results, while narrow queries exhausted their returned results. Unsearched alternates were album art, music transcode download, download.transcode_enabled and effective_quality. Related items: #3328 concerns ABS authorization; #998 concerns orphan preparations; #567 excludes covers with 0:V:0 in streaming remux, and #598 uses V:0 for copy-seek probing; those older streaming fixes are distinct from this download-preparation path; #2279 concerns undecodable audio and a codec-none error. None was established as a fix for this case.

AI harness

OpenAI Codex.

AI tool(s)

functions.exec with exec_command, write_stdin, apply_patch, and web__run; collaboration.spawn_agent for independent review. Docker, FFmpeg/FFprobe, curl, and Python were used for the isolated reproduction. Prior production evidence was gathered read-only over SSH.

AI model(s)

GPT-6; a more specific runtime identifier is not exposed in the session.

AI involvement

Fully AI-generated and agent-reproduced; human verification is pending. This is an honest draft status, not a claim that the issue form's "Fully AI-generated, human verified" option has already been satisfied.

Independent or adversarial review

Six fresh reviewers checked this reproduction-based draft over two rounds, covering evidence, reproducibility, privacy, and duplicates. They confirmed the central API failure and raw-log fidelity. Revisions narrowed the title, added bootstrap and library requests plus explicit JSON/authentication headers, restored the observed request/control/retry order, supplied host and source provenance, distinguished historical streaming fixes, and removed an unmeasured HTTP-status claim from the successful file control. No privacy issue or confirmed duplicate was found. The reproduction was executed by Codex; human review and the form's human attestation remain unresolved.

Confirmations

  • I searched open and recently closed issues and pull requests, and this is not already reported. Duplicate checks are described above; human reporter to verify.
  • I reproduced this myself on a real deployment. Codex reproduced the failure in a fresh running deployment; the human operator has not claimed personal execution. Do not silently turn agent execution into a human attestation.
  • Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above. The raw excerpts are preserved for review.

Activity

  1. added
    bug
    impact: usability
    priority: P2
    on Nov 4, 2026
  2. added a commit that references this issue on Nov 5, 2026
    3d2374d
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

    bugimpact: usabilitypriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions