GithubHelp home page GithubHelp logo

yuknight / deepred Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amazingyyc/deepred

0.0 0.0 0.0 25.05 MB

livephoto on android

License: Other

Java 8.96% Makefile 14.25% C 69.90% C++ 6.72% Objective-C 0.17%

deepred's Introduction

DeepRed

livephoto on android

在android实现类似于LivePhoto的功能

原理

见博客:http://www.cnblogs.com/amazingyyc/p/4995539.html
##demo 当点击“拍摄按钮”的同时点击网页的“启动”按钮,保留了前后1.5s左右的视频 ![image](https://github.com/amazingyyc/DeepRed/blob/master/pic/2015-11-25 16_58_42.gif)
##代码说明 ####视频默认存储在sdcard/DeepRed目录中 1.改变视频的分辨率:修改com.deepcolor.deepred.shot.CameraInstance中的MIN_PREVIEW_WIDTH的值,MIN_PREVIEW_WIDTH越大视频分辨率越大。

2.改变视频bit率:修改jni/encoder.cpp下的int Encoder::get_bit_rate_by_height(int height)函数

3.改变视频帧率:修改jni/content.h中的VIDEO_FPS值

3.改变音频bit率:修改jni/content.h下的AUDIO_BIT_RATE值

4.改变视频长度:修改jni/content.h下的TIME_DURATION和com.deepcolor.deepred.shot.ShotInstance中的ADD_SECOND_PART_MSG_DELAY_TIME的值

5.改变视频存储位置:修改com.deepcolor.deepred.util.FileUtil下的getAppPath()函数

6.源代码按键的同时拍摄一段“小视频”,没进行图片的拍摄,调用系统接口即可实现,太懒了不想做了。。。。修改的地方在:com.deepcolor.deepred.sho.ShotInstance中的takePicture()函数。

截图

1:中间“黄色摄像机”图标:是否开启livephoto功能
2:“闪电图标”:对焦模式
####3:左右滑动切换前后摄像头
image

deepred's People

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.