Questions tagged [grafika]

Grafika is an open-source SDK app which provides a collection of hacks for testing graphics features. It is developed by Google for API 18 (Android 4.3).

Grafika is an app which provides a collection of hacks for testing graphics features. It is developed by Google for API 18 ().

Grafika is available on GitHub.

71 questions
4
votes
0 answers

Android Decode raw h264 stream with MediaCodec

I have troubles with decoding and drawing raw h264 data with MediaCodec on the TextureView. I recieve the raw data in byte arrays, each of the array is NAL unit (starts with 0x00 0x00 0x00 0x01), also there are SPS and PPS NAL units in constant…
Krzysztof Kansy
  • 305
  • 2
  • 13
4
votes
2 answers

Grafika's CameraCaptureActivity - camera preview distorted on preview size change

I referred to Grafika's CameraCaptureActivity to record video while simultaneously displaying the camera preview. The changes I have made to the code (that is relevant) is - The user clicks a button to launch PreferencesActivity, selects the…
ForeverNoob
  • 141
  • 1
  • 14
3
votes
1 answer

Orientation Issue while video recording in Portrait Mode android grafika

I set the device Orientation Landscape mode then it saves the video perfectly. if I capture a video with both sides. But I set the device orientation Portrait Mode this work weird. For Example: Below Screenshot while i Recording video : But when…
Ali
  • 3,346
  • 4
  • 21
  • 56
3
votes
0 answers

Scaling and rotating texture transformation Matrix at the same time

Starting from grafika examples I am trying to capture a camera stream to file. Before encoding I need to apply some transformations: Rotate the image I can do this: Matrix.translateM(transform, 0, 0.5F, 0.5F, 0); Matrix.rotateM(transform, 0,…
natario
  • 24,954
  • 17
  • 88
  • 158
3
votes
0 answers

Add watermark to encoded video in grafiak

I have created a sample using grafika code where I am creating the video from camera feeds. In grafika sample there is a method to drawExtra while passing data to muxer which add dots in vidoe. I want to add water mark in place of this at left…
3
votes
2 answers

Flipping openGL texture from Bytebuffer before creating the Bitmap in Android

I'm using a live streaming API that relies on Google's Grafika repo. I'm using Grafika EGLSurfaceBase's saveFrame method to allow the user to capture stills of his video while he…
Laurent
  • 1,554
  • 19
  • 42
2
votes
0 answers

android grafika ContinuousCapture activity issues

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…
Ali
  • 3,346
  • 4
  • 21
  • 56
2
votes
0 answers

camera2 API continuous capture with Grafika

Hello guys I'm trying to implement the continuous capture functionality from the Grafika library (https://github.com/google/grafika) in a custom app application but I need to use the camera2 API because I from what I learned the old camera API has…
2
votes
1 answer

Android MediaCodec backward seeking

I'm trying to implement precise seeking for video using MediaCodec and MediaExtractor. By following Grafika's MoviePlayer, I've managed to implement the forward seeking. However I'm still having problem with backward seeking. The relevant bit of…
vxh.viet
  • 388
  • 5
  • 21
2
votes
0 answers

MediaCodec createInputSurface failed with -38

I launch the grafika, a dialog turned out and said "Failed to generate cotent. Some features may be unavailable. Can't use input surface with software codec: OMX.google.h264.encoder" Then I click OK button and entered the continuous caputure…
dragonfly
  • 1,151
  • 14
  • 35
2
votes
1 answer

How to fix the 0x3009 (EGL_BAD_MATCH) issue while invoking eglCreatePbufferSurface?

I use the createOffscreenSurface from grafika: /** * Creates an off-screen surface. */ public void createOffscreenSurface(int width, int height) { if (mEGLSurface != EGL14.EGL_NO_SURFACE) { throw new IllegalStateException("surface…
Jerikc XIONG
  • 3,517
  • 5
  • 42
  • 71
2
votes
0 answers

Decoding two 4K videos at the same time

I would like to decode and play two videos simultaneously. My code isn't very complicated, you can see decoder configuring part below. It's based on google/grafika's MoviePlayer. final String mime = format1.getString(MediaFormat.KEY_MIME); decoder1…
Krzysztof Kansy
  • 305
  • 2
  • 13
2
votes
0 answers

Android OpenGL shader does not get created

I'm using OpenGl to apply some effects on a video. This happens in two places, one is while playing the video and the other while saving this video as a separate file. The preview part (playing the video) works fine, but for the video saving part…
Samarth
  • 201
  • 1
  • 3
1
vote
0 answers

how to put Activity(rootview, something else) to SurfaceTexture

I want to make one Android application part of another application (something like the browser in a unity 3d game) and for this the first one provides the second SurfaceTextures(can use only this way). Are there any code examples how can I…
1
vote
1 answer

Camera2 OpenGL random glitches in video caused by Matrix.rotateM

I used the Grafika app and modified it to use the Camera2 API instead of the old API. I needed to use an OpenGL solution as I need to draw a watermark on top of the video, and Grafika was really useful. Unfortunately, my output videos are recording…
JCutting8
  • 732
  • 9
  • 29