Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create Color channel mixers for different filters ? #27

Open
iharshb opened this issue Apr 16, 2018 · 0 comments
Open

How to create Color channel mixers for different filters ? #27

iharshb opened this issue Apr 16, 2018 · 0 comments

Comments

@iharshb
Copy link

iharshb commented Apr 16, 2018

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

  1. Sepia
    colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131

  2. 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(); 
}
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant