Skip to content

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

@iharshb

Description

@iharshb

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(); 
}
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions