grafika

android grafika ContinuousCapture activity issues

我的未来我决定 提交于 2019-12-02 01:37:46
I'm using android grafika for video recording and I'll change all things that I want. Everything works perfectly. There are only 2 problems: If I save video after 7 seconds like 2 seconds or below 7 seconds then it saves a 7 second video. If I take a video 15 seconds or more then it takes the last 7 seconds of video. I want to solution : if I save after 7 second video like for a 2 second then save the video for 2 second I want to save first 7 seconds of video This Github link which I follow : Grafika How to solve these 2 problems? Note: If you have Orientation issue in portrait mode then

MediaCodec Encoded video has green bar at bottom and chrominance screwed up

我怕爱的太早我们不能终老 提交于 2019-12-01 09:04:23
I started a project from Grafika and modified it. I've got a framework (not too different from the original) which captures a preview from the Camera and continuously encodes it to a video at the same time both at different resolutions. MediaCodec (for encoding) is configured to use COLOR_FormatSurface in order for us to be able to render to the Surface queried using getInputSurface() using GLES. The media format is set to MIME Type video/avc For most phones, this setup works perfectly. But for a few phones, the encoded video has the chrominance values slightly skewed and a green bar at the

MediaCodec Encoded video has green bar at bottom and chrominance screwed up

£可爱£侵袭症+ 提交于 2019-12-01 06:33:23
问题 I started a project from Grafika and modified it. I've got a framework (not too different from the original) which captures a preview from the Camera and continuously encodes it to a video at the same time both at different resolutions. MediaCodec (for encoding) is configured to use COLOR_FormatSurface in order for us to be able to render to the Surface queried using getInputSurface() using GLES. The media format is set to MIME Type video/avc For most phones, this setup works perfectly. But

How to add Audio to Video while Recording [ContinuousCaptureActivity] [Grafika]

瘦欲@ 提交于 2019-11-30 20:34:08
I implement Video recording using ContinuousCaptureActivity.java . it's work perfectly. Now i want to add Audio in this video. I know using MediaMuxer it is possible to add audio in video. But the problem is i don't know how to i use MediaMuxer . Also if you have any other solution without MediaMuxer then share with me any link or doc. also i have demo AudioVideoRecordingSample . But i don't understand how to i merge this with my code. please explain to me if anyone knows. Thanks in Advance. Merging Audio File and Video File private void muxing() { String outputFile = ""; try { File file = new

How to add Audio to Video while Recording [ContinuousCaptureActivity] [Grafika]

谁说我不能喝 提交于 2019-11-30 04:48:21
问题 I implement Video recording using ContinuousCaptureActivity.java . it's work perfectly. Now i want to add Audio in this video. I know using MediaMuxer it is possible to add audio in video. But the problem is i don't know how to i use MediaMuxer . Also if you have any other solution without MediaMuxer then share with me any link or doc. also i have demo AudioVideoRecordingSample . But i don't understand how to i merge this with my code. please explain to me if anyone knows. Thanks in Advance.

Use rotateM() of Matrix to rotate matrix from SurfaceTexture but corrupt the video output

拜拜、爱过 提交于 2019-11-29 07:33:57
I managed to play video with opengl es, I used the way of grafika's ContinuousCaptureActivity, my data source is MediaPlayer rather than Camera which makes no difference. MediaPlayer produces video frames continuously and I draw each frame to screen in onFrameAvailable callback. The code is as follows which works well: mVideoTexture.updateTexImage(); mVideoTexture.getTransformMatrix(mTmpMatrix); mDisplaySurface.makeCurrent(); int viewWidth = getWidth(); int viewHeight = getHeight(); GLES20.glViewport(0, 0, viewWidth, viewHeight); mFullFrameBlit.drawFrame(mTextureId, mTmpMatrix);

Crop video before encoding with MediaCodec for Grafika's “Continuous Capture” Activity

人走茶凉 提交于 2019-11-27 04:33:47
I am learning about Grafika's "Continuous Capture" Activity, It is about recording a video with MediaCodec. The activity source code is at https://github.com/google/grafika/blob/master/src/com/android/grafika/ContinuousCaptureActivity.java The program uses a SurfaceTexture obj to receive data from camera and creates 2 EGLSurface obj with this SurfaceTexture obj, one EGLSurface obj feeds the data to MediaCodec and the other feeds data to SurfaceView for camera preview. MediaCodec encodes the data to h264 data and the MediaMuxer obj writes h264 data to a mp4 file. But there is a problem, the

Crop video before encoding with MediaCodec for Grafika's “Continuous Capture” Activity

筅森魡賤 提交于 2019-11-26 11:16:33
问题 I am learning about Grafika\'s \"Continuous Capture\" Activity, It is about recording a video with MediaCodec. The activity source code is at https://github.com/google/grafika/blob/master/src/com/android/grafika/ContinuousCaptureActivity.java The program uses a SurfaceTexture obj to receive data from camera and creates 2 EGLSurface obj with this SurfaceTexture obj, one EGLSurface obj feeds the data to MediaCodec and the other feeds data to SurfaceView for camera preview. MediaCodec encodes