MysteryX
10th October 2015, 01:44
Is it possible to pass metadata from one filter to the next?
Here's what I want to do. Instead of this... (which if you tried SuperRes/Shader, you'll see it is very expensive on memory)
input = input.Shader("YuvToRgb.cso")
diff1 = input.Shader("DiffA.cso")
diff2 = input.Shader("DiffB.cso")
diff3 = input.Shader("DiffC.cso")
input = diff1.Shader("Merge.cso", clip2=diff2, clip3=diff3)
input = input.Shader("RgbToYuv.cso")
I want to do this
input = input.Shader("YuvToRgb.cso")
diff1 = input.Shader("DiffA.cso", output=2)
diff2 = input.Shader("DiffB.cso", output=3)
diff3 = input.Shader("DiffC.cso", output=4)
input = input.Shader("Merge.cso", clip1=2, clip2=3, clip3=4)
input = input.Shader("RgbToYuv.cso")
input = input.ShaderExecute()
Basically, if the Shader commands could simply add metadata to the clip, then ShaderExecute could execute all the commands in the chain at once, saving tremendous memory and threads.
Is it possible?
Well... yes it is possible, worse case scenario I could store the metadata as a struct within the input video's memory but that would be VERY ugly programming. Is there a better way to pass metadata from one filter to the next?
Here's what I want to do. Instead of this... (which if you tried SuperRes/Shader, you'll see it is very expensive on memory)
input = input.Shader("YuvToRgb.cso")
diff1 = input.Shader("DiffA.cso")
diff2 = input.Shader("DiffB.cso")
diff3 = input.Shader("DiffC.cso")
input = diff1.Shader("Merge.cso", clip2=diff2, clip3=diff3)
input = input.Shader("RgbToYuv.cso")
I want to do this
input = input.Shader("YuvToRgb.cso")
diff1 = input.Shader("DiffA.cso", output=2)
diff2 = input.Shader("DiffB.cso", output=3)
diff3 = input.Shader("DiffC.cso", output=4)
input = input.Shader("Merge.cso", clip1=2, clip2=3, clip3=4)
input = input.Shader("RgbToYuv.cso")
input = input.ShaderExecute()
Basically, if the Shader commands could simply add metadata to the clip, then ShaderExecute could execute all the commands in the chain at once, saving tremendous memory and threads.
Is it possible?
Well... yes it is possible, worse case scenario I could store the metadata as a struct within the input video's memory but that would be VERY ugly programming. Is there a better way to pass metadata from one filter to the next?