-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why not transcoding videos other than 16:9 #40
Comments
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. |
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 Just provide a single, target minimum dimension (width or height), and calculate the other dimension to maintain the aspect ratio. Update: |
I was looking at your code, I found that in Android720pFormatStrategy.java
if (longer * 9 != shorter * 16) { throw new OutputFormatUnavailableException("This video is not 16:9, and is not able to transcode. (" + width + "x" + height + ")"); }
So, why are you not transcoding videos other than 16:9?
The text was updated successfully, but these errors were encountered: