We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i420_array = cv2.cvtColor(bgr_array, cv2.COLOR_BGR2YUV_I420) external_video_frame = ExternalVideoFrame() external_video_frame.type = 1 external_video_frame.format = 1 # 设置为I420格式,对应的值为1 external_video_frame.buffer = bytearray(i420_array.tobytes()) external_video_frame.stride = i420_array.shape[1] external_video_frame.height = i420_array.shape[0] sender.send_video_frame(external_frame) # sender为VideoFrameSender类型
运行发送代码,程序直接奔溃
Segmentation fault (core dumped)
由numpy类型的BGR数组到type值分别为0、1、4的ExternalVideoFrame对象的正确转换方式应该是怎样的?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
运行发送代码,程序直接奔溃
由numpy类型的BGR数组到type值分别为0、1、4的ExternalVideoFrame对象的正确转换方式应该是怎样的?
The text was updated successfully, but these errors were encountered: