RTSP/RTMP 视频流客户端 iOS

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20962029/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:00:32  来源:igfitidea点击:

RTSP/RTMP Video Streaming Client iOS

iosffmpegrtsprtmplive555

提问by nathansizemore

I'm in need of a open source solution/library to stream RTSP/RTMP to an iOS Application. I need to build an app that connects to a media server, and opens the provided video stream. I believe there has to be libraries out there, but I have yet to find one that is open source, compiles, actually works, and runs on iOS 5+, iPhone 4+. I do not have a preference, RTMPor RTSPwill suffice. Preferably the one with the least amount of work. I have RTSP working on the Android side, but nothing for iOS yet.

我需要一个开源解决方案/库来将 RTSP/RTMP 流式传输到 iOS 应用程序。我需要构建一个连接到媒体服务器的应用程序,并打开提供的视频流。我相信那里一定有库,但我还没有找到一个开源、编译、实际工作并在 iOS 5+、iPhone 4+ 上运行的库。我没有偏好,RTMP或者RTSP就足够了。最好是工作量最少的那个。我在 Android 端有 RTSP,但在 iOS 上还没有。

This is what I already know from research today -

这就是我今天从研究中已经知道的——

RTSP

实时服务提供商

  • Seems possible using Live555/FFMPEG
  • MooncatVenture Group- Old FFMPEG, not compatible with ARMv7s (No updates/blogs/commits in over a year)
  • DFURTSPPlayer- This is a working example.
  • 似乎可以使用 Live555/FFMPEG
  • MooncatVenture Group- 旧的 FFMPEG,与 ARMv7s 不兼容(一年多没有更新/博客/提交)
  • DFURTSPPlayer- 这是一个工作示例。

RTMP

RTMP

  • Seems possible using Live555/FFMPEG
  • A few libraries are out there for data messaging, but that is all
  • MidnightCoders Project- Does not seem video support is build yet, as Audio is not.
  • 似乎可以使用 Live555/FFMPEG
  • 有一些库用于数据消息传递,但仅此而已
  • MidnightCoders 项目- 似乎还没有建立视频支持,因为音频没有。

I've never messed with anything video related before, so encoding, frame rate, key frame, chunks, etc... is pretty foreign to me. Right now, it seems building a static binary from Live555/FFMPEG is the only solution to my problem. If so, can anyone give me a simple quickstart guide or links to a blog/example someone has out there? I'm not looking for anything crazy, just a simple

我以前从未接触过任何与视频相关的东西,所以编码、帧速率、关键帧、块等……对我来说很陌生。现在,似乎从 Live555/FFMPEG 构建静态二进制文件是我问题的唯一解决方案。如果是这样,谁能给我一个简单的快速入门指南或指向某人的博客/示例的链接?我不是在寻找任何疯狂的东西,只是一个简单的

  1. Download This - LINK
  2. Compile it like this - LINK
  3. Place it into X Folder in Xcode
  4. Create X Object
  5. Read Stream API here - LINK
  1. 下载这个 - 链接
  2. 像这样编译它 - LINK
  3. 将其放入 Xcode 中的 X 文件夹中
  4. 创建 X 对象
  5. 在此处阅读 Stream API - 链接

If not, anyone want to point me to a working open source library?

如果没有,有人想指出我一个可用的开源库吗?

Oh yeah, this happens to be my first iPhone app and first time in Objective-C. Awesome first project, yeah?

哦,是的,这恰好是我的第一个 iPhone 应用程序,也是第一次使用 Objective-C。很棒的第一个项目,是吗?

采纳答案by nathansizemore

DFURTSPPlayeris a working example on GitHub. Will have to double check on licensing issues, but with this it is a good place to start for RTSP.

DFURTSPPlayer是 GitHub 上的一个工作示例。将不得不仔细检查许可问题,但这是开始 RTSP 的好地方。

回答by nathansizemore

It seems at this time, the only way to do what I want is to create a static binary to use, from complete scratch. Libavcodec, FFMPEG, and Live555 are all under LGPL. Which means, in order to not make my code open source, I would have to allow dynamic linking, so that my app users have the ability to make modifications to the open source libraries I used, whenever they want. The AppStore does not allow dynamic linking, so I am essentially dead in the water unless I want to write it all from scratch. Which, I definitely do not want to do...

在这个时候,做我想做的唯一方法是从头开始创建一个静态二进制文件来使用。Libavcodec、FFMPEG 和 Live555 都在 LGPL 之下。这意味着,为了不让我的代码开源,我必须允许动态链接,以便我的应用程序用户能够随时修改我使用的开源库。AppStore 不允许动态链接,所以除非我想从头开始编写,否则我基本上是死在水中。哪个,我绝对不想做……