简体   繁体   English

如何从服务器在iPhone中进行实时流式传输?

[英]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且使用以下压缩标准之一的文件:

  1. 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框架。)

  2. 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.

相关问题 iPhone上的HTTP直播服务器 - HTTP live streaming server on iPhone Weborb可以用于通过媒体服务器从iPhone进行实时视频流传输吗? - Can Weborb be used to do live video streaming from an iPhone through a media server? 如何从服务器进行音频实时流传输? 以及如何通过实时收听在后台下载音频文件? - how to do audio live streaming from server? and How to Download Audio File in Background with live listening? 如何将从iPhone相机拍摄的视频发送到服务器进行直播? - How to send the video captured from iPhone's camera to a server for live streaming? 如何以编程方式使iPhone中的实时流式视频静音 - How to programmatically mute live streaming video in iPhone 如何将实时视频从iOS流传输到Flash Media Server - How to streaming live video from iOS to Flash Media Server 从iOS(iPhone / iPad)到远程PC /服务器的实时摄像机视频流 - Streaming live camera video from iOS (iPhone/iPad) to remote PC / server 可以使用RTSP(实时流协议)将实时视频流从iPhone发送到媒体服务器吗? - Can RTSP (Real Time Streaming Protocol) be used to send live video stream from iPhone to a media server? 从iPhone中的服务器流式传输视频? - Streaming video from server in iphone? HTTP直播到iPhone - Http live streaming to iphone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM