Skip to content

add stream without CodexContext #1970

Closed

Description

@caffeinism

Hi, I'm a user who has been having fun with PyAV.

If nothing else, I was wondering if there is a way to avoid creating a CodecContext at the point of adding a stream in my use case. In my case, at the point of calling add_stream, the width and height of the video is not determined, but if I proceed to encode/mux a stream other than that one (audio for example), the coded_width and coded_height of the unused stream seem to be fixed. This forces me to discard the unused CodecContext and create a new one. If so, is there any way to avoid creating a stream.codec_context when creating a new stream altogether?

More precisely, is there any way to separate the functions of the muxer and encoder?

Activity

  1. added 3 commits that reference this issue on Mar 10, 2026
    bf9d2b5
    f21f646
    327cd62
  2. added a commit that references this issue on Mar 10, 2026
    ad89f03
  3. added a commit that references this issue on Mar 12, 2026
    9b2d413
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