使用 FFMPEG 和 url_fopen 示例

发布于 2024-08-27 02:08:06 字数 1384 浏览 3 评论 0原文

我想知道如何从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤千羽 2024-09-03 02:08:06

如果您想使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文