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
6
votes
1 answer

How to mix two audio samples and encode back to audio file using MediaMuxer

I currently have two separate media extractors and codecs that I am using to break down each individual sample into ByteBuffers. Then I store each sample into two short arrays. Then I call my mix function which combines the two samples into one…
AMG
  • 117
  • 7
6
votes
1 answer

Record video with MediaCodec and MediaMuxer, but the bitrate and framerate are incorrect

I wrote a demo to record a video using MediaCodec and MediaMuxer. I record a video with my demo and use ffprobe to check the video, the result is as follows: Duration: 00:00:06.86, start: 0.000000, bitrate: 723 kb/s Stream #0:0(eng): Video: h264…
dragonfly
  • 1,151
  • 14
  • 35
6
votes
2 answers

Record video and audio from a GLSurfaceView and export it to .mp4

I am a newbie in OpenGL. I want to record video and audio from a GLSurfaceView and export it to .mp4 (or other formats). I have a GlsurfaceView that implement Renderer I've tried using fadden examples's in bigflake.com like EncodeAndMuxTest.java ,or…
leon
  • 942
  • 11
  • 15
6
votes
1 answer

Non-streamable video file created with MediaMuxer

I am using MediaCodec to encode video. Frames are coming through the camera preview callback to the MediaCodec instance (no Surface used). I am using JCodec library for muxing and I am able to stream produced video (video player is showing correct…
Andrey Chernih
  • 3,513
  • 2
  • 27
  • 27
5
votes
1 answer

Problems in making Video from Lottie JSON File and Overlay it with original video using FFMPEG

there is some unique concept about processing Lottie Animations using FFMPEG video processing library and MediaCodec. In that, I wants to make video from Lottie animation and overlay that video on other original video. But the problem is i'm unable…
Krishna Vyas
  • 1,009
  • 8
  • 25
5
votes
2 answers

How to trim video with MediaCodec

I'm trying to record the screen with MediaProjection API. I want to trim the video that was recorded by the media projection. Is there a way to do that without using any 3rd party dependency?
mnagy
  • 1,085
  • 1
  • 17
  • 36
5
votes
0 answers

Mp3 to wav conversion android

I have working code to convert wav to m4a.is there anyway to convert mp3 to m4a by modifying my existing code.I don't want to use ffmpeg or native code to this.The below function is working for wav to m4a conversion but not working for mp3 to…
Nikhil
  • 650
  • 1
  • 11
  • 28
5
votes
0 answers

MediaMuxer writeSampleData error

I use MediaMuxer to mix audio and radio data, the data is from two encoders, the flow is correct and I get the output and play it. But the MediaMuxer maybe failed when writeSampleData because of the error : E/MPEG4Writer: timestampUs 21932611 <…
jinux
  • 135
  • 1
  • 11
5
votes
1 answer

Converting wmv video file to mp4 video file using MediaMuxer and MediaCodec

I want to convert .wmv video file to mp4 video file. Is possible to using MediaMuxer and MediaCodec classes?
nguoitotkhomaisao
  • 1,247
  • 1
  • 13
  • 24
4
votes
2 answers

Record SurfaceView animation as video file in android

Last time I've investigated video exporting on android (Adding watermark bitmap over video in android: 4.3's MediaMuxer or ffmpeg) it wasn't an easy task. Here's a scenario: I have a SurfaceView and a drawn BitMap at x,y coordinates. The user taps…
Alin
  • 14,809
  • 40
  • 129
  • 218
4
votes
1 answer

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 in order to match their Video frame…
David Manpearl
  • 12,362
  • 8
  • 55
  • 72
4
votes
1 answer

Editing frames and encoding with MediaCodec

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…
4
votes
0 answers

Encode bitmaps to movie using MediaCodec and MediaMuxer with custom presentation time for each image

I am trying to create a movie from a series of Bitmaps. I would like to target API 19 but also take advantage of API 21 if it is available on the device. I have been reading the bigflake CTS tests especially EncodeAndMux and EncodeDecodeTest here I…
Kaitis
  • 628
  • 9
  • 21
4
votes
0 answers

Recording Audio and Video with mediaMuxer examples?

I am trying to record audio and video with mediaMuxer. I followed the example for video recording from https://github.com/google/grafika but when I tie in an audiostream it results in a broken video over half the time. Does anyone know of any…
QuinnBaetz
  • 559
  • 9
  • 23
4
votes
2 answers

Recording Audio and Video using MediaMuxer on Android

I'm trying to record audio and video using AudioRecord, MediaCodec and MediaMuxer provided in Android 4.3 However, sometimes the audio encoder thread stops and is not encoding anymore. The result is, a broken mp4 file, because the muxer does not…
chris6523
  • 530
  • 2
  • 8
  • 18
1
2
3
11 12