Comments (6)
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.
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.
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.
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.
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.
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)
- Fatal Exception: android.media.MediaCodec$CodecException: start failed
- Can insert background music while recording a video?
- app:cameraPictureFormat="jpeg|dng"
- Exception java.lang.IllegalStateException: at android.media.MediaCodec.native_configure
- mirror issues HOT 1
- CameraView.destroy CameraEngine.destroy ANR (java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278))
- Video Recording not working on some device
- How to set preview and frame orientation
- Activiti Eu Transfer
- NullPointerException at GlTextureDrawer.setFilter
- MediaEncoder drainOutput IllegalStateException
- Flash Bug HOT 3
- Camera orientation changed value not sanitized
- Add methods to set ISO and shutter Speed and different kind of focus
- Fatal Exception: java.lang.RuntimeException Error during eglCreateContext (2): EGL error 0x3006 HOT 1
- Crashing when used with AGP 8.2 HOT 1
- NullPointerException HOT 1
- Is it possible to get full Exif data on picture snapshot?
- if i want to com.otaliastudios.cameraview.CameraView on cropview i to get any bitmap or any uri without capture perform cropview please suggest
- FATAL EXCEPTION: VideoEncoder java.lang.IllegalStateException: writeSampleData returned an error
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 cameraview.