Python-Opencv Write x264 video on memory buffer
问题 I have a problem for writing x264 video(or single frame) on memory buffer. In opencv for images, imencode and imdecode do this task. But i want save x264 video frame for lower memory usage and sending on internet. I am able to with jpeg but jpeg size bigger than x264 video frame and quality much worser. I searched but i can't find how i write video frame on buffer. Here is the example code to taking frames on webcam import numpy as np import cv2 cap = cv2.VideoCapture(0) cap.set(3,320) cap