coderhenry66 / wavideobox Goto Github PK
View Code? Open in Web Editor NEW秒级! 三行代码实现iOS视频压缩、变速、混音、合并、GIF水印、旋转、换音、裁剪 ! 支持不同分辩率,支持你能想到的各种混合操作! 扩展性强...更多功能不断增加中... iOS 8.0 + 有需要的功能或错误欢迎issue,笔者会及时更新
License: Apache License 2.0
秒级! 三行代码实现iOS视频压缩、变速、混音、合并、GIF水印、旋转、换音、裁剪 ! 支持不同分辩率,支持你能想到的各种混合操作! 扩展性强...更多功能不断增加中... iOS 8.0 + 有需要的功能或错误欢迎issue,笔者会及时更新
License: Apache License 2.0
感谢您的分享!
demo中修改速率(变速)是整体修改,如何分开修改呢?看demo大概是使用这个函数
如果是这样,WAAVSEGearboxCommandModel 这个对象的参数应该如何传递呢?
感激不尽~
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x600000c9c1b0 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}}
错误信息,视频格式MP4,并且视屏经过微信后就能裁剪 ,希望可以讨论下
只支持静态水印吗?怎么添加动态水印?
报错:
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x280f43870 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}}
触发条件:
ffmpeg剪切后的视频片头+录屏视频-->失败(报错如上)
正常的视频片头+录屏视频-->成功
视频附件:
videos.zip
比如比特率
1、videoQuality 设为0.1
2、ratio 为 High
压缩后视频大小不变呀
之前网上找了很多关于AVFoundation拼接多视频的代码没有一个可用, 后来发现作者的这个项目真心牛逼, 后来研究了一下代码发现每次合成必定需要导出生成,然而我现在项目没有必要实时导出生成文件,所以我改了一下代码,预览时仅仅只输出mutableVideoComposition以及mutableAudioMix, 因为项目涉及到混音,只输出mutableVideoComposition 混音音量大小无法调整, 后来又发现多分辨率视频生成的时候会因为第一个视频的分辨率和后续视频分辨率不同导致出现黑边,目前正在研究如何去掉黑边或者生成毛玻璃效果的,初学视频这块不懂很多,感谢作者的分享!
Error Domain=AVFoundationErrorDomain Code=-11821 "无法解码" UserInfo={NSLocalizedFailureReason=媒体数据无法被解码,可能已损坏。, NSLocalizedDescription=无法解码, NSUnderlyingError=0x283f9f420 {Error Domain=NSOSStatusErrorDomain Code=-16977 "(null)"}} @CoderHenry66 大佬,给你发邮件了,视频在附件里
首先感谢您的开源精神,考虑到实际使用场景能不能加个进度呢?
视频多次旋转之后,视频会变得很绿
抱歉,如果已经支持的话,请告知如何操作,谢谢!
Error Domain=AVFoundationErrorDomain Code=-11800 "这项操作无法完成" UserInfo={NSLocalizedFailureReason=发生未知错误(560100710), NSLocalizedDescription=这项操作无法完成, NSUnderlyingError=0x281ae41e0 {Error Domain=NSOSStatusErrorDomain Code=560100710 "(null)" UserInfo={AVErrorFourCharCode='!buf'}}}
奇怪的是有的视频可以,有的却不行
微信视频自身旋转90度,经过压缩之后,只有声音,没图像。
指定ratio为WAVideoExportRatio960x540,改变videoQuality的大小,输出的视频还是一样的,没有清晰度和体积变化
多个不同分辨率的视频合成, 第一个视频是横屏, 第二个为竖屏,第三个横屏,第四个竖屏, 合成后第二段的视频尺寸不对
_playerController.showsPlaybackControls = YES;
iOS 16.4的系统版本
视频合成会有黑帧现象
点击 合并+水印+旋转+... 按钮 崩溃 (我自己添加的视频 ) 视频链接http://pic.iyoufou.com/2CDF41EB-D762-4B52-B744-99159A16AD84/L0/001201910211032557202.mp4
2019-10-21 10:27:34.733467+0800 WAVideoBox[2578:206414] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This method does not support multi-video processing for the time being.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23baa1ee __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50864b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23ba9f68 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff25614de9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 WAVideoBox 0x000000010f362de4 -[WAAVSERotateCommand performWithAsset:degress:] + 660
5 WAVideoBox 0x000000010f3699c6 __35-[WAVideoBox rotateVideoByDegress:]_block_invoke + 518
6 libdispatch.dylib 0x000000010f6a3df8 _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x000000010f6a4d6c _dispatch_client_callout + 8
8 libdispatch.dylib 0x000000010f6ab613 _dispatch_lane_serial_drain + 788
9 libdispatch.dylib 0x000000010f6ac1a3 _dispatch_lane_invoke + 422
10 libdispatch.dylib 0x000000010f6b7a64 _dispatch_workloop_worker_thread + 719
11 libsystem_pthread.dylib 0x00007fff518cd611 _pthread_wqthread + 421
12 libsystem_pthread.dylib 0x00007fff518cd3fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
libsystem_kernel.dylib`__pthread_kill:
0x7fff518292bc <+0>: movl $0x2000148, %eax ; imm = 0x2000148
0x7fff518292c1 <+5>: movq %rcx, %r10
0x7fff518292c4 <+8>: syscall
-> 0x7fff518292c6 <+10>: jae 0x7fff518292d0 ; <+20>
0x7fff518292c8 <+12>: movq %rax, %rdi
0x7fff518292cb <+15>: jmp 0x7fff51823457 ; cerror_nocancel
0x7fff518292d0 <+20>: retq
项目中想要自定义码率,但是看了自定义码率只能使用AVAssetReader和AVAssetWriter,但这个视频导出又是队列方式,没有找到处理视频的进度progress
您好,我想拼接同一个视频,做到首位相接的效果,但是现在拼接的时候,后半段是黑色的。
我看到现在2个视频合并是在一条视频轨道上的,苹果官方的demo用的是2个视频轨道来合并去实现添加转场效果,我尝试用2个视频轨道后发现如果视频尺寸不一致时,转场那部分进行缩放操作会和用于转场效果的transform操作有冲突。大神知道有什么办法解决吗?
图片合成视频 不失真 播放合成视频时 由小变大
如何设置码率
error NSError * domain: @"AVFoundationErrorDomain" - code: 18446744073709539811 0x0000000282d2d4a0
self.videoBox.clean()
self.videoBox.appendVideo(byPath: self.videoPath)
self.videoBox.ratio = .ratioMediumQuality
self.videoBox.asyncFinishEdit(byFilePath: self.ouputVideoPath(), progress: { (progress) in
DispatchQueue.main.async {
Toast.showProgress(progress)
}
}) { (error) in
DispatchQueue.main.async {
if error == nil {
Toast.showMessage("压缩成功")
}else {
Toast.showMessage("压缩失败")
}
}
}
打印出来的两个路径
Printing description of self.videoPath:
"/var/mobile/Containers/Data/Application/16A0A00D-A4F6-4658-844A-0D83F85D4CE5/Documents/TXUGC/TXUGCRecord.mp4"
Printing description of self.videoOutputPath:
"/private/var/mobile/Containers/Data/Application/16A0A00D-A4F6-4658-844A-0D83F85D4CE5/tmp/tempVideo.mp4"
这是控制台报出来的相关错误
error:Optional("The operation couldn’t be completed. (AVFoundationErrorDomain error -11805.)")
CUICatalog: Invalid asset name supplied: ''
使用手机录制,压缩后黑屏
获取 iTunes 中的音频文件,拿到音频路径进行裁剪,会报error=Error Domain=AVFoundationErrorDomain Code=-11805错误,咋解决呢?
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.