当前位置:网站首页>Use txvideoeditor to add watermark and export video card at 99%? No successful failed callback?
Use txvideoeditor to add watermark and export video card at 99%? No successful failed callback?
2022-06-24 12:36:00 【Xiao Ming receives audio and video】
The problem background :
Use TXVideoEditer Add watermark , After that
- (void) generateVideo:(TXVideoCompressed)videoCompressed videoOutputPath:(NSString *)videoOutputPath;
Export the watermarked video , There are no successful or failed callbacks when exporting , And the progress has been 99%.
The root cause of the problem :
When exporting the video path , You need to splice video suffixes . If it is the name of the network video obtained directly , It is recommended to check whether the name has a suffix .
correct :/var/mobile/Containers/Data/Application/7C70754F-60F1-4955-B69A-7A41611775E6/Library/Caches/WaterMark.mp4
error :/var/mobile/Containers/Data/Application/7C70754F-60F1-4955-B69A-7A41611775E6/Library/Caches/WaterMark
Solution :
When exporting video, add video format suffix .
NSURL*url= [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"1621582392155992" ofType:@"mp4"]]; [_ugcEdit setVideoPath:url.path]; [_ugcEdit setVideoBitrate:2000000]; // Configure agent // Set the callback delegate object for generating events , You can get the generation progress and results // _fileName = @"1621582392155992.mp4"; // 2. Processing video , Take adding watermark as an example UIImage *image = [UIImage imageNamed:@"watermark"]; [_ugcEdit setWaterMark:image normalizationFrame:CGRectMake(0, 0, 0.3 , 0.3 * image.size.height / image.size.width)]; // Get cache Path to folder NSString *cache=[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)lastObject]; cache = [cache stringByAppendingPathComponent:@"WaterMark.mp4"]; _savePath = cache; [_ugcEdit generateVideo:VIDEO_COMPRESSED_720P videoOutputPath:cache];
边栏推荐
- Opencv learning notes - Discrete Fourier transform
- 11+ article - machine learning builds Protics framework - deeply reveals the impact of tumor infiltrating immune cells in different molecular subtypes on prognosis
- Automatic reconstruction of pod after modifying resource object
- 不用做实验的6分+基因家族纯生信思路~
- LS-DYNA beginner's experience
- A good habit that makes your programming ability soar
- 巴比特 | 元宇宙每日必读:618成绩已然揭晓,在这份还算满意的答卷背后,数字藏品做出了多少贡献?...
- QT -- the qtabwidget supports dragging tabbar items
- The idea of "6 points + gene family" without experiment~
- Five minutes to develop your own code generator
猜你喜欢
WPF从零到1教程详解,适合新手上路
微医CodeReview工具链
mLife Forum | 微生物组和数据挖掘
Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!
Opencv learning notes -- Separation of color channels and multi-channel mixing
一文讲透植物内生菌研究怎么做 | 微生物专题
文本转语音功能上线,可以体验专业播音员的服务,诚邀试用
How can a shell script (.Sh file) not automatically close or flash back after execution?
使用开源工具 k8tz 优雅设置 Kubernetes Pod 时区
【2022国赛模拟】摆(bigben)——行列式、杜教筛
随机推荐
Group planning - General Review
Conceptual analysis of DDD Domain Driven Design
How to make secruecrt more productive
The operation and maintenance boss laughed at me. Don't you know that?
The opportunity to teach cloud development a lesson has finally come!
Simple and flexible permission design?
短信服务sms
Tencent cloud and the ICT Institute launched the preparation of the "cloud native open source white paper" to deeply interpret cloud native
基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
Data stack technology sharing: open source · data stack - extend flinksql to realize the join of flow and dimension tables
Is GF Securities reliable? Is it safe to open a securities account?
Practice of dynamic load balancing based on open source tars
I'm in Shenzhen. Where can I open an account? Is it safe to open an account online now?
9+!通过深度学习从结直肠癌的组织学中预测淋巴结状态
【2022国赛模拟】摆(bigben)——行列式、杜教筛
Kubernetes practical skills: use cert manager to issue free certificates for DNSPod domain names
Kubernetes log viewer - kubetail
[redisson] analysis of semaphore lock source code
11+ article - machine learning builds Protics framework - deeply reveals the impact of tumor infiltrating immune cells in different molecular subtypes on prognosis
单基因泛癌+简单实验就能发表7分+