DeepMedia logo
Open Source

Search...

Transcoder

Accelerated video compression and transcoding on Android using MediaCodec APIs (no FFmpeg/LGPL licensing issues). Supports cropping to any dimension, concatenation, audio processing and much more.

Version 0.11.1

GitHub

Search

Explore documentation

Other versions of this page

Improve this page on GitHub

Search

Intro

The Transcoder library transcodes and compresses video files into the MP4 format, with audio support, using hardware-accelerated Android codecs available on the device. Works on API 19+ and supports the following set of features:

⚠️

This project started as a fork of ypresto/android-transcoder. With respect to the source project, which misses most of the functionality listed above, we have also fixed a huge number of bugs and are much less conservative when choosing options that might not be supported. The source project will always throw - for example, accepting only 16:9, AVC Baseline Profile videos - we prefer to try and let the codec fail if it wants to.

Minimal example

kotlin logokotlin
Transcoder.into(filePath) .addDataSource(context, uri) // or... .addDataSource(filePath) // or... .addDataSource(fileDescriptor) // or... .addDataSource(dataSource) .setListener(object : TranscoderListener { override fun onTranscodeProgress(progress: Double) = Unit override fun onTranscodeCompleted(successCode: Int) = Unit override fun onTranscodeCanceled() = Unit override fun onTranscodeFailed(exception: Throwable) = Unit }).transcode()

Please keep reading the documentation to learn about install instructions, configuration options and APIs.

License

This project is licensed under Apache 2.0. It consists of improvements over the ypresto/android-transcoder project which was licensed under Apache 2.0 as well:

Copyright (C) 2014-2016 Yuya Tanaka Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More

Subscribe to the DeepMedia Newsletter

The latest news about DeepMedia products, open source projects and software development at our company.

By clicking “Subscribe”, you agree that DeepMedia may use your email address to send you newsletters, including commercial communications, and to process your personal data for this purpose. You agree that DeepMedia may process said data using third-party services for this purpose in accordance with the DeepMedia Privacy Policy. You can revoke this consent at any time using the unsubscribe link included in each email or by writing at contact@deepmedia.io.