Giter Club home page Giter Club logo

androidvideosamples's People

Contributors

hoolrory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

androidvideosamples's Issues

Strange difference in behavior in Kitkat and below

Input: front Camera captured videos with OrientationHint set at 270 to make end result as Portrait video.

Action: Resize(Downsample)

Behaviour in Lollipop: The videos are auto rotated to portrait format. So we have to pass Resolution.360p.getWidth() as height and Resolution.360p.getHeight() as width. The end result is proper portrait videos (video completely changed to portrait, not the metadata or container orientation)

Behaviour in Kitkat: The videos are in landscape mode.

Why this difference in behaviour? I would like to get the behaviour as in Lollipop, so that the video is completely transformed to 360x640 portrait resolution

Can not set bitrate lower than 2073600

Your code work perfectly when set birate greater than 2073600, however when i set it lower than 2073600 (1000000 for example), it will automatically change back to 2073600. I using Android 12 API 31 Pixel 5.

Cannot scale the video properly

I recored one video from camera with width=864 and height=480.

When I scale it down by 2, then the video get compressed with no issues.

But when I scale it down by 4, then I get warning : width or height not multiple of 16 and below exception :
java.lang.IllegalStateException at android.media.MediaCodec.dequeueOutputBuffer(Native Method) at VideoResampler.resampleVideo(VideoResampler.java:376) at VideoResampler.feedClipToEncoder(VideoResampler.java:245) at VideoResampler.resampleVideo(VideoResampler.java:208) at VideoResampler.access$200(VideoResampler.java:37) at VideoResampler$VideoEditWrapper.run(VideoResampler.java:165) at java.lang.Thread.run(Thread.java:841)

Is the issue related to scaling?

No audio after Video Resample

There is no audio in generated video file.
I have used this code,

VideoResampler resampler = new VideoResampler();
        resampler.addSamplerClip(new SamplerClip(inputUri));
        resampler.setOutput(outputUri);
        resampler.setOutputResolution(Resolution.RESOLUTION_360P.getWidth(), Resolution.RESOLUTION_360P.getHeight());
        try {
            resampler.start();
        } catch (Throwable e) {
            e.printStackTrace();
        }

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.