Code Monkey home page Code Monkey logo

Comments (2)

ypresto avatar ypresto commented on June 17, 2024 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.

edwardotis avatar edwardotis commented on June 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.