Search code examples
opencvvideoffmpegmp4vp9

What fourcc should I use when encoding mp4 videos with VP9?


My goal is to write an mp4 video using the cv2 Python library, which itself depends on ffmpeg. What code should I use as the fourcc parameter, i.e.,:

fourcc = cv2.VideoWriter_fourcc(*'????')

Solution

  • Use the code vp09 (case-sensitive):

    fourcc = cv2.VideoWriter_fourcc(*'vp09')