Questions tagged [android-mediacodec]

MediaCodec is a class from the package "android.media" of Android API that can be used to access low-level, native media codec, i.e. encoder/decoder components.

MediaCodec is a class from the package android.media of Android API that can be used to access low-level, native media codec, i.e. encoder/decoder components. Along with the common IO it supports input data of the following decoder mime types:

  • "video/x-vnd.on2.vp8" - VPX video (i.e. video in .webm)
  • "video/avc" - H.264/AVC video
  • "video/mp4v-es" - MPEG4 video
  • "video/3gpp" - H.263 video
  • "audio/3gpp" - AMR narrowband audio
  • "audio/amr-wb" - AMR wideband audio
  • "audio/mpeg" - MPEG1/2 audio layer III
  • "audio/mp4a-latm" - AAC audio
  • "audio/vorbis" - vorbis audio
  • "audio/g711-alaw" - G.711 alaw audio
  • "audio/g711-mlaw" - G.711 ulaw audio

The reference to the API docs: http://developer.android.com/reference/android/media/MediaCodec.html

1173 questions
0
votes
0 answers

How can the https://github.com/google/grafika be used to reencode existing videos to have all keyframes

I am trying to re-encode existing video frames to create a video which will have all frames as keyframes(I-frames). The current grafika project has a CameraCaptureActivity which in turn uses VideoEncoderCore to encode videos. I have modified this to…
0
votes
1 answer

MediaCodec::CreateByType "video/avc" fails on nexus 7

I am trying to encode h264 using MediaCodec in nexus 7 device and after re running ( after closing ) my encoder process several times I get a failure when trying to create MediaCodec ( MediaCodec::CreateByType(looper, "video/avc", true) ). the log…
jacob
  • 1,397
  • 1
  • 26
  • 53
0
votes
0 answers

Playback of Streams Are Taking Longer with Android KitKat (AudioTrack + MediaCodec Solution)

I am using MediaCodec + AudioTrack solution to stream MP3 music. It was working fine until the recent KitKat update. With KitKat, the playback begins after approximately 14-15 seconds, whereas on JellyBean it was taking no more than a few seconds.…
burakk
  • 1,231
  • 2
  • 22
  • 45
0
votes
1 answer

Encoding images into a movie file

I am trying to save jpgs into a movie, I have tried jcodec and alothough my s3 plays it fine other devices do not. including vlc and windows media I have just spent most of the day playing with MediaCodec, although the SDK is so high, it will help…
RuAware
  • 979
  • 1
  • 9
  • 26
0
votes
1 answer

How to configure specific GOP size in MediaCodec with KEY_I_FRAME_INTERVAL parameter?

My issue is the next: I know MediaFormat.KEY_I_FRAME_INTERVAL is the interval in seconds (Integer) where the I-Frame is going to appear. So if i give the value to 1, and my frame rate is 15, then the GOP size is going to be 15, and if the frame rate…
javiaf
  • 117
  • 1
  • 3
  • 12
0
votes
1 answer

How to capture and encode audio in a video system_Android

I am trying to build a opensource video system in android, since we have no access to the data in a closed system. In this system, we can modify the raw data captured by camera. I used MediaCodec and MediaMux to do the video data encoding and muxing…
Brendon Tsai
  • 1,267
  • 1
  • 17
  • 31
0
votes
1 answer

trying to develop a video chat application using the h264 encoder

I am trying to develop a video chat application using the h264 encoder for video and MediaCodec Lib. The video should be shown on both client and server. Now I need a tutorial to learn about it. It means that how can I show my camera video on my…
mori
  • 42
  • 8
0
votes
1 answer

Is it impossible to Decode Raw AAC byte stream with MediaCodec on Android4.1 (API 16)?

Is it impossible to Decode Raw AAC byte stream with MediaCodec on Android4.1 (API 16)? Do I need to add some header?? This is the subsequent Quesion of PCM -> AAC (Encoder) -> PCM(Decoder) in real-time with correct optimization Probably related…
user1028880
0
votes
1 answer

Android MediaCodec API - Music Plays on Emulator, Not on the Device

The code given below works fine on the emulator, but not the device. I found the following lines that looked suspicious to me: V/MediaExtractor(5030): Autodetected media content as 'audio/mpeg' with confidence 0.20 V/ChromiumHTTPDataSource(5030):…
burakk
  • 1,231
  • 2
  • 22
  • 45
0
votes
1 answer

Video encoder(mediacodec with encoder surface) re-initialisation for orientation change

Hi I am asking this question with reference to the code at https://github.com/google/grafika . I am trying to re-initialize my encoder during orientation change in order to adjust the aspect ratio of encoded frames.. UPDATE: Here is my…
Kevin K
  • 589
  • 2
  • 7
  • 28
0
votes
2 answers

Android Mediacodec (OMX.ST.VFM.H264Enc)

I have a Samsung Galaxy S3 Mini (GT-I8190 @ 4.1.1) and I am unable to encode raw video frames into an h.264. I've tested on several other devices with different encoder vendors and I was able to get the working adding some vendor/version specific…
Agah PT
  • 130
  • 1
  • 9
0
votes
0 answers

Problems with Android MediaCodec on Nexus 10 specifically

I have written an android app that streams h.264 frames from a mobile-dvr/nvr and the solution works on all of the devices that I have tested on except for the Nexus 10. It successfully streams video on galaxy devices, the Nexus 7, and multiple…
Kiel Wood
  • 1
  • 2
0
votes
1 answer

Does MediaCodec in Android support audio encodec?

I am trying to build a video system. I get the data from Camera through Preview, then I give the data to Mediacodec and let it do the video encoding job. Now I am focus on the audio part. I am not sure which API to use for the audio caperture and…
Brendon Tsai
  • 1,267
  • 1
  • 17
  • 31
0
votes
1 answer

Set the start frame MediaCodec

I would like to know if there is a way to set the first frame that I want to decode. Lets say that I want to start from frame number 300, Is there a way to set frame 300 as the first frame? or I there is a need to go through all the frames until I…
user2235615
  • 1,513
  • 3
  • 17
  • 37
0
votes
1 answer

What is the color type that i get from Buffer, using MediaCodec

I'm followed this example in order to understand how to work with MediaCodec. This example works fine for me except 1 thing, I don't know how to figure what is the color type after I'm grabbing the frame from the buffer. this is how I grab the…
user2235615
  • 1,513
  • 3
  • 17
  • 37