All Projects → MasayukiSuda → Mp4composer Android

MasayukiSuda / Mp4composer Android

Licence: mit
This library generate an Mp4 movie using Android MediaCodec API and apply filter, scale, trim, transcode, crop, timeScale, mute and rotate Mp4.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Mp4composer Android

Optivideoeditor For Android
Native Video editor : Video trim, Audio, Video merge, Slow and fast motion, Text and image, etc...
Stars: ✭ 209 (-68.99%)
Mutual labels:  video-processing, video-editing, video-editor
Webmgenerator
UI and Automation to cut, filter and join high quality webms, mp4s or gifs.
Stars: ✭ 103 (-84.72%)
Mutual labels:  video-processing, video-editing, video-editor
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (-95.99%)
Mutual labels:  h264, video-processing, h265
Transcoder
🎞 Hardware-accelerated video transcoding using Android MediaCodec APIs. Supports cropping, concatenation, clipping, audio processing, video speed and much more.
Stars: ✭ 404 (-40.06%)
Mutual labels:  video-processing, h264, video-editing
smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (-76.41%)
Mutual labels:  h264, h265
py-msa-kdenlive
Python script to load a Kdenlive (OSS NLE video editor) project file, and conform the edit on video or numpy arrays.
Stars: ✭ 25 (-96.29%)
Mutual labels:  video-editing, video-editor
yangwebrtc
Webrtc SDK for C++
Stars: ✭ 257 (-61.87%)
Mutual labels:  h264, h265
Node Video Lib
Node.js Video Library / MP4 & FLV parser / MP4 builder / HLS muxer
Stars: ✭ 264 (-60.83%)
Mutual labels:  h264, h265
rrtsp client
Rust high level RTSP client
Stars: ✭ 12 (-98.22%)
Mutual labels:  h264, h265
NVRecoder
It is a lite library to render multiple videos\camera and recoder a new video and each video can change filter.
Stars: ✭ 18 (-97.33%)
Mutual labels:  shader, opengles
Ffmpeg Build Script
The FFmpeg build script provides an easy way to build a static FFmpeg on OSX and Linux with non-free codecs included.
Stars: ✭ 290 (-56.97%)
Mutual labels:  h264, h265
Implicit-Internal-Video-Inpainting
[ICCV 2021]: IIVI: Internal Video Inpainting by Implicit Long-range Propagation
Stars: ✭ 190 (-71.81%)
Mutual labels:  video-processing, video-editing
Auto Editor
Auto-Editor: Effort free video editing!
Stars: ✭ 382 (-43.32%)
Mutual labels:  video-processing, video-editing
laav
Asynchronous Audio / Video Library for H264 / MJPEG / OPUS / AAC / MP2 encoding, transcoding, recording and streaming from live sources
Stars: ✭ 50 (-92.58%)
Mutual labels:  h264, video-processing
cinelerra-cve
NLE Video editor
Stars: ✭ 17 (-97.48%)
Mutual labels:  video-editing, video-editor
video-audio-tools
To process/edit video and audio with Python+FFmpeg. [简单实用] 基于Python+FFmpeg的视频和音频的处理/剪辑。
Stars: ✭ 164 (-75.67%)
Mutual labels:  video-processing, video-editing
Rdvideoeditsdk For Android
Android Video Editing SDK; Android Video Edit SDK: Video Cut, Video Join, Video Watermark, Video Subtitle, Video Rotate...
Stars: ✭ 343 (-49.11%)
Mutual labels:  video-editing, video-editor
Libopenshot
OpenShot Video Library (libopenshot) is a free, open-source project dedicated to delivering high quality video editing, animation, and playback solutions to the world. API currently supports C++, Python, and Ruby.
Stars: ✭ 601 (-10.83%)
Mutual labels:  video-processing, video-editing
AndroidGLKit
AndroidGLKit provides OpenGL ES 2.0 boilerplate codes for Android.
Stars: ✭ 22 (-96.74%)
Mutual labels:  shader, opengles
colab-ffmpeg-cuda
FFmpeg build with CUDA support for Linux (especially for Google Colab)
Stars: ✭ 40 (-94.07%)
Mutual labels:  h264, h265

Mp4Composer-android

Platform API

This library generate an Mp4 movie using Android MediaCodec API and apply filter, scale, trim, transcode, crop, mute and rotate Mp4.
Idea from: android-transcoder


Sample Video
No filter

GlGlayScaleFilter
apply

GlMonochromeFilter
apply

GlWatermarkFilter
apply

Gradle

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.MasayukiSuda:Mp4Composer-android:v0.4.1'
}

Usage

    new Mp4Composer(srcMp4Path, destMp4Path)
            .rotation(Rotation.ROTATION_90)
            .size((width) 540, (height) 960)
            .fillMode(FillMode.PRESERVE_ASPECT_FIT)
            .filter(new GlFilterGroup(new GlMonochromeFilter(), new GlVignetteFilter()))
            .trim((trimStartMs) 200, (trimEndMs) 5000)
            .listener(new Mp4Composer.Listener() {
                @Override
                public void onProgress(double progress) {
                    Log.d(TAG, "onProgress = " + progress);
                }

                @Override
                public void onCompleted() {
                    Log.d(TAG, "onCompleted()");
                    runOnUiThread(() -> {
                        Toast.makeText(context, "codec complete path =" + destPath, Toast.LENGTH_SHORT).show();
                    });
                }

                @Override
                public void onCanceled() {
                    Log.d(TAG, "onCanceled");
                }

                @Override
                public void onFailed(Exception exception) {
                    Log.e(TAG, "onFailed()", exception);
                }
            })
            .start();

Builder Method

method description
rotation Rotation of the movie, default Rotation.NORMAL
size Resolution of the movie, default same resolution of src movie. If you specify a resolution that MediaCodec does not support, an error will occur.
fillMode Options for scaling the bounds of an movie. PRESERVE_ASPECT_FIT is fit center. PRESERVE_ASPECT_CROP is center crop , default PRESERVE_ASPECT_FIT.
FILLMODE_CUSTOM is used to crop a video. Check this for behavior. Sample source code is this.
filter This filter is OpenGL Shaders to apply effects on video. Custom filters can be created by inheriting GlFilter.java. , default GlFilter(No filter). Filters is here.
videoBitrate Set Video Bitrate, default video bitrate is 0.25 * 30 * outputWidth * outputHeight
mute Mute audio track on exported video. Default mute = false.
trim Trim both audio and video tracks to the provided start and end times, inclusive. Default does not trim anything from the start or end.
flipVertical Flip Vertical on exported video. Default flipVertical = false.
flipHorizontal Flip Horizontal on exported video. Default flipHorizontal = false.
videoFormatMimeType The mime type of the video format on exported video. default AUTO. Suppurt HEVC, AVC, MPEG4, H263. Check this.
timeScale Set TimeScale. default value is 1f. should be in range 0.125 (-8X) to 8.0 (8X)

References And Special Thanks to

Sample Dependencies

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].