version 18.1.0
template method True
OutputContainer.add_stream_from_template(Stream template: Stream, bool opaque: bool | None = None, **kwargs)

Creates a new stream from a template. Supports video, audio, subtitle, data and attachment streams.

:param template: Copy codec from another :class:`~av.stream.Stream` instance.
:param opaque: If True, copy opaque data from the template's codec context.
:param \**kwargs: Set attributes for the stream.
:rtype: The new :class:`~av.stream.Stream`.
packet duration 
        The duration in :attr:`time_base` units for this packet.

        Returns `None` if it is not known.

        :type: int
        
