OpenCV和FFMPEG连接 [英] OpenCV and FFMPEG connection

查看:532
本文介绍了OpenCV和FFMPEG连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我使用OpenCV访问我的网络摄像头,我正在获取RAW图像的Mat,我想将其传递给ffmpeg来编码流,我该怎么做这样做?



提前谢谢。

解决方案

在相关问题上阅读了你的其他问题我将在这里回答。你需要将cv图像(cv :: Mat)转换为AVFrame。



这应该让你真正开始:

http://stackoverflow.com/ question / 13654789 / how-to-create-video-using-avcodec-from-jpeg-images-of-type-opencvmat [ ^ ]



这也可能是有意义的(我把它包括在内因为我不清楚你的要求是什么):



http://siddhantahuja.wordpress.com/2011/08/15/ ros-opencv-read-a-video-file-using-ffmpeg / [ ^ ]

Hi
I accessed my webcam using OpenCV, and I am getting Mat of the RAW image, I want to pass this into ffmpeg to encode the stream, how do I go about doing this?

Thanks in advance.

解决方案

Having read your other question on a related matter I will answer here. You need to convert a cv image (cv::Mat) to an AVFrame.

This should get you well and truly started:
http://stackoverflow.com/questions/13654789/how-to-create-video-using-avcodec-from-jpeg-images-of-type-opencvmat[^]

This may also be of interest (I include it because I am not clear on what your requirement is):

http://siddhantahuja.wordpress.com/2011/08/15/ros-opencv-read-a-video-file-using-ffmpeg/[^]


这篇关于OpenCV和FFMPEG连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆