gpt4 book ai didi

ios - 视频流问题

转载 作者:可可西里 更新时间:2023-11-01 02:59:37 26 4
gpt4 key购买 nike

我正在使用 MPMoviePlayerController 播放 HLSvideo streaming 它在良好和一般的网络上工作正常 (WIFI,3G) 但在慢速网络 (2G) 上无法正常工作。下面是一段相同的代码。同样在慢速网络上搜索栏会导致问题,它向上移动并且播放器显示黑屏。

MPMoviePlayerController  *player = [[MPMoviePlayerController alloc] init];
player.allowsAirPlay = YES;
[self.view addSubview:player.view];
player.view.frame = CGRectMake(5.0, 64.0, [[UIScreen mainScreen] bounds].size.width - 10.0, viwVideo.frame.size.height - 10.0);
player.controlStyle = MPMovieControlStyleDefault;
player.movieSourceType = MPMovieSourceTypeFile;
[player setContentURL:[NSURL URLWithString:@"http://techxvweb.fr/html5/AppleOutput/2012-03-10-j23-dax-smr-mt1-m3u8-aapl.ism/manifest(format=m3u8-aapl)
"]];
[player play];

最佳答案

Apple's docs说:

First bit rate should be one that most clients can sustain The first entry in the variant playlist will be played at the initiation of a stream and is used as part of a test to determine which stream is most appropriate. The order of the other streams is irrelevant. Therefore, the first bit rate in the playlist should be the one that most clients can sustain.

You should create multiple playlists that have the same set of streams, but each with a different first entry that is appropriate for the target network. This ensures the user has a good experience when the stream is first played.

We recommend you point to a 150 Kbps stream for the cellular Variant Playlist.

We recommend you point to a 440 Kbps stream for the Wi-Fi Variant Playlist.

See Recommended Encoding Settings for HTTP Live Streaming Media.

Where possible, encode enough variants to provide the best quality stream across a wide range of connection speeds For example, encode variants at 64 Kbps, 110 Kbps, 200 Kbps, 350 Kbps, 550 Kbps, 900 Kbps and 1500 Kbps.

Audio/Video Stream Considerations Video aspect ratio must be exactly the same, but can be different dimensions.

We recommend 416 x 234 for 16:9 content and 400 x 300 for 4:3 content

关于ios - 视频流问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30883740/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com