# What video API / formats are supported by openCV-python

**URL:** <https://forum.opencv.org/t/what-video-api-formats-are-supported-by-opencv-python/11471>\
**Category:** Python\
**Tags:** videoio\
**Created:** [January 2, 2023, 2:28pm UTC](https://forum.opencv.org/t/what-video-api-formats-are-supported-by-opencv-python/11471 "2023-01-02T14:28:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wingdust](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@wingdust](https://forum.opencv.org/u/wingdust)\
**Post date:** [January 2, 2023, 2:28pm UTC](https://forum.opencv.org/t/what-video-api-formats-are-supported-by-opencv-python/11471/1 "2023-01-02T14:28:52Z")

</div>

I would like to know what video API / formats are supported by openCV?

As i know have `avi,mp4`,what else?

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [January 2, 2023, 2:32pm UTC](https://forum.opencv.org/t/what-video-api-formats-are-supported-by-opencv-python/11471/2 "2023-01-02T14:32:08Z")

</div>

Hi,  
just enter in python

> import cv2  
> print(cv2.getBuildInformation())

if some api are not available (with answer NO) you can try to build python binding yourself

---

<div class="post-metadata">

**Author:** ![wingdust](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@wingdust](https://forum.opencv.org/u/wingdust)\
**Post date:** [January 3, 2023, 2:02pm UTC](https://forum.opencv.org/t/what-video-api-formats-are-supported-by-opencv-python/11471/3 "2023-01-03T14:02:39Z")

</div>

```plaintext

  Video I/O:
    DC1394: NO
    FFMPEG: YES (prebuilt binaries)
      avcodec: YES (58.134.100)
      avformat: YES (58.76.100)
      avutil: YES (56.70.100)
      swscale: YES (5.9.100)
      avresample: YES (4.0.0)
    GStreamer: NO
    DirectShow: YES
    Media Foundation: YES
      DXVA: YES

```

this mean all video format?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 3, 2023, 2:21pm UTC](https://forum.opencv.org/t/what-video-api-formats-are-supported-by-opencv-python/11471/4 "2023-01-03T14:21:27Z")

</div>

on windows, ffmpeg is used to read / write video _files_

have [a look here for the supported formats](https://ffmpeg.org/ffmpeg-formats.html)  
however, the prebuilt version does not come with gpl’d codecs,  
so e.g. you _can read_ but you _cant write_ h265
