mp4 与 m3u8 格式

发布于 2024-12-02 04:48:22 字数 357 浏览 6 评论 0原文

我正在尝试在 iPhone 中播放 m3u8 格式的视频。视频的链接是从 XML 解析的(所以我无法更改它)。我正在尝试使用 MoviePlayerController 来播放它(将其设置为全屏,controlStyle 也是全屏,将 presentModalViewController 设置为 MoviePlayerController)。按下播放按钮后,电影只有几秒钟的声音,没有视频屏幕,并且应用程序崩溃。

在此 XML 中,我有一个不同的视频链接,其中包含 mp4 格式。以相同的模式播放视频(使用 MoviePlayerController 和设置...),效果很好。那么:您知道问题是什么吗? m3u8的编码有问题吗?如果可以改变又如何改变?

谢谢 :)

I am trying to play a video in iPhone, which has m3u8 format. The video's link is parsed from an XML (so i cannot change it). I'm trying to play it with MoviePlayerController (set it on fullscreen, controlStyle is fullscreen too, set the presentModalViewController to the MoviePlayerController). After pressing the play button, the movie has only sound for a few seconds, no video screen, and the app crashes.

In this XML I have a different videolink, which contains mp4 format. Playing the video in the same mode (with MoviePlayerController and the settings...), it works fine. So: do you have any ideas what the problem is? If there is any encoding problems of m3u8? If it can be changed and how?

Thank you :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

匿名。 2024-12-09 04:48:22

从 Peter Steinberger 发布的这个非常有用的开源控件中查看 AVPlayerDemoPlaybackViewController 类
https://github.com/steipete/PSPushPopPressView
再次感谢彼得!

Look the AVPlayerDemoPlaybackViewController class from this very useful open source control released by Peter Steinberger
https://github.com/steipete/PSPushPopPressView
Thanks again Peter!

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