Git Product home page Git Product logo

Comments (4)

fadden avatar fadden commented on May 6, 2024

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.

saurabytes avatar saurabytes commented on May 6, 2024

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.

fadden avatar fadden commented on May 6, 2024

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.

fadden avatar fadden commented on May 6, 2024

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)

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.