pepsikirk / pkshortvideo Goto Github PK
View Code? Open in Web Editor NEWA video library like WeChat short video for iOS.
License: MIT License
A video library like WeChat short video for iOS.
License: MIT License
进入视频录制画面,按home退到后台,之后再进入,点击按住录,程序崩溃。
您好:
问题如图~
你好,我发现在iPhone 4跟5(iOS 7.x)上会崩溃([AVCaptureVideoDataOutput _AVCaptureVideoDataOutput_VideoDataBecameReady]),在dismiss之前将previewLayer remove掉就可以了。希望有点帮助。
AVCaptureVideoPreviewLayer *previewLayer = [self.recorder previewLayer];
...
_previewLayer = previewLayer;
[_previewLayer removeFromSuperlayer];
[self dismissViewControllerAnimated:YES completion:NULL];
您好:
因为现在在Tableview上存在小视频的cell和播放录音的cell,如果两者同时存在的话,点击按钮播放录音会报这个[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session,想请问一下有没有什么办法可以结局
如题:希望PKShortVideoRecorder能暴露更多属性设置比特率、曝光度、清晰度等
具体描述为,如果是运行完直接播放该视频是正常的,如果杀死程序,再次运行,之前录制的小视频就没有声音(播放画面是正常的),如果重新录制新的小视频,可以正常播放,之前录制的也可以,
必须将View controller-based status bar appearance设置为yes才能隐藏状态栏,设置为NO ,不隐藏时间栏
如题,感谢
现在如果换成online video 的url, 会显示空白...
AVAssetReader 不支持remote url asset.
请问,有什么好的方法支持播放远程video呢?
self.videoTrackSourceFormatDescription = (CMFormatDescriptionRef)CFRetain(formatDescription);
CFRetain时报错,应该是切换摄像头时 self.outputVideoFormatDescription = nil;导致的。但运行你的demo又没问题。
-湛蓝_大神你好!
我这边在使用 PKPlayerView 不能播放短视频;具体代码如下:
录制视频:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *fileName = [NSProcessInfo processInfo].globallyUniqueString;
NSString *path = [paths[0] stringByAppendingPathComponent:[fileName stringByAppendingPathExtension:@"mp4"]];
//跳转默认录制视频ViewController
PKRecordShortVideoViewController *viewController = [[PKRecordShortVideoViewController alloc] initWithOutputFilePath:path outputSize:CGSizeMake(320, 240) themeColor:[UIColor colorWithRed:0/255.0 green:153/255.0 blue:255/255.0 alpha:1]];
//通过代理回调
viewController.delegate = self;
[self presentViewController:viewController animated:YES completion:nil];
播放视频:
(void)didFinishRecordingToOutputFilePath:(NSString *)outputFilePath{
_outputFilePath = outputFilePath;
_playerView = [[PKPlayerView alloc] initWithFrame:CGRectMake(30, 30, kScreenWidth - 60, 200)
videoPath:_outputFilePath
previewImage:[UIImage pk_previewImageWithVideoURL:[NSURL fileURLWithPath:_outputFilePath]]];
[self.view addSubview:_playerView];
UITapGestureRecognizer *tapp = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(playViewAction)];
[_playerView addGestureRecognizer:tapp];
}
(void)playViewAction{
//跳转全屏播放小视频界面
[_playerView play];
}
谢谢!
if (self.isBigSize) {
captureSession.sessionPreset = AVCaptureSessionPresetMedium;//360 x 480 小视频一般不会超过此尺寸
} else {
captureSession.sessionPreset = AVCaptureSessionPreset1280x720;//720 x 1280 小视频一般不会超过此尺寸
}
满足isBigSize的情况 摄像头会更模糊。 方便说一下为什么要这么处理吗
第一次进入拍摄界面,点击拍摄会提示麦克风权限,如果拒绝,这次拍摄依然可以正常拍摄完成。
但是退出拍摄界面后再次进入,点击拍摄会直接崩溃,崩溃位置在
#0. Crashed: com.apple.main-thread
[PKShortVideoSession addAudioTrackWithSourceFormatDescription:settings:] (PKShortVideoSession.m:81)。
建议添加麦克风权限检查,根据麦克风权限开启与否相应的添加或者不添加音轨。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.