GPUimageVideoCamera for Android

I use the GPUImage library to compress video in an iOs application (GPUimageVideoCamera) https://github.com/BradLarson/GPUImage/

I worked with it on iOS and very fast

I want to do the same in my Android app, but it looks like the GPUImageMovie class does not exist in the android library: https://github.com/CyberAgent/android-gpuimage/tree/master/library/src/jp/co/ cyberagent / android / gpuimage

It seems that the android library only works with images (no video).

Does anyone know if this library can do the job? If not, did someone develop a GPUImage entire library? If not, what is the best library I can use that can do this job as fast as the GPUImage library.

What GPUimageVideoCamera does in iOS (Real-time video filtering):

To filter live video from an iOS device’s camera, you can use the following code:

GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;

GPUImageFilter *customFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"CustomShader"];
GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, viewWidth, viewHeight)];

  // Add the view somewhere so it visible

    [videoCamera addTarget:customFilter];
    [customFilter addTarget:filteredVideoView];

[videoCamera startCameraCapture];

This sets the video source coming from the rear camera of the iOS camera using a preset that tries to capture an image at 640x480. This video is captured by the interface, which is in portrait mode, when it is necessary for the video frame to rotate before displaying it on the left-to-left frame. The custom filter, using the code from the CustomShader.fsh file, is then set as the target for video frames from the camera. These filtered video clips are finally displayed on the screen using a UIView subclass that can represent the filtered OpenGL ES texture that comes from this pipeline.

GPUImageView fillMode, , , .

, , . , , , .

, , audioEncodingTarget , :

videoCamera.audioEncodingTarget = movieWriter;

, android?

+4

All Articles