Hi, I’ve been having huge problems with my final year project at uni.
I need to find some software which can display multiple movies at a time with alpha channels and jump around small loops within those moves randomly.
The issues I’m dealing with are CPU usage and alpha’s, I’ve learnt processing and now unfortunately learnt its limitations. I’ve also looked at VVVV.
It seems hard to find a program which easily/nicely deals with alpha channels.
I was wondering if there’s a simple way to apply them in openframeworks. I played around with some code a member made up which recognized the alpha and displayed it. What would be really useful is if all the masking was done somewhat under the hood. For example when you imported a clip something went. if RGBA then use Alpha as a mask to the RGBA, Ha if only it was that simple.
Some advice would be great. I’m not the best at coding but I know that I could make up my project in processing no problems besides the CPU and alpha issues. Therefore I think I could probably code it in Openframeworks besides the obvious alpha issue I’m facing.
Also wondering what its like at handling multiple movies?
By the way I’m loving the idea of Openframeworks, Very eager to up-skill and get better at it.
yeah openFrameworks is awesome. the ease of use, ready made, instant gratification of Processing, with the power, speed, and tinkerability of C++.
i’m not so certain about your alpha problems, but i can help with the performance questions.
when streaming multiple video files, usually before your CPU runs out of cycles you start running into problems with seek time (the amount of time to move the harddisk head backwards and forwards across the drive to load from each of your indivudal movies, which are at different physical locations on the disk).
one way around this is to load the movies as arrays of ofImages or ofTextures. if the movies are 720x576 then each frame will take up 720x576x4=1,658,880 bytes of RAM, or about 1.58MB. you should be able to fit several hundred frames in memory before you start having problems.
if this isn’t enough, you might want to try playing with a RAM disk. see http://snippets.dzone.com/posts/show/1808 for OSX or http://www.speedguide.net/read-articles.php?id=131 for windows. create a RAM disk large enough to hold all your movies, copy the movies onto the RAM disk, then load them from there.
hth, good luck
quickly - these threads have a discussion about using textures / alpha for playing movies quickly - and both have code examples in there which may be helpful:
damian - the ram disk thing is sweet - I’ve never seen that approach before.
Only adding to the noise here, but a RAM disk, that’s an excellent idea
Just a random thought- for your transparency, perhaps having the video in some kind of PNG format would be good? http://en.wikipedia.org/wiki/Animated-PNG
I read something about it here: http://createdigitalmotion.com/2007/04/-…-eo-format/
Alternatively, if you’re handling the transparency separately, I always found that Motion JPEG was the best codec for this sort of stuff
Wow thanks guys I cant believe how helpful you’ve been. I just posted on the off chance that someone would reply. But I’ve been overwhemed with great replys. Thankyou.
Ram disk is such a great Idea! I will be testing that very soon. Also the animated APNG format. Definatly going to try that one as well. I’ve been rendering and .movs with just the basic PNG codec. Will be interesting to compare the two formats.
I’ll be sure to post whatever the best solution ends up being to help other newbe’s
i used transparent png image sequences for my latest project digital puppetry.
you can check out the source here:
all the best
Thanks Tine!, your source code worked a treat! Had a bit of a look at digital puppetry project. looked great. Was it tracking animation loops to a live video feed attaching them to people?
Now I can load in PNG sequences and loop them no problem. Just wondering what hardware is being used to render these images. The Graphics card I’m thinking? So the more memory on the card the more images it can hold??
I can load in around 150 PNG’s at 1280 * 768 and I have a 512MB card. I tried that just for test.
Do you work out how much memory will be used by multiplying width by height by channels (4 - rgb+ A) then by how many frames?
The ram drive would of only worked If I was playing mov’s using Qtime right? Great thing to know even for video editing.
sorry, for delayed reply,
did not receive a notification about your post.
yes, digital-puppetry was attaching animation loops to people.
but what was tracked, were pink post-it notes, that people could stick wherever they wanted. and with these post-its they could catch the animated sequences.
sorry, i cannot help at all with these graphic card or image processing questions. i have no clue about that
i used at least 120 animated sequences for my project, which had in most cases 5-40 images each sequence.
worked without any special graphics card…
all the best best!
yea looked like a sweet project. I liked how the visuals looked overlayed on the footage.
And it sounds like my graphics card shouldn’t be a problem since I’m not going to get near 120 sequences.