Skip to content

moq-gst moqsrc: fixed 1 s consumer latency and frames lost at the first frame of a GOP #7326

Closed as not planned

Description

@davidegiudice

Context

moq-gst (moqsrc), commit 3aedaf3, rs/moq-gst/src/source/imp.rs:662:

let mut track = moq_mux::container::Consumer::new(subscriber, container).with_latency(Duration::from_secs(1));

1. Fixed consumer latency

The latency budget of moq_mux::container::Consumer is hard-coded to 1 s and cannot be changed through an element property, caps or environment. Anyone using moqsrc with a publisher that has a different delivery latency, or a network that occasionally delays groups, cannot choose the trade-off between delay and tolerance. Consumer::set_latency exists (rs/moq-mux/src/container/consumer.rs:582) but moqsrc does not expose it.

Proposal: a latency property (ms) on moqsrc, default 1000 so the current behaviour does not change.

2. Frames lost at the first frame of a GOP

Observation: with H.264 1080p50 video, 4 streams in parallel, a lossless local network and a 600 s run, moqsrc skips between 1 and 26 frames per stream roughly every 10 minutes; the gap always starts at the first frame (keyframe) of a GOP. Raising the consumer budget to 10 s makes the same run lose no frames (0 gaps).

Suspicion: under load, a group that arrives beyond the budget is skipped (consumer.rs:360 and :372, rule max_timestamp - next_start >= latency) exactly when its first frame is the oldest one available, and the rest of the group, now without its keyframe, cannot be decoded.

Questions:

  • Is skipping a group for exceeding the budget intended even when it is the only group in flight and about to complete?
  • Can the current group be kept when its first frame has already been partially delivered?

A reproduction (script and per-stream gap count) is available if useful.

Activity

  1. coderabbitai commented on Oct 30, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #7084 - feat(gst): moqsrc takes a max-delay [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. davidegiudice commented on Oct 30, 2026

    @davidegiudice
    Author

    Thanks, this is covered by #7084 (moqsrc max-delay property), so closing this one as a duplicate.

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