Giter Club home page Giter Club logo

Comments (6)

natario1 avatar natario1 commented on May 18, 2024

Thanks! It could be possible from our side to provide the orientation, yes. But it is also already provided in the mp4 file. We don't apply rotations to the actual video, we just add the orientation tag.

So you should be able to read it from the mp4 file itself

from cameraview.

Guimareshh avatar Guimareshh commented on May 18, 2024

Hey @natario1 ,

I'm working with @Aissa-H, the point isn't to know the orientation of a video (as you said we can read it from the mp4 itself). The goal is to avoid having videos with different orientation. Do you think it's possible ?

from cameraview.

natario1 avatar natario1 commented on May 18, 2024

Oh, ok. So what could the library do? The device is free to rotate. I don't know about your app but I think you should take each MP4, read the orientation tag from the files, rotate videos to a common orientation (e.g. using ffmpeg or whatever) and then merge them.
This ensures that all your parts are correct.

No?

from cameraview.

Guimareshh avatar Guimareshh commented on May 18, 2024

Using ffmpeg is fine to avoid orientation issue, but the process time to merge all MP4 together is incredibly slow. That's why we are using mp4Parser, it's very fast. But this library has orientation issue. As @Aissa-H said, there is a known bug for 2years now. So we are trying others way to fix the issue.

And one workaround could be to have the same orientation for both front and back camera, instead of being different. I don't know if this is something possible. To be honest, I don't even know why in the Android Camera API we have a different orientation depending of front/back (is this reallly usefull ?!)

from cameraview.

natario1 avatar natario1 commented on May 18, 2024

No, we can't rotate the video for you because it is time consuming. They have different orientations because sensors are built with orientations chosen by the manufacturer and the user can always tilt their device before recording. Videos are saved in an unspecified orientation.

The only way to have them correct is to read the tag and rotate, like VideoView does before displaying. If you must do file manipulation, then you must rotate the whole file

from cameraview.

Guimareshh avatar Guimareshh commented on May 18, 2024

Ok I understand now, that's because of manufacturers and not because of the OS. Again, something painful for developers ! Anyway, thanks for your time (and for the lib, very easy to use 👍 ) we will close the issue.

from cameraview.

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.