使用 FFMPEG 和 url_fopen 示例
我想知道如何从 URL 获取流(使用 url_fopen
例如)(例如实时视频或 PCM 流)并将其编码成某种东西?
更新: 这实际上是一个商场格式的问题。这是关于如何使用 url_fopen 流式传输内容。
答案: 这很简单: 就像一篇简短的文章解释如何使用它 我有一个实际使用它的小型视频流解决方案 < code>url_write 调用 HelloVideoStreaming (windows sln ) 之前有很多修订。
好消息是您实际上并不真正需要或想要使用 ffmpeg 进行流式传输。但是您希望有可发送的编码数据包才能发送。 我们有一个可以执行此操作的客户端(跨平台、带有预制项目生成脚本)。主要是使用 url_open_dyn_buf
和 url_close_dyn_buf
< /a> 简要描述此处
I wonder how to get a stream from a URL (with url_fopen
for example) (live video or PCM stream for example) and encode it into something?
Update:
This actually was a mall formated question. It was about how to stream something out using url_fopen.
Answer:
It is quite simple:
There is like a short article explaining how to use it
And I had a small video streaming solution which actually used it and url_write
called HelloVideoStreaming (windows sln) some many revisions ago.
Good thing is that you actually do not really need or want to use ffmpeg for streaming. But you want to have sendable packets of encoded data in order to send. We have a client that does it (crossplatform, with premake project generation script). Main thing there is to use url_open_dyn_buf
and url_close_dyn_buf
which are shortly described here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想使用 C++ 获取流并播放或存储它,您应该简单地使用 live555 库等。这是一个很大的库,可以为你做一些肮脏的工作并提供一个漂亮的界面。
If you want to get a stream and play it or store it using C++, you should simply use, for example, live555 library. It's a big lib which do the dirty job for you and provide a nice interface.