Comments (2)
CTS contains encoding test for 1280x720 and it is listed in Supported Media Formats. But other resolution like 960x540 (iOS can encode in this res) causes broken video at least Nexus 4. It perhaps limitation or bug of hardware codec. So we cannot use something like 1280x600 for output resolution to adapt to aspect ratio of input video.
So if input file is other than 16:9, we should crop it and fit into 16:9, but currently cropping is not supported by this library.
Perhaps it can be done by manipulating vertex shader and etc. in TextureRender.java.
from android-transcoder.
In my tests, you can use this library to encode videos of arbitrary aspect ratio, as long as you maintain that aspect ratio in your strategy. >= API23
I've successfully tested downsizing video bitrate and dimensions with input ratios of: 16x9, 4x3, 1x1, 18.5x9 with no issues.
https://en.wikipedia.org/wiki/Aspect_ratio_(image)#Current_video_standards
Just provide a single, target minimum dimension (width or height), and calculate the other dimension to maintain the aspect ratio.
Update:
But as ypresto mentioned above, these output resolutions may not be playable on older devices and api versions.
from android-transcoder.
Related Issues (20)
- landscape and portrait HOT 2
- Release notes for version 0.3.0? HOT 2
- Is this library can work on "older API"? HOT 3
- MediaFormatValidator.validateAudioOutputFormat validates the inputFormat instead of outputFormat HOT 2
- Non-baseline AVC video profile is not supported by Android OS (Android 9.0) HOT 9
- Update novoda version and Android target SDK
- Help with open sourcing a similar project HOT 13
- I use 0.3.1 still encounter the problem HOT 1
- Cannot process video for bad input file
- 0.3.1 release? HOT 2
- Generate Video from images HOT 3
- increase the video compression level HOT 1
- Simple crop
- Problems with anamorphic videos
- coryjthompson / android-transcoder HOT 1
- Discussion: what are the (near future) plans for android-transcoder? HOT 2
- seekTo
- java.lang.IllegalArgumentException: extractor does not contain video and/or audio tracks.
- HEVC encoding support?
- HE-AAC has half of the sample rate, How to support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-transcoder.