#4839·ZLMediaKit

[BUG] Enhanced RTMP AV1 playback works but getMediaList reports missing/invalid video metadata

Author: pannalCreated Sep 25, 2026Updated Sep 25, 2026

现象描述

Enhanced RTMP AV1 playback works correctly, but ZLMediaKit's own track metadata from /index/api/getMediaList is incorrect and inconsistent.

I am publishing two simultaneous AV1 streams from OBS 32.2.2 using AMD HW AV1. Both are configured as 2560x1440 @ 60 fps and both are actively playing correctly through ZLMediaKit via HTTP-FLV in a browser.

However, the raw ZLMediaKit API reports:

  • stream A: audio track only (no AV1 video track at all)
  • stream B: AV1 video track reported as 1x235 @ 30 fps

The browser is nevertheless receiving and decoding the AV1 video correctly for both streams.

This is with rtmp.directProxy=1, so the original Enhanced RTMP packets appear to be forwarded correctly while the demux/track-metadata path fails to parse AV1 consistently.

This was also observed with the official Docker image. I later rebuilt the exact same commit with only -DDISABLE_REPORT=ON; the AV1 metadata behavior is unchanged.

This issue replaces #4838, which was automatically closed because I used translated section headings instead of the literal template headings.

如何复现?

  1. Run ZLMediaKit from commit: 10268396b89748bc2b0d19dda79bc29219e97815
  2. Relevant RTMP settings:
    ini
    [rtmp]
    directProxy=1
    enhanced=1
  3. Publish AV1 from OBS 32.2.2 using AMD HW AV1 over Enhanced RTMP.
  4. Stream configuration:
    • 2560x1440
    • 60 fps
    • AAC audio, 48 kHz stereo
  5. Play the stream through ZLMediaKit HTTP-FLV.
  6. Confirm that video playback works correctly.
  7. Query:
    bash
    curl -s "http://127.0.0.1:80/index/api/getMediaList?secret=..." | jq
  8. Inspect the AV1 track metadata.

With two simultaneous streams, one stream currently has no video track in the API and another has obviously invalid AV1 dimensions/FPS.

相关日志或截图

Raw ZLMediaKit getMediaList output for stream A (name anonymized):

json
{
  "schema": "rtmp",
  "app": "swagger",
  "stream": "stream-a",
  "readerCount": 4,
  "originTypeStr": "rtmp_push",
  "tracks": [
    {
      "codec_id_name": "mpeg4-generic",
      "codec_type": 1,
      "ready": true,
      "frames": 534,
      "sample_rate": 48000,
      "channels": 2
    }
  ]
}

The same stream is actively showing 2560x1440 AV1 video in the browser at the time of this API response.

Raw ZLMediaKit output for stream B:

json
{
  "schema": "rtmp",
  "app": "swagger",
  "stream": "stream-b",
  "readerCount": 2,
  "originTypeStr": "rtmp_push",
  "tracks": [
    {
      "codec_id_name": "mpeg4-generic",
      "codec_type": 1,
      "ready": true,
      "frames": 8,
      "sample_rate": 48000,
      "channels": 2
    },
    {
      "codec_id_name": "AV1",
      "codec_type": 0,
      "ready": true,
      "width": 1,
      "height": 235,
      "fps": 30,
      "frames": 12,
      "key_frames": 2,
      "gop_size": 6,
      "gop_interval_ms": 0
    }
  ]
}

That stream is also actively playing as 2560x1440 @ 60 fps.

The relevant source path seems to be the Enhanced RTMP AV1 demux/track parsing path. AV1Track::setExtraData() and AV1Track::inputFrame() populate width/height from the AV1 configuration parser, while RtmpMediaSourceImp can still directly forward the original RTMP packets when directProxy=1.

配置

Relevant settings:

ini
[rtmp]
port=1935
directProxy=1
enhanced=1

[protocol]
enable_audio=1
enable_rtmp=1
continue_push_ms=0

Playback is HTTP-FLV. Other output protocols are not required for this reproduction.

各种环境信息

  • 代码提交记录/git commit hash: 10268396b89748bc2b0d19dda79bc29219e97815
  • 操作系统及版本: Ubuntu 22.04, Docker, Linux x86_64
  • 硬件信息: x86_64 server; publisher uses AMD HW AV1
  • crash backtrace:
Not applicable; there is no crash.
  • 其他需要补充的信息:
    • ZLMediaKit startup version:
      ZLMediaKit(git hash:1026839/2026-09-21T20:54:01-07:00,branch:,build time:2026-09-25T20:49:31)
    • Publisher: OBS 32.2.2, AMD HW AV1
    • Video: 2560x1440 @ 60 fps, AV1
    • Audio: AAC / mpeg4-generic, 48000 Hz, stereo
    • Playback: HTTP-FLV in browser; video and audio work correctly
    • The custom build differs only by adding -DDISABLE_REPORT=ON; the metadata issue was already observed with the official image.