Cannot write files in ProRes

I am attempting to write a video file using opencv in the ProRes 4444 codec. I have tried other codecs, such as XVID, and the code works perfectly, however no ProRes codec of any kind is working.

The error message I’m getting is:
[prores @ 0x7fed5e024400] Specified pixel format yuv420p is invalid or not supported
[ERROR:0] global /Users/zury.cutler/Documents/OpenCV/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2794) open Could not open codec prores, error: Unspecified error
[ERROR:0] global /Users/zury.cutler/Documents/OpenCV/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2811) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
[ERROR:0] global /Users/zury.cutler/Documents/OpenCV/opencv/modules/videoio/src/cap.cpp (597) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

Does anyone know why I can’t seem to export in ProRes?

System information:
ffmpeg 4.4.1:
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100

opencv: version 4.5.4

python 3.9.7

MacOS 11.5.2 on Intel (not apple silicon)

that error tells me that prores doesn’t like 4:2:0, but something is trying to give it 4:2:0.

something seems to explicitly convert your input (which would be considered 4:4:4) to 4:2:0.

maybe (!) the backend code that interfaces with ffmpeg does that for some reason, or no reason.

you might wanna investigate the source of opencv’s videoio module, specifically the ffmpeg parts, and whether you see any mention of 420 there.

I would hope nobody has hardcoded that. there are plenty of use cases for non-chroma-subsampled video.