Processing Video With HLSL Shaders

I have written 4 very complex HLSL Pixel Shaders for MPC-HC and PotPlayer (about 2000 lines of code total)

These media players can run the shaders in realtime on video, but cannot SAVE a video thus processed.

Is VVVV suitable for this? Could I easily do:

  1. Load Video File
  2. Apply 4 HLSL Pixel Shaders To It
  3. Save Processed Video File with Audio Track

Is there any kind of good VVVV tutorial for this?

I am not talking about 3D Shaders. These are GPU pixel shaders that purely process 2D video pixels.

Or does VVVV use GLSL/Cg shaders or similar instead?

I’m very, very new to VVVV (just downloaded it) so thanks for any help!

hello and welcome!

in vvvv it is very easy to edit HLSL shaders and apply the changes during runtime. but for the scenario of opening a video file, preocess it and save it again there is no ready made solution. you can however process image sequences very easily.

so you could do a workaround like this: convert video with a video editor of your choice to an image sequence and one audio file. then process the frames and join the processed frames with the audio file back together with a video editor.

is that a workflow that would do it for you?

there is this video from vux who made the DX11 pack explaining 2d pixel processing with shaders in vvvv:

download the dx11 pack here: https://vvvv.org/contribution/directx11-nodes-alpha

look help patch for writer NRT dx11…, there is also this contrib https://vvvv.org/contribution/texture-avi-writer-(dx11) and this contrib https://vvvv.org/contribution/readback-dx11 witch defentely allows to write images faster also there is a dds plugin for after effects http://fnordware.blogspot.ru/2014/09/dds-plug-in-for-after-effects-and.html, dds write speed is best so far

You could use file stream, and use DoSeek pin and set the time position per frame, for the input, so you don’t need to work on a file sequence, but there is no non realtime file writer, so you would have to export to image sequence and recombine with the audio afterwards.
(a non real time video writer, would be wonderful, but sadly missing)

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.