GithubHelp home page GithubHelp logo

linglemon / lxfavfoundation Goto Github PK

View Code? Open in Web Editor NEW
260.0 260.0 46.0 555 KB

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

Objective-C 100.00%

lxfavfoundation's People

Contributors

linglemon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lxfavfoundation's Issues

录制的视频通过QuickTime查看帧数,依然是30

image
@constant AVVideoExpectedSourceFrameRateKey
@abstract
Indicates the expected source frame rate, if known.
@discussion
The frame rate is measured in frames per second. This is not used to control the frame rate; it is provided as a hint to the video encoder so that it can set up internal configuration before compression begins. The actual frame rate will depend on frame durations and may vary. This should be set if an AutoLevel AVVideoProfileLevelKey is used, or if the source content has a high frame rate (higher than 30 fps). The encoder might have to drop frames to satisfy bit stream requirements if this key is not specified.
*/
AVVideoExpectedSourceFrameRateKey这个key无法控制帧数

频繁录视频出现闪退

[self.assetWriter startWriting]; 提示 [AVAssetWriter startWriting] Cannot call method when status is 1。

调用系统相册后拍照会崩溃

非常感谢大神的分享,我发现把XFAVFoundation和XFPhotoLibraryManager两个文件拖到自己的项目里可以成功调用相机,也可以正常拍摄视频和照片,但是如果我在项目中调用UIImagePickerController系统相册后,再次调用XFCameraController拍照时会崩溃,崩溃定位到takePhotos方法,根据设备输出获得连接时,captureConnection为空值, //根据设备输出获得连接
AVCaptureConnection *captureConnection = [self.captureStillImageOutput connectionWithMediaType:AVMediaTypeVideo];
请问大神,这种情况怎么办啊?

修改储存路径就无法录视频了

框架里虽然后自定义视频文件夹的属性,但是没用上。我改了一下使用自定义路径,也是在document文件夹里,多了一层文件夹而已,视频就没法录了。

录制小视频奔溃

报错原因:
-[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer: Must start a session (using -[AVAssetWriter startSessionAtSourceTime:) first
(null)
偶发 无法复现出来~

iOS13点击确认后没有响应的临时解决办法

升级到iOS13后拍照或者视频后点击确认按钮没有相应。原因是savePhotoWithImage这个方法在保存到系统相册后,在将照片复制到自定义相册的时候,不知道什么原因出错了。临时的解决方案就是只保存到系统相册,注释掉自定义相册的逻辑

image

录制中的一些问题和权限问题

如果录制时间不是很长显示不出 保存和取消按钮
如果授权开始不同意崩了,后来在设置中给了授权还是会出问题崩溃

iPhoneX问题

您好,拍摄视屏和预览视屏我看您设置的填充模式都是AVLayerVideoGravityResizeAspect,在使用iPhone X拍摄(拍摄没有全屏)之后,播放却成了全屏,并且视屏被切割了(相当于AVLayerVideoGravityResizeAspectFill)。不知道是什么问题。

录制视频时出现

Only run on the main thread!

  • (void)appendSampleBuffer:(CMSampleBufferRef)sampleBuffer ofMediaType:(NSString *)mediaType

把demo拖入工程报错

Undefined symbols for architecture arm64:
"OBJC_CLASS$_CMMotionManager", referenced from:
objc-class-ref in XFCameraController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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.