ffmpeg棕褐色对视频的影响 [英] ffmpeg sepia effect on video

查看:81
本文介绍了ffmpeg棕褐色对视频的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用FFmpeg应用视频的简单棕褐色效果?我正在寻找将在android中使用的单行FFmpeg命令,尽管我已经学会了 colorchannelmixer = .393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 在FFmpeg官方文档上,但无法正确应用.谢谢.

How can I apply simple sepia effect of a video using FFmpeg ? I am seeking for a single line FFmpeg command which I will be using in android.Though I have learnt colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 on official FFmpeg doc , but unable to apply it properly.Thank you.

推荐答案

您只需要适当地链接过滤器即可.但是在您的方法中,使用 eq 过滤器可能很难用FFmpeg实现棕褐色矩阵,因为它具有关联的矩阵.相反,我建议您使用 colorchannelmixer 的简单方法..>

You just need to chain the filters appropriately. But in your approach, using eq filter may be difficult to implement the sepia matrix with FFmpeg as it has an associated matrix. Instead I suggest you an easy way with colorchannelmixer.

ffmpeg -i input_video -filter_complex "
[0:v]colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131[colorchannelmixed];
[colorchannelmixed]eq=1.0:0:1.3:2.4:1.0:1.0:1.0:1.0[color_effect]" -map [color_effect] -c:v libx264 -c:a copy output_video

此处的棕褐色使用 colorchannelmixer 过滤器实现,后跟 eq 过滤器可调整视频的亮度,对比度等,同时将rgb颜色值保持为默认的 1 .

Here sepia is implemented using colorchannelmixer filter and it is followed by the eq filter to adjust the brightness, contrast, etc. of the video while keeping rgb colour values to their default 1.

希望这对您有所帮助!

这篇关于ffmpeg棕褐色对视频的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆