简体   繁体   English

逐帧解码h264示例ios 7

[英]Decode h264 example ios 7 frame by frame

Good day. 美好的一天。

I have a ip camera. 我有一台ip camera。 From it frame by frame comes stream h264. 逐帧来自流h264。

On the Internet, in particular on stackoverflow, a lot of information about how to decode h264 on iOS. 在Internet上,特别是在stackoverflow上,有很多关于如何在iOS上解码h264的信息。 But this information is not clear. 但这些信息并不清楚。 I ask you to show me an example and show right direction of how to decode a frame by frame h264 stream to iOS 7. 我请你给我看一个例子,并展示如何将帧h264流解码到iOS 7的正确方向。

What options I have seen and what I know about them: 我看到了哪些选项以及我对它们的了解:

  • ffmpeg - not suitable for me, as it has LGPL license. ffmpeg - 不适合我,因为它有LGPL许可证。

  • AVAnimator library - license inappropriate for me. AVAnimator图书馆 - 许可证不适合我。

  • Hardware decoder - the best solution, but as I understand it, is only available for iOS 8. 硬件解码器 - 最好的解决方案,但据我所知,仅适用于iOS 8。

For me to be the perfect option if you give me an example for correct decoding h264 stream and display it on the way to the screen. 如果你给我一个正确解码h264流的例子并在去往屏幕的路上显示它,那么对我来说是个完美的选择。

Regards. 问候。

您需要第三方H.264解码器 - 您可以尝试https://github.com/cisco/openh264但是转到iOS 8会让它变得更容易。

Like Markus said, switching to iOS 8 and using the VideoToolbox framework (hardware accelerated decoding) would probably be your best option. 就像Markus所说,切换到iOS 8并使用VideoToolbox框架(硬件加速解码)可能是你最好的选择。 If you're not sure how to use VideoToolbox, I have an example "How to use VideoToolbox to decompress H.264 video stream" that might help you. 如果您不确定如何使用VideoToolbox,我有一个示例“如何使用VideoToolbox解压缩H.264视频流” ,这可能对您有所帮助。

As you can see on 9to5mac.com , 77% of all iPhone users are on iOS8 so it's probably in your interest to start developing for iOS8. 正如你在9to5mac.com上看到的那样 ,77%的iPhone用户都在iOS8上,因此开始为iOS8开发可能符合你的兴趣。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM