Skip to content

Latest commit

 

History

History
81 lines (67 loc) · 3.13 KB

File metadata and controls

81 lines (67 loc) · 3.13 KB
title Intro
docs
install
changelog
data-sources
clipping
concatenation
events
validators
track-strategies
advanced-options

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

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.