Click here to Skip to main content
15,882,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Comments
[no name] 13-Mar-14 0:07am    
More explanation is required. What encoding? Why not use ffmpeg directly without opencv.

1 solution

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/[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900