开发者

How to open file\live stream with FFMPEG edit each frame with openCV and save that as encoded with FFMPEGfile\live stream?

开发者 https://www.devze.com 2023-01-05 20:24 出处:网络
H开发者_如何学Pythonowto open file\\live stream with FFMPEG edit each frame with openCV and save that as encoded with FFMPEGfile\\live stream?Well it is quite simple.

H开发者_如何学Pythonow to open file\live stream with FFMPEG edit each frame with openCV and save that as encoded with FFMPEGfile\live stream?


Well it is quite simple.

I suggest you begin with the simple ffmpeg decoding example. With that you get a struct which is an FFMPEG image. You have to convert it to an opencv image struct (IplImage). Then you can apply any opencv operation. Then you can look at FFMPEG encoding example and you have your whole processing chain :)

The point is to convert FFMPEG image struct to opencv image struct. It is quite simple after you have read the documentation (the code ?).

Edit your question if you have more precise needs.

my2c


Here is an example of how-to capture a video stream with OpenCV, encode as mpeg-4 and then deocde back to a:

http://dimitri-christodoulou.blogspot.com/2012/02/encode-and-decode-video-from-memory.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号