在iOS上的HTTP实时流媒体客户端中拦截视频帧
在通过HTTP直播从服务器播放实时视频的iPhone应用程序中,解码后是否可以访问解码的视频帧 据我所知,在iOS上的HTTP实时流媒体客户端中拦截视频帧,ios,iphone,video,http-live-streaming,Ios,Iphone,Video,Http Live Streaming,在通过HTTP直播从服务器播放实时视频的iPhone应用程序中,解码后是否可以访问解码的视频帧 据我所知,AVPlayer、MPMoviePlayer和CoreVideo似乎没有提供回调来通知应用程序单个帧已解码 我的问题类似于“”,只是我不一定对完整的DVR功能感兴趣。其中的一个答案是服务器端解决方案,而对于客户端解决方案的可能性则含糊不清。它也类似于“”,只是我不需要解决方案来使用MPMoviePlayerController可以像这样使用“AVPlayerItemVideoOutput”:
AVPlayer
、MPMoviePlayer
和CoreVideo
似乎没有提供回调来通知应用程序单个帧已解码
我的问题类似于“”,只是我不一定对完整的DVR功能感兴趣。其中的一个答案是服务器端解决方案,而对于客户端解决方案的可能性则含糊不清。它也类似于“”,只是我不需要解决方案来使用MPMoviePlayerController
可以像这样使用“AVPlayerItemVideoOutput”:
NSDictionary *options = @{ (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA),
(__bridge NSString *)kCVPixelBufferOpenGLESCompatibilityKey : @YES };
myOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:options];
myOutput.suppressesPlayerRendering = NO;
[myOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:1];
[myOutput setDelegate:self queue:dispatch_get_main_queue()];
[playerItem addOutput:myOutput];
我在我的几个项目中都做过。。保重,祝你好运
仅供参考:(AVPlayerItem*playerItem;)
/安德斯