2 Star 30 Fork 22

chenjim/CameraDemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Android Camera2Video Sample

This sample captures video record via the Camera2 API including displaying a camera preview and capturing a high-speed (slow motion) video using repeating capture requests.

Introduction

The Camera2 API allows users to capture video from the camera by sending repeating capture requests from the camera framework to a media recorder.

This sample displays a live camera preview, allows the user to press and hold the screen to record a video, and also encodes the recording in an MP4 video file. The user has the following choices:

  1. The dimensions and frame rate of the video
  2. Which camera to use
  3. Whether to capture in HDR format or SDR format
  4. Whether to capture using two streams directly to a SurfaceView, or one stream to an EGL pipeline
  5. Whether to apply a portrait filter in TextureView mode
  6. Whether to apply preview stabilization
  7. In single-stream mode with HDR, whether to use linear or PQ preview

The choice to use HDR will be presented if the capability is detected on the host device.

Pre-requisites

  • Android SDK 33+
  • Android Studio 3.6+
  • Device with video capture capability (or emulator)

Screenshots

Screenshot

Getting Started

This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.

Support

If you've found an error in this sample, please file an issue: https://github.com/android/camera-samples

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Android
1
https://gitee.com/chenjim/CameraDemo.git
git@gitee.com:chenjim/CameraDemo.git
chenjim
CameraDemo
CameraDemo
master

搜索帮助