mediamuxer

android - How to mux audio file and video file?

自古美人都是妖i 提交于 2019-11-28 06:06:31
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 api UPDATE : this is my method that mux two files , i have an Exception in it. and the reason is that the destination mp4 file doesn't have any track! can someOne help me with adding audio and video track to muxer?? Exception java.lang.IllegalStateException: Failed to stop the muxer my code: private void cloneMediaUsingMuxer( String dstMediaPath)

Concatenate multiple mp4 audio files using android´s MediaMuxer

一个人想着一个人 提交于 2019-11-28 05:42:40
问题 I am trying to concatenate multiple mp4 audio files (each containing only one audio track, all recorded with the same MediaRecorder and the same parameters) into one using the following function: @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) public static boolean concatenateFiles(File dst, File... sources) { if ((sources == null) || (sources.length == 0)) { return false; } boolean result; MediaExtractor extractor = null; MediaMuxer muxer = null; try { // Set up MediaMuxer for the destination

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

我怕爱的太早我们不能终老 提交于 2019-11-28 00:25:36
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 (High) (avc1 / 0x31637661), yuv420p, 320x240, 619 kb/s, SAR 1:1 DAR 4:3, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2015-06-05 13:19:24 handler_name : VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 96 kb/s (default) Metadata: creation_time : 2015-06-05 13:19:24 handler_name :

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

孤街浪徒 提交于 2019-11-27 03:44:42
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 possible to achieve using MediaMuxer ? Any info on the matter is gladly received I've been looking to http://bigflake.com/mediacodec/#DecodeEditEncodeTest (Thanks @fadden) and it says there: "Decoding the frame and copying it into a ByteBuffer with glReadPixels() takes about 8ms on the Nexus 5, easily fast enough to keep pace with 30fps input, but the

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

老子叫甜甜 提交于 2019-11-26 21:41:12
问题 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 (High) (avc1 / 0x31637661), yuv420p, 320x240, 619 kb/s, SAR 1:1 DAR 4:3, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2015-06-05 13:19:24 handler_name : VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D),

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

本小妞迷上赌 提交于 2019-11-26 10:50:03
问题 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 possible to achieve using MediaMuxer ? Any info on the matter is gladly received I\'ve been looking to http://bigflake.com/mediacodec/#DecodeEditEncodeTest (Thanks @fadden) and it says there: \"Decoding the frame and copying it into a ByteBuffer with