Questions tagged [mediaextractor]
Android API MediaExtactor facilitates extraction of demuxed, typically encoded, media data from a data source
119
questions
23votes
1answer
13kviews
SurfaceTexture's onFrameAvailable() method always called too late
I'm trying to get the following MediaExtractor example to work:
http://bigflake.com/mediacodec/ - ExtractMpegFramesTest.java (requires 4.1, API 16)
The problem I have is that outputSurface....
12votes
1answer
2kviews
Get MPEG-4 video stream's profile programmatically on Android
Is there any way to get MPEG-4 video fils's profile-code using standard Android API?
Sample profile-codes are: baseline, main, high and so on.
I don't want to include ffmpeg binary in the android ...
9votes
3answers
15kviews
Android MediaExtractor and mp3 stream
I am trying to play an mp3 stream using MediaExtractor/MediaCodec. MediaPlayer is out of the question due to latency and long buffer size.
The only sample code i have found is this: http://dpsm....
8votes
2answers
3kviews
MediaMuxer unable to make MP4s that are streamable
I'm editing an MP4 on Android using MediaExtractor to fetch audio and video tracks then creating a new file using MediaMuxer. It works fine. I can play the new MP4 on the phone (and other players) but ...
7votes
1answer
5kviews
Decoding audio files and re-encoding to desired PCM format: 44,100 kHz, 2 Channels, 16 Bit
I want to decode audio files to raw PCM data to stream it to a playback device in the local network. I use the new MediaExtractor and MediaCodec classes, introduced with API level 16, for that. The ...
6votes
1answer
6kviews
Android MediaExtractor readSampleData IllegalArgumentException
I try to follow this question Concatenate multiple mp4 audio files using android´s MediaMuxer and concatenate video files.
But for some reason, the MediaExtractor throws an ...
6votes
1answer
5kviews
Inconsistent sample time / presentation time during video decoding
I'm writing an APP that can encode video by camera input and process video by decode-edit-encode steps. For the camera, I use the Camera class rather than Intent to configure the details settings of ...
6votes
0answers
656views
How can I extract rtsp data into MediaCodec
I am having issues with MediaPlayer playing my RTSP stream, so i decided to use the lower level APIs - MediaExtractor and MediaCodec.
The problem is that the setDataSource() method for ...
5votes
2answers
9kviews
Use MediaCodec and MediaExtractor to decode and code video
I need to decode a video into a sequence of bitmaps, such that I am able to modify them, and then compress them back to a video file in android.
I plan to manage this by using getFrameAtTime and ...
5votes
2answers
2kviews
MediaExtractor throws IllegalArgumentException when used with wav file
I am using the Android MediaExtractor like this:
MediaExtractor extractor = new MediaExtractor();
extractor.setDataSource("path/to/my/wav/file.wav");
extractor.selectTrack(0);
ByteBuffer inputBuffer ...
5votes
1answer
2kviews
Android Precise seeking of video
I'm struggling with precise seeking using MediaExtractor's seekTo(). While I can seek to sync frames without problems, I would like to seek to specific time. This question led me to some ideas how to ...
5votes
1answer
7kviews
How to reduce latency in MediaCodec video/avc decoding
I performed some simple timing of MoviePlayer.java in the Grafika MediaCodec sample code running on a Nexus 5. I put a log statement at these locations:
At line 203 just before
decoder....
5votes
1answer
5kviews
Decoding Video and Encoding again by Mediacodec gets a corrupted file
I am trying to implement https://android.googlesource.com/platform/cts/+/jb-mr2-release/tests/tests/media/src/android/media/cts/DecodeEditEncodeTest.java
but modifying the source by using a video file ...
5votes
0answers
2kviews
MediaExtractor throw IOException "Failed to instantiate extractor" when extract ".m4s"
I am trying to implement "m4s" player by mediaExtractor on Android 4.4.
However the mediaExtractor throws an IOException when set "m4s" data source.
Here is my code snippet below
videoExtractor = new ...
4votes
1answer
2kviews
Android MediaCodec How to Frame Accurately Trim Audio
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 ...