@_with_element
def video(self, element, data, format='video/mp4', start_time=0):
    "Display a video player.\n\n        Parameters\n        ----------\n        data : str, bytes, BytesIO, numpy.ndarray, or file opened with\n                io.open().\n            Raw video data, filename, or URL pointing to a video to load.\n            Includes support for YouTube URLs.\n            Numpy arrays and raw data formats must include all necessary file\n            headers to match specified file format.\n        format : str\n            The mime type for the video file. Defaults to 'video/mp4'.\n            See https://tools.ietf.org/html/rfc4281 for more info.\n        start_time: int\n            The time from which this element should start playing.\n\n        Example\n        -------\n        >>> video_file = open('myvideo.mp4', 'rb')\n        >>> video_bytes = video_file.read()\n        >>>\n        >>> st.video(video_bytes)\n\n        .. output::\n           https://share.streamlit.io/0.25.0-2JkNY/index.html?id=Wba9sZELKfKwXH4nDCCbMv\n           height: 600px\n\n        .. note::\n           Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\n           not widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\n           See this `StackOverflow post <https://stackoverflow.com/a/49535220/2394542>`_ or this\n           `Streamlit forum post <https://discuss.streamlit.io/t/st-video-doesnt-show-opencv-generated-mp4/3193/2>`_\n           for more information.\n\n        "
    from .elements import media_proto
    media_proto.marshall_video(self._get_coordinates(), element.video, data, format, start_time)
Display a video player.

Parameters
----------
data : str, bytes, BytesIO, numpy.ndarray, or file opened with
        io.open().
    Raw video data, filename, or URL pointing to a video to load.
    Includes support for YouTube URLs.
    Numpy arrays and raw data formats must include all necessary file
    headers to match specified file format.
format : str
    The mime type for the video file. Defaults to 'video/mp4'.
    See https://tools.ietf.org/html/rfc4281 for more info.
start_time: int
    The time from which this element should start playing.

Example
-------
>>> video_file = open('myvideo.mp4', 'rb')
>>> video_bytes = video_file.read()
>>>
>>> st.video(video_bytes)

.. output::
   https://share.streamlit.io/0.25.0-2JkNY/index.html?id=Wba9sZELKfKwXH4nDCCbMv
   height: 600px

.. note::
   Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is
   not widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.
   See this `StackOverflow post <https://stackoverflow.com/a/49535220/2394542>`_ or this
   `Streamlit forum post <https://discuss.streamlit.io/t/st-video-doesnt-show-opencv-generated-mp4/3193/2>`_
   for more information.
@_with_element
def video(self, element, data, format='video/mp4', start_time=0):
    "Display a video player.\n\n        Parameters\n        ----------\n        data : str, bytes, BytesIO, numpy.ndarray, or file opened with\n                io.open().\n            Raw video data, filename, or URL pointing to a video to load.\n            Includes support for YouTube URLs.\n            Numpy arrays and raw data formats must include all necessary file\n            headers to match specified file format.\n        format : str\n            The mime type for the video file. Defaults to 'video/mp4'.\n            See https://tools.ietf.org/html/rfc4281 for more info.\n        start_time: int\n            The time from which this element should start playing.\n\n        Example\n        -------\n        >>> video_file = open('myvideo.mp4', 'rb')\n        >>> video_bytes = video_file.read()\n        >>>\n        >>> st.video(video_bytes)\n\n        .. output::\n           https://share.streamlit.io/0.25.0-2JkNY/index.html?id=Wba9sZELKfKwXH4nDCCbMv\n           height: 600px\n\n        .. note::\n           Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\n           not widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\n           See this `StackOverflow post <https://stackoverflow.com/a/49535220/2394542>`_ or this\n           `Streamlit forum post <https://discuss.streamlit.io/t/st-video-doesnt-show-opencv-generated-mp4/3193/2>`_\n           for more information.\n\n        "
    from .elements import media_proto
    media_proto.marshall_video(self._get_coordinates(), element.video, data, format, start_time)