Giter Site home page Giter Site logo

ioserwise / xfavfoundation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linglemon/lxfavfoundation

0.0 2.0 0.0 447 KB

这是一个模仿iOS微信拍照,摄像,保存照片或视频到自己本地自定义app相册里面的demo,具有快速简易接入项目的接口。并通过 AVAssetWriter 实现高分辨率录制视频,生成低体积的视频文件

Objective-C 100.00%

xfavfoundation's Introduction

XFAVFoundation

这是一个模仿微信拍照,摄像,保存照片或视频到自己本地自定义app相册里面的demo,具有快速简易接入项目的接口

博客地址: http://blog.csdn.net/sinat_31177681/article/details/75252341

1、优化系统权限相关的提示语,防止App Store审核不通过,针对iPhone X的视频,录制按钮上移

==================================================================================

2、上调了帧率和像素,10s的视频2.8m左右 详细参数设置如下: self.assetWriter = [AVAssetWriter assetWriterWithURL:self.videoURL fileType:AVFileTypeMPEG4 error:nil]; //写入视频大小 NSInteger numPixels = kScreenWidth * kScreenHeight; //每像素比特 CGFloat bitsPerPixel = 12.0; NSInteger bitsPerSecond = numPixels * bitsPerPixel;

// 码率和帧率设置
NSDictionary *compressionProperties = @{ AVVideoAverageBitRateKey : @(bitsPerSecond),
                                         AVVideoExpectedSourceFrameRateKey : @(15),
                                         AVVideoMaxKeyFrameIntervalKey : @(15),
                                         AVVideoProfileLevelKey : AVVideoProfileLevelH264BaselineAutoLevel };

//视频属性
self.videoCompressionSettings = @{ AVVideoCodecKey : AVVideoCodecH264,
                                   AVVideoScalingModeKey : AVVideoScalingModeResizeAspectFill,
                                   AVVideoWidthKey : @(kScreenHeight * 2),
                                   AVVideoHeightKey : @(kScreenWidth * 2),
                                   AVVideoCompressionPropertiesKey : compressionProperties };

_assetWriterVideoInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:self.videoCompressionSettings];

==================================================================================

3、新增监听屏幕方向,支持各个方向录制,查看录制的小视频时,会按home键在下方正常显示

==================================================================================

4、新增连续聚焦连续曝光功能

==================================================================================

5、新增横屏拍照

==================================================================================

6、新增捏合手势对录制小视频的支持,现在小视频支持最大拉近3倍距离录制

==================================================================================

xfavfoundation's People

Contributors

linglemon avatar

Watchers

James Cloos avatar  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.