相关疑难解决方法(0)

将iphone相机直播到媒体服务器的最佳方式是什么?

根据这种技术最适合将iPhone视频摄像机数据直播到计算机?可以从iphone相机获取压缩数据,但正如我在AVFoundation参考中读到的那样,你只能得到未压缩的数据.

所以问题是:

1)如何从iPhone的相机获取压缩帧和音频?

2)用ffmpeg的API编码未压缩的帧对于实时流是否足够快?

任何帮助将非常感激.

谢谢.

iphone ffmpeg avfoundation video-streaming ios4

9
推荐指数
1
解决办法
8146
查看次数

Ios旋转,过滤ios中的视频流

你好我在旋转并通过GPUImage在视频直播上应用图像过滤器任务消耗的时间比预期的多,导致iPhone过热任何人都可以帮助我优化我的代码以下是我用过的代码:

- (void)willOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer{
    //return if invalid sample buffer
    if (!CMSampleBufferIsValid(sampleBuffer)) {
        return;
    }

    //Get CG Image from sample buffer
    CGImageRef cgImageFromBuffer = [self cgImageFromSampleBuffer:sampleBuffer];
    if(!cgImageFromBuffer || (cgImageFromBuffer == NULL)){
        return;
    }

    //We need rotation to perform
    UIImage *rotatedPlainImage = [UIUtils rotateImage:[UIImage imageWithCGImage:cgImageFromBuffer] byDegree:90];
    if (rotatedPlainImage == nil) {
        CFRelease(cgImageFromBuffer);
        return;
    }

    //Apply image filter using GPU Image on CGImage
    CGImageRef filteredCGImage = [self.selectedPublishFilter newCGImageByFilteringCGImage:rotatedPlainImage.CGImage];

    //Convert back in CMSamplbuffer
    CMSampleBufferRef outputBufffer = [self getSampleBufferUsingCIByCGInput:filteredCGImage andProvidedSampleBuffer:sampleBuffer];

    //Pass to custom encode of Red5Pro …
Run Code Online (Sandbox Code Playgroud)

avfoundation video-streaming ios gpuimage red5pro

5
推荐指数
1
解决办法
987
查看次数

标签 统计

avfoundation ×2

video-streaming ×2

ffmpeg ×1

gpuimage ×1

ios ×1

ios4 ×1

iphone ×1

red5pro ×1