Skip to content

Encoder: emit S-frames at key-frame positions #5153

Description

@mabenjak

Describe the requested feature / task

The encoder can curently only generate switch frames at the last position (in display order) of the coding structure for random access:

        Inter         Inter          Inter         Inter
               Inter                        Inter
  CLK                        SWITCH                        SWITCH 

The following structure seems more useful for adaptive streaming use-cases:

        Inter         Inter                 Inter         Inter
               Inter                               Inter
  CLK                        Inter   SWITCH                        Inter 

Describe how the feature will be implemented / how the task will be completed

Introduce a new encoder parameter --sframe-replace-kf=N that replaces key frames with S-frames in a repeating pattern:

  • 0: disabled (default) — key frames remain key frames
  • 1: K-S-K-S… — replace every other key frame with an S-frame
  • 2: K-S-S-K-S-S… — replace two consecutive key frames with S-frames between actual key frames
  • N: replace N consecutive key frames with S-frames between actual key frames

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