0

I am working with a wpf application, and basically my goal is to be able to take a video that is being played in wpf, and somehow be able to modify its bitstream in order to make it look like it's being interfered with. I assume there are many different ways to approach this. Any suggestions? I am open to using any video player player plugin or any other plugin to accomplish this task. I am programming in c# and am using Visual Studio 2010. If you need any more info, just comment and let me know. Thank you.

1 Answers1

0

You can get a hint from Direct3D video effect. One of recommended guide is here; https://www.codeproject.com/Articles/495631/Video-Effects-in-Direct-D-Part

You may need to develop your own effect as below (code from above link)

float4 Blur_Proc(float2 _pos: TEXCOORD0) : COLOR0
{
    const int nSamples = 13;
    const float2 cSamples[nSamples] = {
         0.000000,  0.000000,
        -0.326212, -0.405805,
        -0.840144, -0.073580,
        -0.695914,  0.457137,
        -0.203345,  0.620716,
         0.962340, -0.194983,
         0.473434, -0.480026,
         0.519456,  0.767022,
         0.185461, -0.893124,
         0.507431,  0.064425,
         0.896420,  0.412458,
        -0.321940, -0.932615,
        -0.791559, -0.597705,
    };
    float4 sum = 0;
    for (int i = 0; i < nSamples - 1; i++)
    {
        sum += tex2D(_sampler, _pos + 0.025 * cSamples[i]);
    }
    return sum / nSamples;
}
Youngjae
  • 24,352
  • 18
  • 113
  • 198