如何使用FFMPEG打开file\live流使用openCV编辑每个帧并将其保存为使用FFMPEGfile \live流编码? [英] How to open file\live stream with FFMPEG edit each frame with openCV and save that as encoded with FFMPEGfile\live stream?

查看:331
本文介绍了如何使用FFMPEG打开file\live流使用openCV编辑每个帧并将其保存为使用FFMPEGfile \live流编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用FFMPEG打开file\live流,使用openCV编辑每个帧,并将其保存为使用FFMPEGfile \live流编码?

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

推荐答案

这很简单。

我建议你从简单的ffmpeg解码示例开始。这样你得到一个结构,它是一个FFMPEG图像。你必须将其转换为opencv映像结构(IplImage)。然后可以应用任何opencv操作。然后你可以看看FFMPEG编码示例,你有你的整个处理链:)

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 :)

关键是将FFMPEG图像结构转换为opencv图像结构。在阅读文档(代码?)后,它很简单。

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

这篇关于如何使用FFMPEG打开file\live流使用openCV编辑每个帧并将其保存为使用FFMPEGfile \live流编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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