Lessons learned in new playback elements

Hi all,

This was the talk I gave at GStreamer Conference 2023

Over the past 2 years, a new set of “Adaptive demuxers” (to support HLS, DASH, MSS) has appeared, along with a in-depth refactoring of the new playback elements (playbin3, decodebin3, …). During this talk, we will go over how those new features came to be, and how they have a profound impact on the resulting “Quality of Experience” for playback use-cases in GStreamer.

If you have questions or comments, shoot !

4 Likes

One of the improvements feature that wasn’t mentioned in the slides, but I got remembered of during questions is the “Early Seek” feature (formerly know as “Seek in Ready”).

The goal is, like other improvements, to avoid processing of data if you want playback to start at a given position (instead of the default “from the start”). The challenge is figuring out the earliest moment at which you can send a seek event.

Previously the only reliable way was to pre-roll your content (which involved parsing, decoding, …) and then send a seek to that position. But now that stream collections are posted on the bus before any data is actually pushed downstream (in the optimal case), this now becomes a reliable moment at which you can do several actions before any data is processed:

  • For stream selection, as mentioned during the talk,
  • But also for seeking

The most optimal is for elements/demuxers that post the colleciton themselves (adaptivedemux2, tsdemux) and otherwise it will fallback to parsebin, in which case you might have a “bit” of parsing of data before.