Skip to content

HEVC-in-MPEG-TS HLS with PMT stream_type 0x06 + registration_descriptor("HEVC") bypasses VOD ingest #718

Closed

Description

@qoli

What happened?

A finite HEVC-in-MPEG-TS HLS VOD is not routed through the seekable TS-to-fMP4 ingest when its PMT declares the video elementary stream as private PES stream_type 0x06 plus registration_descriptor("HEVC") (descriptor tag 0x05, payload 48 45 56 43).

The same synthetic source was tested in two byte-matched forms:

  • standard HEVC PMT stream_type 0x24 plus the HEVC registration descriptor;
  • private PES PMT stream_type 0x06 plus the same HEVC registration descriptor.

The PES payloads, PTS/DTS, GOPs, audio, segment boundaries, continuity counters, and descriptors are identical. The paired MPEG-TS files differ only in the PMT video stream-type byte and the resulting PMT CRC.

On AetherEngine 7.28.3, the standard 0x24 fixture takes the AE#268 ingest route and passes startup plus forward/backward seek on a physical Apple TV. The 0x06 + HEVC form does not take that route. Direct Aether resolves the finite 300-second duration and AAC track, but exposes no video dimensions and fails before playback:

duration_seconds=300.000
audio_track_count=1
video_width=0
video_height=0
error_code=aether_video_required
message=AetherEngine baseline requires video, but the source dimensions are 0x0

There is no AE#268: finite HEVC-in-MPEG-TS HLS evidence for the descriptor form.

The cause is visible on current main (3cc256a0c1b9d9ec5302fac3f48b3c04cb9ab3e5): MPEGTransportStreamCodecProbe recognizes only an exact stream_type 0x24 and skips each elementary stream's descriptor loop without inspecting it.

Steps to reproduce

  1. Serve a finite direct-media HLS VOD with #EXT-X-ENDLIST and MPEG-TS segments from a byte-range-capable origin.
  2. Use HEVC Main 8-bit video plus AAC audio. The test fixture used 300 seconds, 640x360 at 24 fps, 75 four-second segments, two-second closed GOPs, and a non-zero 1.462-second TS PTS origin.
  3. In each segment's PMT, declare the HEVC video elementary stream as:
stream_type:              0x06
registration descriptor: 05 04 48 45 56 43
                                      H  E  V  C
  1. Load the media playlist with isLive: false and nativeRemoteHLS: false.
  2. Observe that the source does not take the finite HEVC MPEG-TS VOD ingest route. Duration and audio resolve, but video dimensions remain 0x0.
  3. Change only the PMT video stream type to 0x24 and update the PMT CRC. The same media now takes the AE#268 route, renders 640x360 video, lands at 150.000 and 60.000 seconds with zero direct-Aether landing error, and continues advancing.

All PAT/PMT CRCs were validated, every segment begins with a random-access video frame, both playlists fully decode with FFmpeg, and two fresh generations produced identical checksums.

Expected behavior

Positive PMT evidence for HEVC carried as private PES—at minimum stream_type 0x06 with a well-formed registration_descriptor("HEVC")—should select the same finite, seekable TS-to-fMP4 ingest used for stream_type 0x24.

Malformed, truncated, or unrelated private-stream descriptors must not be treated as HEVC. H.264, audio-only, fMP4, live, encrypted, and inconclusive inputs should retain their existing behavior; this should not become a suffix-, MIME-, or failure-triggered fallback.

Suggested regression coverage:

  • 0x06 + registration_descriptor("HEVC") is classified as HEVC-in-MPEG-TS;
  • 0x06 without the descriptor remains non-HEVC/inconclusive as appropriate;
  • a truncated registration descriptor is not accepted;
  • the finite VOD reader preserves startup, forward/backward seek, and post-seek progress for the descriptor form;
  • the existing 0x24 behavior remains unchanged.

AetherEngine version or commit SHA

7.28.3 / 3cc256a0c1b9d9ec5302fac3f48b3c04cb9ab3e5 (also current origin/main when verified)

Host app

Custom integration using AetherEngine directly, with a separate Hybrid AVKit proxy run as corroborating evidence.

Platform

tvOS 26.6

Device / chip

Apple TV 4K (1st generation, AppleTV6,2 / A10X)

Playback path

Native AVPlayer backend selected by AetherEngine after the finite-VOD carriage probe declines the source.

Source media

Finite direct-media HLS VOD; HEVC Main, yuv420p, 640x360 at 24 fps; AAC-LC stereo at 48 kHz; MPEG-TS; 75 x 4-second segments; #EXT-X-ENDLIST; non-zero 1.462-second PTS origin; unencrypted.

Related issue

#268 introduced the finite HEVC-in-MPEG-TS VOD ingest, but its accepted PMT evidence is currently limited to stream_type 0x24.

Activity

  1. superuser404notfound commented on Oct 8, 2026

    @superuser404notfound
    Owner

    Thanks for the precise report and the byte-matched fixture pair, that made this a one-line diagnosis.

    Released in 7.31.1 (b085eee, fix in 870e4f4 via #723). MPEGTransportStreamCodecProbe now reads the ES descriptor loop of a stream_type 0x06 entry and classifies it as HEVC-in-MPEG-TS when it carries a well-formed registration_descriptor("HEVC") (tag 0x05, length >= 4, 48 45 56 43). Exactly as suggested:

    • 0x06 without the descriptor, with another format identifier, or with HEVC bytes under a different tag stays otherCarriage.
    • A registration shorter than four bytes, a descriptor that runs past its ES_info loop, or an ES_info loop that runs past the section is not accepted.
    • The registration only reinterprets private PES; 0x1B plus HEVC stays H.264. 0x24 is unchanged.

    FFmpeg's mpegts demuxer already maps that registration to HEVC, so the ingest itself needed no change. I checked it end to end with aetherctl on a twin of our offset fixture (non-zero PTS origin) that differs only in the PMT stream type and CRC: on 7.31.0 the 0x06 form never produced a displayable frame; on 7.31.1 it logs AE#268: finite HEVC-in-MPEG-TS HLS, renders, and seeks to 90 s and 30 s land the same as the 0x24 original.

    Leaving this open for a retest on the Apple TV with your fixture.

  2. qoli commented on Oct 11, 2026

    @qoli
    ContributorAuthor

    Retested successfully on the same physical Apple TV (tvOS 26.6) with AetherEngine 7.33.2 (e7afcfad3973426a6ffff31fc111f6b1e5078061), which contains the #718 fix introduced in 7.31.1.

    I reran the original byte-matched 300-second fixtures through fresh direct aetherEngine launches:

    Fixture Route Startup 150 s seek 60 s seek Terminal
    PMT 0x06 + registration_descriptor("HEVC") AE#268 taken exactly once PASS, 640×360, AAC track present landed at 150.083 s (0.083 s error), then progressed landed at 59.916 s (0.084 s error), then progressed one run_passed, 12.105 s post-seek progress
    PMT 0x24 control AE#268 taken exactly once PASS, 640×360, AAC track present landed at 150.083 s (0.083 s error), then progressed landed at 59.916 s (0.084 s error), then progressed one run_passed, 12.105 s post-seek progress

    There were no run_failed events and no source, route, or player substitution.

    I also revalidated the fixtures before the device run: both playlists contain 75 valid segments and fully decode; the paired segment bytes differ only at the PMT video stream-type byte and resulting PMT CRC. The focused classifier regression cases all pass, including the malformed/unrelated descriptor negatives and the existing 0x24 control.

    Accepted. Thanks for the fix.

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