Questions tagged [mediamuxer]

Android class : "MediaMuxer facilitates muxing elementary streams."

Android class : "MediaMuxer facilitates muxing elementary streams." https://developer.android.com/reference/android/media/MediaMuxer

172 questions
61
votes
1 answer

Encoding and muxing video using MediaCodec and MediaMuxer

I am developing an App where I decode a video and replace certain frames and re-encode using MediaMuxer and MediaCodec. The App works if I do not replace any frames (except for 1080p videos as I explain below), but when I do, the frames after the…
Mohamed_AbdAllah
  • 5,311
  • 3
  • 28
  • 47
33
votes
4 answers

Adding watermark bitmap over video in android: 4.3's MediaMuxer or ffmpeg

Here is my scenario: Download an avi movie from the web Open a bitmap resource Overlay this bitmap at the bottom of the movie on all frames in the background Save the video on extarnal storage The video length is 15 seconds usually Is this…
Alin
  • 14,809
  • 40
  • 129
  • 218
16
votes
1 answer

How can I trim a video from Uri, including files that `mp4parser` library can handle, but using Android's framework instead?

Background Over the past few days, I've worked on making a customizable, more updated version of a library for video trimming, here (based on this library) The problem While for the most part, I've succeeded making it customizable and even converted…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
10
votes
9 answers

MediaMuxer video file size reducing (re-compress, decrease resolution)

I'm looking for efficient way to reduce some video weight (as a File, for upload) and obvious answer for that is: lets reduce resolution! (fullHD or 4K not needed, simple HD is sufficient for me) I've tried lot of ways which should work through lot…
snachmsm
  • 17,866
  • 3
  • 32
  • 74
8
votes
4 answers

android - How to mux audio file and video file?

i have a 3gp file that is recorded from the microphone and a mp4 video file. i want to mux audio file and video file in to a mp4 file and save it. i searched a lot but didn't find any thing helpful for using MediaMuxer api of android. MediaMuxer…
mohamad ali gharat
  • 501
  • 1
  • 5
  • 10
8
votes
2 answers

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 am unable to stream the file on the web. When I…
mbert65
  • 227
  • 2
  • 7
7
votes
2 answers

Android: Encoding audio and video using MediaCodec

I'm trying to encode video from camera and audio from microphone using MediaCodec and MediaMuxer. I use OpenGL to overlay text on the image while recording. I took these classes as…
user992029
7
votes
1 answer

Android Extract Decode Encode Mux Audio

I am trying to adapt the code found in ExtractDecodeEditEncodeMuxTest.java in order to extract audio and video from a mp4 recorded via Cordova's device.capture.captureVideo, decode the audio, edit the decoded audio samples, encode the audio, and mux…
7
votes
1 answer

How can I convert audio .mp3 to .m4a programmatically in android

I don't want to use ffmpeg. Currently I was able to mux m4a audio with mp4 video. I wish to add mp3 audio also which required mp3 to m4a conversion.I was able to convert wav to m4a but not mp3 to m4a with below code Here is my code. private void…
Nikhil
  • 650
  • 1
  • 11
  • 28
7
votes
0 answers

What are the official requirements for MediaMuxer to be able to merge videos

In an application that consists in different MediaCodec and (others Android.Media namespace stuff) prooves of concept, I'm generating a video on an opengl frame along with a PCM tone so that I have data to send to a two MediaCodec encoder (PCM…
Léon Pelletier
  • 2,701
  • 2
  • 40
  • 67
7
votes
1 answer

How to record video and audio with MediaCodec and MediaMuxer

I am able to record(encode) video with the help of MediaCodec and MediaMuxer. Next, I need to work on audio part and mux audio with video with help of MediaCodec and MediaMuxer. I am facing two problems: How to encode audio with MediaCodec. Do I…
abhishek kumar gupta
  • 2,189
  • 6
  • 35
  • 56
6
votes
1 answer

How to mux (merge) video&audio, so that the audio will loop in the output video in case it's too short in duration?

Background I'm required to merge a video file and an audio file to a single video file, so that: The output video file will of the same duration as the input video file The audio in the output file will only be of the input audio file. If it's too…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
6
votes
1 answer

Screen Sharing between Devices using Media Projection API

I am developing an app which has the functionality of sharing screens with other apps. I used the Media projection API for this. I also used MediaMuxer to combine the audio and video outputs for screen sharing. I know that Media Projection APIs are…
6
votes
1 answer

Android MediaCodec dequeueInputBuffer always returns -1

I'm trying to take raw data from the AudioRecord object and save it in a file using a MediaMuxer and MediaCodec. I start the codec, start the muxer, load data into the input buffers and no such luck. From debugging investigation, I've found that…
6
votes
1 answer

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 IllegalArgumentException when I call the readSampleData In the official API,…
Taiko
  • 1,351
  • 1
  • 19
  • 35
1
2 3
11 12