diff --git a/av/audio/stream.pyx b/av/audio/stream.pyx index 2dce95083..7185f389d 100644 --- a/av/audio/stream.pyx +++ b/av/audio/stream.pyx @@ -15,7 +15,7 @@ cdef class AudioStream(Stream): """ Encode an :class:`.AudioFrame` and return a list of :class:`.Packet`. - :return: :class:`list` of :class:`.Packet`. + :rtype: list[Packet] .. seealso:: This is mostly a passthrough to :meth:`.CodecContext.encode`. """ @@ -31,7 +31,9 @@ cdef class AudioStream(Stream): cpdef decode(self, Packet packet=None): """ Decode a :class:`.Packet` and return a list of :class:`.AudioFrame`. - :return: :class:`list` of :class:`.AudioFrame` + + :rtype: list[AudioFrame] + .. seealso:: This is a passthrough to :meth:`.CodecContext.decode`. """ diff --git a/av/container/core.pyx b/av/container/core.pyx index 240db340e..548fe4fc2 100755 --- a/av/container/core.pyx +++ b/av/container/core.pyx @@ -366,7 +366,6 @@ def open( Honored only when ``file`` is a file-like object. Defaults to 32768 (32k). :param timeout: How many seconds to wait for data before giving up, as a float, or a :ref:`(open timeout, read timeout) ` tuple. - :type timeout: float or tuple :param callable io_open: Custom I/O callable for opening files/streams. This option is intended for formats that need to open additional file-like objects to ``file`` using custom I/O. diff --git a/av/video/frame.pyx b/av/video/frame.pyx index 4425e18a9..6ff982491 100644 --- a/av/video/frame.pyx +++ b/av/video/frame.pyx @@ -464,9 +464,7 @@ cdef class VideoFrame(Frame): .. note:: For formats which expect an array of ``uint16``, the samples must be in the system's native byte order. - .. note:: for ``pal8``, an ``(image, palette)`` pair must be passed. - `palette` must have shape (256, 4) and is given in ARGB format - (PyAV will swap bytes if needed). + .. note:: for ``pal8``, an ``(image, palette)`` pair must be passed. `palette` must have shape (256, 4) and is given in ARGB format (PyAV will swap bytes if needed). """ if format == "pal8": array, palette = array diff --git a/av/video/stream.pyx b/av/video/stream.pyx index abd4eac52..af80f27a1 100644 --- a/av/video/stream.pyx +++ b/av/video/stream.pyx @@ -18,7 +18,7 @@ cdef class VideoStream(Stream): """ Encode an :class:`.VideoFrame` and return a list of :class:`.Packet`. - :return: :class:`list` of :class:`.Packet`. + :rtype: list[Packet] .. seealso:: This is mostly a passthrough to :meth:`.CodecContext.encode`. """ @@ -35,7 +35,9 @@ cdef class VideoStream(Stream): cpdef decode(self, Packet packet=None): """ Decode a :class:`.Packet` and return a list of :class:`.VideoFrame`. - :return: :class:`list` of :class:`.Frame` subclasses. + + :rtype: list[VideoFrame] + .. seealso:: This is a passthrough to :meth:`.CodecContext.decode`. """ diff --git a/docs/api/stream.rst b/docs/api/stream.rst index 49ff05ac8..a6bc1fc8b 100644 --- a/docs/api/stream.rst +++ b/docs/api/stream.rst @@ -65,14 +65,6 @@ Basics .. autoattribute:: Stream.index -Transcoding -~~~~~~~~~~~ - -.. automethod:: Stream.encode - -.. automethod:: Stream.decode - - Timing ~~~~~~ @@ -87,27 +79,6 @@ Timing .. autoattribute:: Stream.frames -.. _frame_rates: - -Frame Rates -........... - - -These attributes are different ways of calculating frame rates. - -Since containers don't need to explicitly identify a frame rate, nor -even have a static frame rate, these attributes are not guaranteed to be accurate. -You must experiment with them with your media to see which ones work for you for your purposes. - -Whenever possible, we advise that you use raw timing instead of frame rates. - -.. autoattribute:: Stream.average_rate - -.. autoattribute:: Stream.base_rate - -.. autoattribute:: Stream.guessed_rate - - Others ~~~~~~