krazykira / videffects Goto Github PK
View Code? Open in Web Editor NEWThis library uses OpenGL Shaders to apply effects on Videos at Runtime
License: Apache License 2.0
This library uses OpenGL Shaders to apply effects on Videos at Runtime
License: Apache License 2.0
After Applying shader on video and Processing video by FFmpeg with your sample code which in Wiki page .
Issue : FFmpeg Recording Issue video is faster after video processing with channelmixer .
Hi,
First of all, thank you for this library. Is such a helpful one.
I started playing around with it and I get the following exception when returning to the app. Do you any idea why this is happening? Thank you!
FATAL EXCEPTION: GLThread 19220
Process: com.famous.app, PID: 9602
Theme: themes:{default=overlay:com.cyngn.hexo, iconPack:com.cyngn.hexo, fontPkg:com.cyngn.hexo, com.android.systemui=overlay:com.cyngn.hexo, com.android.systemui.navbar=overlay:com.cyngn.hexo}
java.lang.IllegalStateException
at android.media.MediaPlayer._setVideoSurface(Native Method)
at android.media.MediaPlayer.setSurface(MediaPlayer.java:753)
at com.sherazkhilji.videffect.view.VideoSurfaceView$VideoRender.onSurfaceCreated(VideoSurfaceView.java:257)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1503)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
So this repo applies effect to a media player playing a video. In my app, I have access to frames of the video. Is there a way to use your library to apply filters to a frame (media.Image type) not the whole video?
how to make the effects to the videos permanently??
Hello Developer!
I appreciate your all Hard Work!!
I am trying to save the video. I have written the Code from WIKI.
I am getting below errors -
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: mappractise.tv.com.demovideofilter, PID: 21407 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at org.bytedeco.javacpp.Loader.load(Loader.java:413) at org.bytedeco.javacpp.Loader.load(Loader.java:381) at org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2597) at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:386) at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:380) at mappractise.tv.com.demovideofilter.VideoProcessing.doInBackground(VideoProcessing.java:49) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
Hi,
As you mentioned in ReadMe that In the future, you are aiming to apply permanent effect to videos. So, i wanted to ask about the approach you would be following to implement this behaviour.
Hi,I find the VideoSurfaceView when playing video ,the content will fill of the view,
But VideoView can base on video' height and width to scale the content ,no daaw out of the content.
My english not well,do you clear?
Hello
can you help me applying progress bar while loading video from the server ?
regards
is there any method to integrate media controller in video surface view ?
Hi, how can apply VidEffects to a wallpaper ? I´m asking because in your notes, is need a activity or fragment . It´s possible to add and use the library to a Wallpaper ?
Thank you
please solve video aspect ratio issue
How to save this video after deal
Attempt to invoke interface method 'java.lang.String es.veera.video2gif.filter.ShaderInterface.getShader(android.opengl.GLSurfaceView)' on a null object reference
how to apply effects because i found only 3 filters in this code. all others are effect tell me how to apply and save video with these effect?
Interesting repo. Would it be possible to apply more complex shaders, like denoising? Here are some example glsl shaders:
https://github.com/bloc97/Anime4K/tree/master/glsl/Denoise
HI
I have issue i am capturing video from camera and want to apply filters on it
But here i found filters only on assets in android studio
Kindly suggest me code for this
I do not want to apply filters on assets
Hello,
As you mention here for permanent video effecting and saving video in sdcard.
https://github.com/krazykira/VidEffects/wiki/Permanent-video-effects
When i am applying diffrent effects how you change that channelmixer
for diffrent effects ?
As you mention in demo colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
i want different Frame filters for diffrent effects which you mention in your library
BrightnessEffect, ContrastEffect, AutoFixEffect, BlackAndWhiteEffect, CrossProcessEffect
private void initVideoRecorder(String path) { try { filter = new F FmpegFrameFilter("colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131", VIDEO_GRABBER.getImageWidth(), VIDEO_GRABBER.getImageHeight()); videoRecorder = FFmpegFrameRecorder.createDefault(path, VIDEO_GRABBER.getImageWidth(), VIDEO_GRABBER.getImageHeight()); videoRecorder.start(); } catch (FrameRecorder.Exception e) { e.printStackTrace(); } }
on a device running android 9 the VideoSurfaceView doesnt show the video it only shows black.
I cannot spot and useful error logs
Color Channel Mixer (Info.)
https://ffmpeg.org/ffmpeg-filters.html#colorchannelmixer
I am trying to creating video filters using FFMpeg and OpenCV just like Instagram Video filters.
So if I want to create Sepia Effect Then I have to use color channel mixer for that with RGBA values
ex. colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 (This code for Sepia Effect)
Now I want to create more effects like Instagram. So need different color channel mixers for that
How to create them?
Ref. -- https://github.com/krazykira/VidEffects/wiki/Permanent-video-effects
I got only 2 filters
Sepia
colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
Grayscale
colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
I need more filters.
private void initVideoRecorder(String path) {
try {
filter = new F FmpegFrameFilter("colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131", VIDEO_GRABBER.getImageWidth(), VIDEO_GRABBER.getImageHeight());
videoRecorder = FFmpegFrameRecorder.createDefault(path, VIDEO_GRABBER.getImageWidth(), VIDEO_GRABBER.getImageHeight()); videoRecorder.start();
}
catch (FrameRecorder.Exception e) {
e.printStackTrace();
}
}
Hi, i can't see any function about save effected video. Is there any way to do this? thanks
Can any one help me to integrate my app with GCM to support push notification ?
Hey Developer !
Great Work Done!!
I have successfully implemented the video effects, now i just need to save the video after applied effects on it.
Please let me know or suggest me what i need to do.
Looking forward to hear from you.
Thanks 👍
Kind regards
Shoeb Siddique
Thanks for making such an awesome library.
Can anybody explain how can i select video from gallery to add effect on it?
How can i save video on sdcard after effect given on video.
java.lang.RuntimeException: glDrawArrays: glError 1282
at com.sherazkhilji.videffects.view.VideoSurfaceView$VideoRender.checkGlError(VideoSurfaceView.java:355)
at com.sherazkhilji.videffects.view.VideoSurfaceView$VideoRender.onDrawFrame(VideoSurfaceView.java:199)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1562)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4); checkGlError("glDrawArrays");
I have integrated this sdk. I am getting above error while playing video after applying filter. Device Samsung galaxy edge S6+
Hey brother, i want to add a blur filter to the video, but i am trying hard and cannot get the breakthrough, can you help me over that.
It just show the effect, how can i save it with the video?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.