百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
V

VidEffects

> 编程语言
开源

此库使用 OpenGL 着色器在运行时对视频应用效果

358 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

此库使用 OpenGL 着色器在运行时对视频应用效果

VidEffects

This is an Android library which can be used to apply different Filters/Effects on videos. It uses vertexShaders and fragmentShaders to apply effects on GLSurfaceView. It uses MediaPlayer instance for playing videos on GlSurfaceView. See the sample app in order to see a working demo.

Change Log

1.1.0 - Added ability to save video once you apply a FILTER (not EFFECT), Updated Sample app with a detailed example, (Available on Jcenter)
1.1.1 - Updated Dependencies & Published the videffects to MavenCentral. All future versions from now onwards will be distributed via MavenCentral.

Supported Effects

The following list of effects are currently avaialble and can be applied using VidEffects

  • AutoFix Effect
  • Black and White Effect
  • Brightness Effect
  • Contrast Effect
  • CrossProcess Effect
  • Documentary Effect
  • Duotone Effect
  • FillLight Effect
  • Grain Effect
  • Greyscale Effect
  • Lamoish Effect
  • InvertColors Effect
  • Posterize Effect
  • Saturation Effect
  • Sepia Effect
  • Sharpness Effect
  • Temperature Effect
  • Tint Effect
  • Vignette Effect
  • Hue Effect
  • Gamma Effect

Limitations

  • The effects applied using this library are temporary. What that means is that the original video doesn't change. Effects are only applied during video playback and once the video ends the effects end with it.
  • Minimum Supported Android version is 21 (Lollipop)
  • Saving video available only for Filters and requires Android 23 min api version.For more information check the file VideoController.
  • Other ways to save video once effect/filter is applied FFmpeg to apply effects on videos. Details about how to do that can be seen on this wiki page
  • Some emulators have problems during video playback so try on real device when that happens e.g: Android Lollipop emulators don't show video.

How to use it

  • Add the following code to your project's build.gradle file
bash
  repositories {
        mavenCentral()
    }
  • Add the following gradle path to your app/build.gradle file
bash
dependencies {
//	Gradle path for VidEffects
   	implementation "com.github.krazykira:videffects:1.1.1"
}
  • Then you need to add VideoSurfaceView either using java code or as xml in your layout file.
bash
  • Then you need to reference the VideoSurfaceView and call its init() method in your Activity or Fragment onCreate() supplying it with a MediaPlayer instance and a Video Effect. Also you would need to call VideoSurfaceView onResume() in your Activity or Fragment onResume() so that your video is rendered properly.
…
  • Incase of any confusion, check the file SamplePlayerActivity for a complete example on how to apply different Effects on your videos.
  • For Advance implementation and saving Filters, check the file VideoActivity

See it in working

Video screenshot without any Effect

Video screenshot with Black and White Effect

Video screenshot with Invert Colors Effect

Special Thanks to

  • Sisik blog posts about converting video and audio files with MediaCodec and Muxer.

    https://sisik.eu/blog/android/media/video-to-grayscale

    https://sisik.eu/blog/android/media/mix-audio-into-video

  • This blog post by Ashraff Hathibelagal for easing the process of learning Opengl and explaining how to apply effects on images.

  • GrepCode For providing me with Android source code which were helpful in writing video effects/filters.

  • MediaPlayerSurface by crossle It helped me in playing video using a GlsurfaceView.

  • Fadden who is the writer of grafika for pointing me towards right direction on how to apply effects on a video.

  • Intel INDE Media for Mobile Tutorials for the sample app and helping me getting familiar with how fragmentShaders work.

  • Umair Shafique for authoring How to apply permanent effect using FFmpeg wiki page

Development

Want to contribute or add some new Effects? Great! Fork it and send me a pull request or contact me on the email below, if you want to become a permanant contributor.

Developed by

  • Sheraz Ahmed Khilji -

License

Copyright 2022 Sheraz Ahmed Khilji

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言