用C ++访问ffmpeg中的网络摄像头 [英] accessing webcam in ffmpeg in C++
本文介绍了用C ++访问ffmpeg中的网络摄像头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我一直在查看随图书馆提供的ffmpeg文档和示例,我无法弄清楚如何从网络摄像头获取实时流,我知道这是可能的,但无法弄清楚如何做到这一点。
有没有人有一个教程或一些示例代码来访问网络摄像头并获得实时流从中。我希望能够获得实时流并对其进行编码。
提前致谢!
Hi
I have been looking through the ffmpeg documentation and samples provided with the library and I can not figure out how to acquire a live stream from a webcam, I know it is possible, but can not figure out how to do this.
Does anyone have a tutorial or some sample code to access a webcam and get a live stream from it. I want to be able to acquire a live stream and encode it.
Thanks in advance!
推荐答案
这个问题有不同的方面。几乎所有内容都在这里描述:
https://trac.ffmpeg.org/wiki/StreamingGuide [ ^ ],
< a href =https://trac.ffmpeg.org/wiki/How%20to%20capture%20a%20webcam%20input> https://trac.ffmpeg.org/wiki/How%20to%20capture%20a%20webcam %20input [ ^ ],
https://trac.ffmpeg.org/wiki / Streaming%20media%20with%20ffserver [ ^ ],
另见: http://stackoverflow.com/questions/ 21216650 / ffmpeg-how-to-save-input-camera-stream-into-the-file-with-same-codec-format [ ^ ]。
-SA
There are different aspects of this problems. Pretty much everything is described here:
https://trac.ffmpeg.org/wiki/StreamingGuide[^],
https://trac.ffmpeg.org/wiki/How%20to%20capture%20a%20webcam%20input[^],
https://trac.ffmpeg.org/wiki/Streaming%20media%20with%20ffserver[^],
see also: http://stackoverflow.com/questions/21216650/ffmpeg-how-to-save-input-camera-stream-into-the-file-with-the-same-codec-format[^].
—SA
这篇关于用C ++访问ffmpeg中的网络摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文