mediacodec

Video Cut/trim crashes using Intel media-for-mobile sample

北城以北 提交于 2019-12-11 08:08:03
问题 I am using Intel media-for-mobile sample (https://github.com/INDExOS/media-for-mobile) to Trim/Cut video. However when I try for video trim and click start button it gives me an error: java.lang.IllegalStateException with logcat red error as: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one. [OMX.qcom.video.decoder.avc] configureCodec returning error -1010 Codec reported an error. (omx error 0x80001001, internalError -1010) Can any body help me to get rid of

MediaCodec returns null for getOutputImage on real devices - Emulator works

£可爱£侵袭症+ 提交于 2019-12-11 06:35:20
问题 I'm trying to grab the Image of a Video via the MediaCodec using the getOutputImage method (Framework used: Exoplayer). I'm NOT using a SurfaceView and every thing else seems fine (this is the implementation). On my emulator I get proper Images. On all my real devices (OnePlus One with Android 7.1.1, Honor 8 with Android 7.0, Samsung Galaxy Tab S with Android 6.0.1) I ALWAYS get null as Image. The Video does play however because I can hear the sound. When showing the Image on a SurfaceView,

android MediaExtractor MediaCodec seek

那年仲夏 提交于 2019-12-11 06:02:41
问题 Question again, guys. I use MediaExtractor and MediaCodec to play MP4 file on android device. Everything works fine until I try to add Extractor.seekto(). If I just play mp3 file with my player,seeking functions well. However, when I try it with MP4 file, the video is not updated. I tried to debug the code, finding out that the mPlayerExtractor.getSampleTrackIndex() always returns 1 (Refer to the audio track). But I do not know how to fix it. I cannot put all my code here. So please give me

MediaCodec.configure fails with IllegalStateException for 1080p videos

半城伤御伤魂 提交于 2019-12-11 04:33:30
问题 I've been using grafika's MoviePlayer and bigFlake's ExtractMpegFramesTest to implement a seeking and extract frame feature in our app. These work fine for most of our user, however some of them encounter a IllegalStateException on MediaCodec.configure when setting up the ExtractMpegFramesTest (this happens on Samsung Galaxy S4 mini, Samsung Galaxy J7, Samsung Galaxy A5, Huawei Ascend G7). The relevant code is as the following: MoviePlayer public void prepareResources() throws IOException { /

MediaCodec signalEndOfInputStream() error

▼魔方 西西 提交于 2019-12-11 04:16:13
问题 I'm trying to use the Live Camera Recording ( With Opengl ) from the Sample Code Grafika. Every things works fine on my Moto G but i try in my other device (Galaxy Tab 2 with Cyanogendmod 11) it's seems the method : signalEndofInputStream() is not working and the Encoder never stop. It's there a way to send the signal to the MediaCodec in an other way ? Sorry for bad English. 回答1: You can work around it. If you look at DecodeEditEncodeTest, you can see a mysterious boolean called WORK_AROUND

How to keep decoding alive during screen orientation?

梦想的初衷 提交于 2019-12-11 03:36:59
问题 Folks, I am using MediaCodec to decode a network stream. Method configure() on MediaCodec takes a SurfaceView object as a parameter, making it easy to decode the output directly into the surface view. The problem comes in when the device orientation is changed. The old surface gets destroyed and a new surface is created. The surface that mediacodec is still holding becomes invalid. I cannot destroy MediaCodec object and recreate a new one. This would result in waiting for a few more seconds

Media codec 4.1 Issue

廉价感情. 提交于 2019-12-11 03:22:21
问题 It works fine on most of the devices except nexus5, moto G as per my testing. on these devices app producing video with only two frames.and also getting the following error log [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -2147483648 Could you please help me out to fix this issue. 回答1: from http://bigflake.com/mediacodec/#q12 Q12. Why am I seeing storeMetaDataInBuffers failures in the log? A12. They look like this (example from a Nexus 5): E OMXNodeInstance: OMX

Android MediaCodec How to Frame Accurately Trim Audio

一个人想着一个人 提交于 2019-12-11 02:08:40
问题 I am building the capability to frame-accurately trim video files on Android. Transcoding is implemented with MediaExtractor , MediaCodec , and MediaMuxer . I need help truncating arbitrary Audio frames in order to match their Video frame counterparts. I believe the Audio frames must be trimmed in the Decoder output buffer, which is the logical place in which uncompressed audio data is available for editing. For in/out trims I am calculating the necessary offset and size adjustments to the

force i-frame when using mediacodec with createInputSurface

微笑、不失礼 提交于 2019-12-11 01:26:52
问题 is it possible to trigger the encoder to send i-frames when using a surface as the input ? I know its possible when when queuing input buffers, but I didnt find a way to do so when using createInputSurface . 回答1: You can't set flags on the buffers. This also affects BUFFER_FLAG_END_OF_STREAM , but for that you have the signalEndOfInputStream() call. I frames will be sent every KEY_FRAME_RATE * KEY_I_FRAME_INTERVAL buffers. (I don't know how firm that is -- I suspect they might appear more or

Android Vision Face Detection with Video Stream

做~自己de王妃 提交于 2019-12-10 19:14:41
问题 I am trying to integrate the face detection api in a video stream I am receiving from a parrot bebop drone. The stream is decoded with the MediaCodec class (http://developer.android.com/reference/android/media/MediaCodec.html) and this is working fine. Rather than rendering the decoded frame data to a surface view, I can successfully access the ByteBuffer with the decoded frame data from the decoder. I can also access the decoded image objects (class https://developer.android.com/reference