android-mediacodec

Android MediaCodec: How many simultaneous (video) decoding threads are supported on multiple SurfaceViews?

匆匆过客 提交于 2021-02-08 03:32:08
问题 From Grafika project, file DoubleDecodeActivity.java. I tried 3 simultaneous video(h264) decoders using MediaCodec APIs on 3 SurfaceViews. On adding 4th decoder to 4th SurfaceView to Nexus 7 with Android 5.1 CRASHES, So how many simultaneous decoders would be possible or supported. PS. After this crash, MediaCodec doesn't work anymore. Need to restart the device to use MediaCodec. Below is the crash log. Crashes at decoder.start() function for 4th decoder thread. com.example.app.one V

android - MediaCodec record video with timestamp on each video frame

两盒软妹~` 提交于 2021-01-21 11:33:32
问题 I need to record video with timestamp on each video frame. I see a example in cts which use InputSurace.java and OutputSurface.java to connect Decoder and Encoder to transcode video files. Is it possible to reuse these two android java class to implement a timestamp video recorder? I try to use OutputSurface as Camera preview output and use InputSurface as MediaCodec Encoder input but sounds like only record 2 or 3 frames then it hang there forever! 回答1: Take your time and explore this link

android - MediaCodec record video with timestamp on each video frame

落花浮王杯 提交于 2021-01-21 11:32:52
问题 I need to record video with timestamp on each video frame. I see a example in cts which use InputSurace.java and OutputSurface.java to connect Decoder and Encoder to transcode video files. Is it possible to reuse these two android java class to implement a timestamp video recorder? I try to use OutputSurface as Camera preview output and use InputSurface as MediaCodec Encoder input but sounds like only record 2 or 3 frames then it hang there forever! 回答1: Take your time and explore this link

H264 ByteStream to Image Files

前提是你 提交于 2021-01-05 07:46:31
问题 first time here so be gentle. I've been working for a few weeks on a given H.264 byte stream: General notes: The Byte Stream is not from a file, it is being fed live to me from an external source. The Byte Stream is encoded with Android's Media Codec. When writing the stream into a file with a .H264 extension, VLC is able to play it properly. What I'm trying to achieve? One of the following: Converting the frames of the H264 stream to a saveable picture file (png/jpeg etc') Converting the

H264 ByteStream to Image Files

怎甘沉沦 提交于 2021-01-05 07:46:24
问题 first time here so be gentle. I've been working for a few weeks on a given H.264 byte stream: General notes: The Byte Stream is not from a file, it is being fed live to me from an external source. The Byte Stream is encoded with Android's Media Codec. When writing the stream into a file with a .H264 extension, VLC is able to play it properly. What I'm trying to achieve? One of the following: Converting the frames of the H264 stream to a saveable picture file (png/jpeg etc') Converting the

Detect the capability of using multiple MediaCodec as video encoder in Android

穿精又带淫゛_ 提交于 2020-08-08 05:18:06
问题 Refer to this question, it is device-dependent that whether an APP can use multiple MediaCodec instances as video encoder or not. Is there a recommended way to detect the capability of this on devices? For example, if there is an Android API to query the support of multiple video encoder or its max count, or this can be checked when creating/initializing the MediaCodec instance before the encoding process? I want to detect the device capability in my APP without the need of encoding bad