Replies: 11 comments
-
This is correct, but make sure you're adding to both the enum in factory.h and the switch statement in factory.cpp.
The frames are all processed as OpenGL textures, however there is a lot of abstraction around them because it's expected that Olive will support other backends (Vulkan, etc.) and/or drop OpenGL in the near future. The object will be a |
Beta Was this translation helpful? Give feedback.
-
Thank you! I have to remove the Q_OBJECT line from my header for some reason, but now my node compiles. How can I access the Texture data from inside a node? Do I use :
How can i get the OpenGL texture from that? I see a Thanks again! |
Beta Was this translation helpful? Give feedback.
-
The Q_OBJECT macro is supposed to trigger other processing from Qt/CMake, but sometimes it doesn't happen automatically. Try adding it back and then re-running CMake, cleaning the build tree, and rebuilding.
Pull from the repo again, I added |
Beta Was this translation helpful? Give feedback.
-
In the master branch, I only see upload.. Line 36 in eab3148 Is this the wrong branch to use? Thanks again |
Beta Was this translation helpful? Give feedback.
-
That's bizarre, I could have sworn I'd written and committed |
Beta Was this translation helpful? Give feedback.
-
Great thank you! That gives me the frame buffer in *data, right? What format is that in? Would you be able to give me an idea of how to call this? Thanks again for your help |
Beta Was this translation helpful? Give feedback.
-
The easiest thing would be to use Olive's "Frame" object. That will ensure a CPU buffer is allocated correctly to download data into into (in Olive terminology, a "Frame" is a CPU buffer and a "Texture" is a GPU buffer). This is the code you would use:
Then your raw image data will be accessible in How you get that into OpenCV I'm not sure, I'm not familiar with that library. If you need to, Frames can be converted to other pixel formats using |
Beta Was this translation helpful? Give feedback.
-
@itsmattkc Any chance to open up Discussions and move issues that are of this sort there for future contributors? |
Beta Was this translation helpful? Give feedback.
-
Ah I wasn't aware I had to enable that manually (on my end it shows the tab all the time, but then links to a "getting started" page when I click it). Yeah that would probably be better for things like this |
Beta Was this translation helpful? Give feedback.
-
Labels carry over too! This is excellent. Congratulations on Olive’s first Discussion thread! |
Beta Was this translation helpful? Give feedback.
-
Wooo Discussions! Thanks guys :) I am using your code snippet, and had to make one change to get it to compile, just checking that this is correct:
Additionally, when I am using a 1920x1080 video, and i print the width and height in my node:
I get 360 640. Why would this be? Is there a resize happening automatically somewhere? And one last thing, if I stick with GL, how can I retrieve a GLuint / frame buffer? I am looking at integrating a function that requires these inputs : GLuint TextureID, Thanks for your patience, and happy new year! |
Beta Was this translation helpful? Give feedback.
-
I have a bit of a edge use case, and am looking to add opencv and directx processing to frames as they are played in olive.
I would like to 'intercept' every frame as it plays, and add my own processing to it (convert to cv::Mat and process / convert to directx and send to a third party application)
I am going to assume that the best way to do this is by creating new nodes, so I have two questions:
What are the steps to create a new node? I have created the class cpp and h, and added an entry in factory.cpp, but I have hit a compile error.
How is the frame data stored in the nodes? eg, if I want to convert to cv::Mat, what am I converting from?
Thank you very much, and happy holidays!
Beta Was this translation helpful? Give feedback.
All reactions