Hello,
I am writing an app that reads and plays real-time camera videos.
I encountered some issues while using the MobileVLCKit
The problem video url: https://www.my-practice.ch/app/video.mp4
I down load the vlc ios app,The vlc app has only experienced a very short gray screen once, not as frequently as my app.
I think there may be some issues with my parameter configuration, and I hope you can give me some suggestions.
I referred to the source code of vlc ios and set mediaOptions to the following, but the problem still exists
- (NSDictionary *)mediaOptionsDictionary
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
return @{ @"network-caching" : @(999),
@"subsdec-encoding" : @"Windows-1252",
@"avcodec-skiploopfilter" : @(1),
@"codec" : @"",
@"rtsp-tcp" : @(NO)
};
}
Here is my code:
NSURL *url=[NSURL URLWithString:@"rtsp://192.168.0.104:554/11"]; // i use rtsp,192.168.0.104 is a camera ip in LAN
VLCMediaPlayer *_player = [[VLCMediaPlayer alloc] init];
_player.drawable = playView;
VLCMedia *media = [VLCMedia mediaWithURL:url];
NSMutableDictionary *mediaDictionary = [[NSMutableDictionary alloc] init];
[mediaDictionary setObject:@"700" forKey:@"network-caching"];
[media addOptions:mediaDictionary];
[_player setMedia:media];
Thanks.