Showing posts with label video loop. Show all posts
Showing posts with label video loop. Show all posts

Monday, 30 May 2011

[News] Gigs, Recordings, Java

The next Miller Test gig will be at 229 - a club on Great Portland Street - 229 - we'll be on at 8.30pm and we'll be "showcasing" our new backing singers and some songs you haven't heard before. Emma and Ida are great singers and we've been working on harmonies for them, in fact we're doing more this afternoon in  the luxurious environs of The Premises.

I've submitted a track for the forthcoming Classwar Karaoke compilation - a kind of weird, glassy, algorithmic, downtempo electronic thing. So, all three Vultures will be on it as solo artists (Astrometria - ie me, Will Connor and murmurists - Anthony). As I mentioned before there will be some famous names on this one including Fred Frith.

Seth and I have done some more work on the video looping project, well actually, to be fair Seth has digitised a load of old video material ready for looping. I am still trying to work out exactly how to display it and use OpenCV to control the program or patch I write for it. I'm going to forge ahead using Pd/GEM but I also had a look at using Java. I programmed Java professionally for a few years and one of the things I used was QuickTime for Java. Having not used it for a while I was a little saddened to see that it has been deprecated. In fact Apple did that in 2009 - shows it has been a while since I looked at that API!

I had a look at Java Media Framework but I just don't think it will cut the mustard for what I am trying to do which is a shame. I have seen a similar application to the one I am trying to write built with Max/MSP/Jitter - but I can't afford Max so that's a no go. I just need to work out how to display and manipulate several videos with audio in Pd/GEM I think. I could try Processing but the overhead is immense compared to Pd so that choice is a no brainer.

Some people I have mentioned this to have asked why I don't program this thing in Flash - the simple answer is twofold: I can't afford the development tools and more importantly Flash is the only thing that makes my computer so hot that the fans in it are running so quickly it sounds like it might take off... remember the sound of the nine (?) fans in the old G5 Mac Pro things when you booted into single user mode? Very similar... 

Thursday, 20 January 2011

[Pd] Video Looping



I recently met a friend of a friend who had some ideas for a project using looped videos. He'd been trying to find a way of doing it with hardware and despite asking around all over London he couldn't find anyone who knew a way of doing it. I reckoned it could be done somehow using software although I'd never worked with video clips before (I tend to work the other way around - using data from my webcam to control patches using OpenCV).

I downloaded a couple of clips from archive.org and cranked up Pd. [pix_film] could play the clip and I could scrub through it easily just using a [number] and I could use a [metro] and [mod] to play back any number of frames at any point in the clip at any speed. Great, but no sound. One of the major goals is to take four clips that can be played at variable rates which will create "music" - the main criterium for choosing a clip is that the sound should be interesting and loop well.

After a bit of research it seemed that the audio from the clip I was using had to be extracted from the .mov file and then synchronised to the video in the Pd patch. I came up with the patch at the top of this post in the end. There are some redundant parts of the patch not relevant to the goal but it works. The clip can be slowed down and speeded up, the section of the clip that we want to loop can be chosen by selecting start and stop points (currently these relate to audio frames). This is fed into a [snapshot~] which has to be banged repeatedly - a bit of bad maths later and the video will loop. As the loops are going to be very short (around a second or two) they stay in sync even though the maths is out by 0.5 of a frame per second (in this case).

One problem is that the clip will not play backwards without stuttering, which is a bit of a pain as it would be great to be able to play the clips in reverse at any speed as well as doing the same thing forwards. Further experimentation is needed.

Another problem is that I would really like to be able to play four clips in the same [gemwin]. If that wasn't enough there needs to be a library of different clips that can be changed on the fly; not only that, the patch needs to be interactive in a way that makes sense to an audience unfamiliar with Pd - at the moment it's looking like I will use OpenCV to achieve this but I am not entirely sure how...