当前位置:网站首页>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];边栏推荐
- QT -- the qtabwidget supports dragging tabbar items
- Istio practical skills: implement header based authorization
- [5 minutes to play lighthouse] create an immersive markdown writing environment
- The world's largest meat processor has been "blackmailed", how many industries will blackmail virus poison?
- About me, a 19 line programmer
- Example of SMS interface verification code function implemented by ThinkPHP framework
- A "full cloud" journey of a quasi financial system
- Clickhouse uses distributed join of pose series
- Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!
- I'm in Shenzhen. Where can I open an account? Is it safe to open an account online now?
猜你喜欢

Group planning - General Review

WPF从零到1教程详解,适合新手上路

巴比特 | 元宇宙每日必读:618成绩已然揭晓,在这份还算满意的答卷背后,数字藏品做出了多少贡献?...

Opencv learning notes -- Separation of color channels and multi-channel mixing

MySQL 外键影响

Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!

QT -- the qtabwidget supports dragging tabbar items

《回归故里》阅读笔记
Deep parsing and implementation of redis pub/sub publish subscribe mode message queue

How can a shell script (.Sh file) not automatically close or flash back after execution?
随机推荐
The latest hot spot: the use of copper death related genes for tumor prognosis typing!
How to make Baidu quickly include its own personal website?
In depth analysis, from ordinary clock system to various time service modes
Kubernetes practical skills: use cert manager to issue free certificates for DNSPod domain names
Tencent Youtu, together with Tencent security Tianyu and wechat, jointly launched an infringement protection scheme
mRNA疫苗的研制怎么做?27+ 胰腺癌抗原和免疫亚型的解析来告诉你答案!
炒伦敦金短线稳定赚钱技巧?在哪里炒伦敦金安全靠谱?
RTMP streaming platform easydss video on demand interface search bar development label fuzzy query process introduction
Ingenious conception - iron death regulatory factor classification and prognosis 6+
The opportunity to teach cloud development a lesson has finally come!
Group planning - General Review
数据标注科普:十种常见的图像标注方法
生成 4维 的 气压温度的 nc文件,之后进行代码读取(提供代码)
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
Istio FAQ: istio init crash
11+! 结肠癌中基于 m6A 调节因子的甲基化修饰模式以不同的肿瘤微环境免疫谱为特征
[redisson] analysis of semaphore lock source code
基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
Fbnet/fbnetv2/fbnetv3: Facebook's lightweight network exploration in NAS | lightweight network
Pipeline shared library