Below is the list of supported image formats in OpenCV. You should note that if you build OpenCV yourself you have the option to remove support for some of the types but out of the box OpenCV supports the following:
- Windows bitmap (bmp)
- Portable image formats (pbm, pgm, ppm)
- Sun raster (sr, ras)
- JPEG (jpeg, jpg, jpe)
- JPEG 2000 (jp2)
- TIFF files (tiff, tif)
- Portable network graphics (png)
Can you give List of Video Formats and their mime types Supported by OpenCV VideoCapture?
Assuming you have a default build, OpenCV would support anything supported by FFmpeg, which itself depends on the underlying codecs.
You can find a list here to start with:
https://en.wikipedia.org/wiki/FFmpeg