Code Monkey home page Code Monkey logo

android-camera2video's Introduction

Camera2Video

App for recording high fps video using CLI. Only pixel devices supported.

1. Build

$ cd ~/proj/android-Camera2Video
$ ./gradlew build
...
BUILD SUCCESSFUL in 19s
54 actionable tasks: 13 executed, 41 up-to-date

In some cases, you may need to point to a java 8 distribution:

$ JAVA_HOME=/usr/lib/jvm/java-1.8.0 ./gradlew build

2. Install

$ ./gradlew installDebug
...
BUILD SUCCESSFUL in 3s
27 actionable tasks: 1 executed, 26 up-to-date

In some cases, you may need to point to a java 8 distribution:

$ JAVA_HOME=/usr/lib/jvm/java-1.8.0 ./gradlew installDebug

You may want to check whether your app has been installed successfully:

$ adb shell pm list packages |grep camera2
package:com.example.android.camera2video

And uninstall the app.

$ adb shell pm uninstall com.example.android.camera2video
Success

3. Recording

When you run the command for the first time, you will have to accept the required permissions for the add. You can do that either by accepting in the menu, or using these commands:

$ adb shell pm grant com.example.android.camera2video android.permission.CAMERA
$ adb shell pm grant com.example.android.camera2video android.permission.RECORD_AUDIO
$ adb shell pm grant com.example.android.camera2video android.permission.READ_EXTERNAL_STORAGE
$ adb shell pm grant com.example.android.camera2video android.permission.WRITE_EXTERNAL_STORAGE

3. Recording

Example 1: simple recording.

$ adb shell am broadcast \
    -a com.example.android.camera2video.RECORD_SLOW_MOTION \
    --es RECORDING start

Example 2: record to a specific filename, for 2 seconds, 1280x720 resolution and using 30 fps.

$ adb shell am broadcast \
    -a com.example.android.camera2video.RECORD_SLOW_MOTION \
    --es RECORDING start \
    --el DURATION_TIME_SEC 2 \
    --es RECORDING_FILENAME foo.mp4 \
    --ei CAPTURE_VIDEO_WIDTH 1280 \
    --ei CAPTURE_VIDEO_HEIGHT 720 \
    --ei CAPTURE_FPS 30

android-camera2video's People

Contributors

google-automerger avatar chemag avatar michalkielan avatar ggfan avatar codingjeremy avatar tjohns avatar

Watchers

James Cloos avatar

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.