I am unable to generate a mp4 file from a number of frames, although I can generate avi file. How to get mp4 file instead of avi file
# Define the codec and create VideoWriter object.The output is stored in 'outpy.avi' file.
import cv2
out = cv2.VideoWriter('outpy.avi',cv2.VideoWriter_fourcc('M','J','P','G'), 10, (frame_width,frame_height))
out.write(frame)
out.release()