Skip to content

MP4 export loses video configuration changes in HLS #528

Description

@chriswiggins

Hey @Vanilagy - we're loving using Mediabunny to browser-side convert HLS playlists into downloadable MP4s on demand. Works great!

Due to where the HLS is generated from (CCTV systems), sometimes the video changes resolution and frame rate during playback - for example, from 1920×1080 to 640×480, then back again. The playlist provides a new init segment for the changed video. We're mostly handling all of that generation Gstreamer-side. As far as we know, we're generating these correctly.

The resulting Mediabunny MP4 plays in VLC, but QuickTime shows black video. macOS’s decoder stops at the first resolution change. Looking at the MP4, it contains only the original video decoder configuration, even though the later frames use a different one.

Could Mediabunny preserve these configuration changes when copying HLS into MP4, i.e by writing multiple sample descriptions and selecting the right one at each change? I was going to throw some tokens at the issue, but wanted your steer and direction first as it might end up touching a few surfaces as the implementation should probably work both ways (i.e mp4 back to hls)

Let me know what you think!

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions