如何在Android中应用视频过滤? [英] How to apply video filtering in android?

查看:142
本文介绍了如何在Android中应用视频过滤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理像instagram这样的应用程序,我必须在已创建的视频上应用过滤器并将其存储在SDCard中。我搜索了很多,但在最后一天,我找到一个名为FFMPEG的图书馆,但没有得到任何帮助。我是新手在视频过滤。我已经设置了NDK,但不知道如何使用这个库。有什么其他方式在视频上应用过滤器并创建一个新的视频吗?



解决方案

如果您在使用Android配置FFmpeg时出现问题 FFmpeg wiki 这个受欢迎的问题有很好的解释。除了为视频应用颜色效果,您需要知道需要更改的视频的属性。



这里你可以找到一些可以使用属性值的过滤器。您可以使用FFmpeg这些值。将这些css值转换为FFmpeg上下文时,可以使用综合文档由W3为css。此外,您可以玩,并用FFmpeg创建漂亮的过滤器。我遇到同样的问题,这里我已经解释了一些解决方案的。将这种更改应用于视频需要重新编码,因此与对图像应用相同的效果相比,此过程将花费相当长的时间。因此,您可以使用几种不同的过滤器来处理颜色级别及其相关属性(如亮度,饱和度等)。您可以在

=https://ffmpeg.org/ffmpeg-filters.html#Video-Filters =nofollow noreferrer> FFmpeg doc
。在大多数情况下,始终尝试跟踪文档,以解决问题。



希望这有帮助!


I am working on app like instagram where i have to apply filters on already created video and stored it in SDCard. I have searched a lot but at the end of day i find one library named FFMPEG but didn't get any help. I am newbie in video filtering. and I have setup NDK but don't know how to use this library.Is there any other way of applying filters on video and create a new video?

解决方案

Well, if you have a problem with configuring FFmpeg with Android FFmpeg wiki and this popular question has a good explanation on it. Apart from that to apply colour effects to a video you need to know the properties of a video that need to be changed.

Here you can find some of the filters that can be used with there property values. You can use those values with FFmpeg. When converting those css values to FFmpeg context you can use a comprehensive documentation provided by W3 for css. Further you can play around and create fancy filters with FFmpeg. I faced the same kind of issue and here I have explained the solution for some of it. Applying this kind of change to a video needs a re-encoding and therefore this process will take significant time compared to applying same effect to an image. So bare it.

FFmpeg comprise of several different filters to manipulate colour levels and its related properties like brightness, saturation, etc. You can find those different filters on FFmpeg doc. Always try to follow-up the documentation as most of the time they provide solutions for our problems.

Hope this helps!

这篇关于如何在Android中应用视频过滤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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