Comments (4)
Setting and getting the camera frame rate is a bit tricky. I didn't want to complicate Grafika with a bunch of code that I didn't understand especially well, so the app makes a half-hearted attempt to set the rate and doesn't try to determine and publish the actual value.
There's a good explanation of how to configure the camera for a specific rate here: http://stackoverflow.com/questions/22639336/#22645327
from grafika.
Setting the framerate isn't an issue. I set it as 30 and ideally its 30 only but while reading it back sometimes it reports the video is 59.something. Is there a way and APIs that i can use to read video frame rates, ideally MediaMetadataRetriever should do this job but theres no key for that. I m using ffmpeg to read the rate currently which isn't working reliably as they are not 59 for sure. Any idea?
from grafika.
I'm not sure how the frame rate reporting works within ffmpeg. Video generated by Android is variable frame rate. You can look at the presentation time stamps to determine the spacing between two frames, but there's no guarantee from the encoder that the output will have frames at regular intervals.
I'm told that, with recent versions of the ffmpeg command-line app, you can convert videos from variable-rate to fixed-rate with something like:
ffmpeg -i device-video.mp4 -c:v libx264 -qp:v 0 -coder 0 -r 60 -vsync 1 -preset:v ultrafast output.mp4
Somebody was using this to convert "screenrecord" output to fixed-rate 60fps. I don't know if this fits with your planned usage.
from grafika.
Marking closed as this seems to be an issue with ffmpeg's interaction with MediaCodec output, rather than an issue with Grafika.
from grafika.
Related Issues (20)
- Extend encode/decode test example with asynchronous API
- Sound not available in Video using CameraCaptureActivity HOT 1
- how can i remove shape HOT 1
- how can i add shapes in texture view using open gl
- glReadPixels returns a blank image on disabling blend
- Decoding four video streams simultaneous on Google Pixel 2 phone
- seconds of video in Continuous Capture mode becomes double after keeping it on for a while. HOT 3
- If you want to record mp4 with sound, use this one https://github.com/moo611/OpenCamera
- Memory leak of Texture2dProgram
- Continuous capture bug(Android5.1.1) HOT 1
- Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x38 in tid 9379, pid 9379
- Some OpenGL stuff doesn't work on some devices: eglMakeCurrent failed and glDrawArrays: glError 0x505 HOT 4
- How to show front and back camera simultaneously? HOT 5
- Can we play scene.json in grafika?
- Test HOT 1
- Doesn't build on Flamingo and Giraffe HOT 2
- fun fact HOT 1
- Camera2 Pass Images from ImageReader to MediaRecorder HOT 2
- Camera2 pipeline; synchronously get PRIVATE/YUV/RGB Image data from a Frame HOT 4
- Website
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 grafika.