Skip to content

Start MPEG-TS subscribers on safe stream boundaries #64

@jake1164

Description

@jake1164

Child of #62.

Goal: avoid handing Jellyfin/FFmpeg stream data that begins mid-packet or mid-H.264 decoder context.

Context:

  • FFmpeg logs from 2026-04-24 showed Invalid data found when processing input, then non-existing PPS 0 referenced, decode_slice_header error, and Non-monotonic DTS warnings.
  • Current shared stream attach path starts viewers at live edge in src/M3Undle.Web/Streaming/Subscribers/SubscriberConnection.cs.
  • Upstream reads are chunked in src/M3Undle.Web/Streaming/Sessions/ChannelStreamSession.cs; default chunk size is not MPEG-TS packet aligned.

High-level ask:

  • Preserve 188-byte MPEG-TS packet alignment.
  • Attach new subscribers from a sync-safe point.
  • Prefer PAT/PMT and IDR/SPS/PPS-aware startup where practical.

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