[英]how to do live streaming in iphone from the server?
I want to broadcast the video from the local server into the iPhone. 我想将视频从本地服务器广播到iPhone。 I only get link which is coming from the web-service with any extension of the video.
我只收到来自网络服务的链接,该链接带有视频的任何扩展名。
Video can be in any format.. 视频可以是任何格式。
LIKE : @"avi",@"wmv",@"rmvb",@"flv",@"f4v",@"swf",@"mkv",@"dat",@"vob",@"mts",@"ogg",@"mpg",@"wma"
像:
@"avi",@"wmv",@"rmvb",@"flv",@"f4v",@"swf",@"mkv",@"dat",@"vob",@"mts",@"ogg",@"mpg",@"wma"
so,which player is better for my app. 因此,哪个播放器更适合我的应用。
1) MPMovieplaycontroller
or 1)
MPMovieplaycontroller
或
2) AVPlayer controller
2)
AVPlayer controller
Please help me. 请帮我。
From the MPMoviePlayerController docs: 从MPMoviePlayerController文档:
Supported Formats 支持的格式
This class supports any movie or audio files that already play correctly on an iPod or iPhone. 此类支持已在iPod或iPhone上正确播放的所有电影或音频文件。 This includes both streamed content and fixed-length files.
这包括流内容和定长文件。 For movie files, this typically means files with the extensions .mov, .mp4,.mpv, and .3gp and using one of the following compression standards:
对于电影文件,这通常意味着扩展名为.mov,.mp4,.mpv和.3gp且使用以下压缩标准之一的文件:
H.264 Baseline Profile Level 3.0 video, up to 640 x 480 at 30 fps. H.264 Baseline Profile Level 3.0视频,在30 fps下最高为640 x 480。 (The Baseline profile does not support B frames.)
(“基准”配置文件不支持B框架。)
MPEG-4 Part 2 video (Simple Profile) If you use this class to play audio files, it displays a white screen with a QuickTime logo while the audio plays. MPEG-4第2部分视频(简单配置文件)如果使用此类播放音频文件,则在播放音频时它将显示带有QuickTime徽标的白屏。 For audio files, this class supports AAC-LC audio at up to 48 kHz, and MP3 (MPEG-1 Audio Layer 3) up to 48 kHz, stereo audio
对于音频文件,此类支持高达48 kHz的AAC-LC音频和高达48 kHz的MP3(MPEG-1音频第3层)立体声音频
You have to use 3rd Party libraries for your mentioned case 您必须为上述案例使用3rd Party库
The built in media player won't support any of those formats. 内置的媒体播放器不支持任何这些格式。
Your only option is really a third party library like VLCKit. 您唯一的选择实际上是像VLCKit这样的第三方库。 I've never used it, but it likely supports more formats that you require: https://wiki.videolan.org/VLCKit/
我从未使用过它,但是它可能支持您需要的更多格式: https : //wiki.videolan.org/VLCKit/
Though I've never tried before, but I am sure you will get help from this apple documentation . 尽管我以前从未尝试过,但是我相信您会从此Apple文档获得帮助。
There is a nice discussion here about your problem. 关于您的问题, 这里有一个很好的讨论。 Sorry for not giving a direct answer.
很抱歉没有给出直接答案。 Hope this helps.. :)
希望这可以帮助.. :)
This AVPlayer SDK DOC may be helpful for you. 此AVPlayer SDK DOC可能对您有所帮助。 But as per your requirement you have go for third part or your custom implementations.
但是根据您的要求,您可以使用第三部分或自定义实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.