mediacodec

android-ndk crash in android::MediaCodec?

旧巷老猫 提交于 2019-12-13 05:23:39
问题 Can someone help me figure out what is the following crash about? Thanks. I/DEBUG ( 3007): Build fingerprint: 'samsung/zerofltetmo/zerofltetmo:5.1.1/LMY47X/G920TUVU2COF8:user/release-keys' I/DEBUG ( 3007): Revision: '11' I/DEBUG ( 3007): ABI: 'arm' I/DEBUG ( 3007): pid: 19656, tid: 21303, name: MediaCodec_loop >>> com.******.**** <<< I/DEBUG ( 3007): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14 I/DEBUG ( 3007): r0 f4a23e40 r1 00000003 r2 ca10ab30 r3 00000000 I/DEBUG ( 3007): r4

MediaCodec createInputSurface failed with -38

Deadly 提交于 2019-12-13 02:29:41
问题 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 activity, the app crashed. My device infomation is as follows: Model: Lenovo A560 Android version: 4.3 I am sure this is the key log: 06-29 21:27:50.267 E/OMXMaster(17347): A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one

Editing frames and encoding with MediaCodec

白昼怎懂夜的黑 提交于 2019-12-12 19:37:34
问题 I was able to decode an mp4 video. If I configure the decoder using a Surface I can see the video on screen. Now, I want to edit the frame (adding a yellow line or even better overlapping a tiny image) and encode the video as a new video. It is not necessary to show the video and I don't care now about the performance.(If I show the frames while editing I could have a gap if the editing function takes a lot of time), So, What do you recommend to me, configure the decoder with a GlSurface

Change rotation in MediaFormat

一个人想着一个人 提交于 2019-12-12 17:25:02
问题 In Android API 23 MediaFormat.KEY_ROTATION field was introduced. Is there any way to change rotation in MediaFormat on earlier Android versions? 回答1: I found the working solution: MediaFormat mediaformat; // ... mediaformat.setInteger("rotation-degrees", 0) 来源: https://stackoverflow.com/questions/33242851/change-rotation-in-mediaformat

store meta data in buffer failed and do not know color format

我怕爱的太早我们不能终老 提交于 2019-12-12 10:25:02
问题 I am getting following error 02-13 15:22:23.807: E/ACodec(8137): [OMX.qcom.video.decoder.avc] storeMetaDataInBuffers failed w/ err -2147483648 02-13 15:22:23.808: W/ACodec(8137): do not know color format 0x7fa30c03 = 2141391875 . in implementing http://bigflake.com/mediacodec/ExtractMpegFramesTest_egl14.java.txt complete log : 02-13 16:51:14.275: D/ExtractMpegFramesTest(11294):testExtractMpegFrames 02-13 16:51:14.337: D/ExtractMpegFramesTest(11294): Extractor selected track 0 (video/avc):

Mediacodec decoder always times out while decoding H264 file

半腔热情 提交于 2019-12-12 08:15:57
问题 I have been trying to decode a video file which is encoded via H264 encoding with Android's MediaCodec and tried to put the output of the decoder to a surface , but when I run the app it shows a black surface and in DDMS logcat I see that decoder timed out . I have parsed the file into valid frames first [reading 4 bytes first which indicates the length of the upcoming frame and then read length amount bytes which indicates the frame, then again reading 4 bytes for the length of the next

Which video encoders are guaranteed to be supported by android MediaCodec API?

不问归期 提交于 2019-12-12 06:17:12
问题 Testing video encoding with the MediaCodec API in several devices, I noticed all of them have encoders for h264, h263, and MPEG-4. Are any of these guaranteed to be supported by all devices which have at least Jelly Bean, even if the actual encoding done by MediaCodec is done by software instead of hardware? 回答1: The Android Compatibility Definition Document (CDD) defines a set of mandatory features. Google "Android <version> CDD" to find the appropriate one. For example, if you open the 4.3

How to real-timely render Image Data(YUV420SP) decoded by MediaCodec to SurfaceView on Android?

给你一囗甜甜゛ 提交于 2019-12-12 05:05:19
问题 MediaCodec has a limitation FPS of decoding, I want to break that, so I need to render frames by myself, instead of internal feature of MediaCodec. I assume that only RGB565 can be render to SurfaceView on Android platform. I've been searching for many solutions of YUV420->RGB565 on Android, but all solutions need separated Y U V data, but separating YUV420SP data into Y U V would cost much time. How do i fix that? Thanks for all who helps. @Codo if(colorFmt == 21) { int nSize = bufferInfo

Android Mediamuxer moov atom

断了今生、忘了曾经 提交于 2019-12-12 04:27:29
问题 I am recording device screen using Mediacodec and Mediamuxer api everything is fine. Now I want to stream this file while recording, but cant until muxer is stopped and moov atom is written at the end of file. So my question is it even possible using Mediamuxer for the purpose? If not what are the alternatives? 回答1: No, it's not possible. In order to send an MP4 file while it is being written, you need to write fragmented MP4, and MediaMuxer only writes non-fragmented MP4. 来源: https:/

What is the alternative to use createInputSurface() on API 17 and below

若如初见. 提交于 2019-12-12 03:22:05
问题 For one of my app which saves camera preview to a buffer, I am using the function Mediacodec.createInputSurface() and everything works fine as I was using API 19 and above. Now I want the same code to work for api 17 and below as well for some other devices where this api does not exist. Can someone help me by telling what alternative I can use? here is a piece of my code: private Surface mInputSurface; private MediaCodec mEncoder; mInputSurface = mEncoder.createInputSurface(); Thanks for any