Commit 2d12bae309d6909b1d03aff52529489a414c54ea

Authored by daojian
1 parent fa7c97b4

修改压缩分辨率和码率

CNLiveUploadManager.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveUploadManager'
11   - s.version = '0.1.21'
  11 + s.version = '0.1.22'
12 12 s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveUploadManager/Classes/CNLiveUploadManager.m
... ... @@ -2422,7 +2422,7 @@ static CNLiveUploadManager *_uploadManager;
2422 2422 shortVideoTranscoder.outputURL = [NSURL fileURLWithPath:editOutputPath];
2423 2423 shortVideoTranscoder.outputFileType = PLSFileTypeMPEG4;
2424 2424 shortVideoTranscoder.outputFilePreset = [CNLiveUploadManager presetWithVideoLimitType:limitType url:url dataL:dataL];//分辨率
2425   - shortVideoTranscoder.bitrate = [CNLiveUploadManager bitrateWithPreset:shortVideoTranscoder.outputFilePreset limitType:limitType avAsset:avAsset url:url dataL:dataL];
  2425 +// shortVideoTranscoder.bitrate = [CNLiveUploadManager bitrateWithPreset:shortVideoTranscoder.outputFilePreset limitType:limitType avAsset:avAsset url:url dataL:dataL];
2426 2426 shortVideoTranscoder.timeRange = timeRange;
2427 2427 shortVideoTranscoder.rotateOrientation = PLSPreviewOrientationPortrait; //视频显示
2428 2428 shortVideoTranscoder.videoSelectedRect = CGRectZero; //视频剪裁区域
... ... @@ -2482,7 +2482,7 @@ static CNLiveUploadManager *_uploadManager;
2482 2482 NSLog(@"1输出转码前数据长度%f",(dataL/(1024.0*1024)));
2483 2483 if (limitType == AppPhototLimitTypeChat) {//聊天
2484 2484 if (dataL > kCNUploadSize20MB) {
2485   - return PLSFilePreset640x480;
  2485 + return PLSFilePreset960x540;
2486 2486 }else {
2487 2487 return PLSFilePreset960x540;
2488 2488 }
... ... @@ -2496,20 +2496,20 @@ static CNLiveUploadManager *_uploadManager;
2496 2496  
2497 2497 }else if (limitType == AppPhototLimitTypeSweepCode) {//扫码
2498 2498 if (dataL > kCNUploadSize30MB) {
2499   - return PLSFilePreset640x480;
  2499 + return PLSFilePreset960x540;
2500 2500 }else {
2501 2501 return PLSFilePreset960x540;
2502 2502 }
2503 2503 }else if (limitType == AppPhototLimitTypeTarentoComment) {//评论
2504 2504 if (dataL > kCNUploadSize30MB) {
2505   - return PLSFilePreset640x480;
  2505 + return PLSFilePreset960x540;
2506 2506 }else {
2507 2507 return PLSFilePreset960x540;
2508 2508 }
2509 2509  
2510 2510 }else {
2511 2511 if (dataL > kCNUploadSize30MB) {//其他
2512   - return PLSFilePreset640x480;
  2512 + return PLSFilePreset960x540;
2513 2513 }else {
2514 2514 return PLSFilePreset960x540;
2515 2515 }
... ...
Example/Podfile
1 1 use_frameworks!
2 2  
3   -source 'https://github.com/CocoaPods/Specs.git'
  3 +#source 'https://github.com/CocoaPods/Specs.git'
4 4 source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git'
  5 +source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
5 6  
6 7 platform :ios, '9.0'
7 8  
... ...