开发者

Using FFMPEG and url_fopen example

开发者 https://www.devze.com 2022-12-24 18:24 出处:网络
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?

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.

Goo开发者_运维问答d 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


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.

0

精彩评论

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