Forums > Jitter

Youtube mixer

October 14, 2009 | 11:16 pm

I’m looking to make a video mixer that can crossfade between two youtube videos. Do you know of a way to do this in Jitter? I’ve got as far as trying to take the linked swf file and putting it into jweb but it does not seem to play.

Can anyone point me in the right direction?


October 25, 2009 | 7:13 pm

I expect this might be more easily done in Flash.

October 31, 2009 | 1:02 pm

I’m sure youtube won’t like this, but since it’s caturday:

— Pasted Max Patch, click to expand. —
October 31, 2009 | 6:07 pm

Woh! Xellent!

Would you comment a little bit what are you doing with these regular expression?

I tryed to set a different youtube link, but I get only the tags.

— Pasted Max Patch, click to expand. —
November 1, 2009 | 1:45 pm

It very much depends on the network, since will try to asyncread directly from the url.
Banging ‘p make_download_url’ might reload the video.

I just tried your link, it works here(love the part with just two hands in the frame btw).


November 2, 2009 | 2:49 pm

Tried running the first patch and got the error – error -2048 reading URL

Subsequent mucking around returned error 503. Hmmm. Is the patch still working for others?

November 5, 2009 | 6:57 pm

The same with me.
I tried nesa’s code and I got the same error:
error -2048 reading url

November 6, 2009 | 3:42 pm


this is a hack, there’s no guarantee that it’s gonna work on your system.

error 2048 might mean that you’re missing codec that can play flash videos, try installing perian.

error 503 is general ‘service unavailable’ error, this probably happens if you try to load the video too often and youtube suspects your doing something you shouldn’t (i.e. this).

good luck!

November 6, 2009 | 4:02 pm

Hey perfect!
Once I installed perian everything works smoothly
thnx a lot!

December 3, 2009 | 8:58 pm

Nesa, that is brilliant. There is some complex things going on there. Could you explain how you went about building it?

I now want use this patch in a project in college were I’m building an on line editing system using mobile phones for input. I want to use a live video sharing website called Qik ( to upload content then stream it into max. The developers of the Qik have given me permission to use their API if it helps me in my project.

I am wondering Nesa were do I change your code to work with Qik videos?

December 3, 2009 | 9:22 pm

unfortunately perian workaround doesn’t work for PC ;(. Anybody got a pc solution?

December 15, 2009 | 10:47 am

this is great! Is it possible to recieve the sound as well?

December 15, 2009 | 10:06 pm

awesome hack! looks like the audio plays as well (provided you can get the flv’s to play in quicktime with something like perian). in the qtm patcher you can change the volume level of the object.

i’ve got two instances running smooth. a crossfader and render window wouldn’t be hard to add from there!

December 15, 2009 | 10:09 pm

oh but you may need spigot~ to get audio to crossfade in msp. common question for quicktime mov’s. not sure spigot is completely solid in max 5 yet tho i’ve read threads saying they’re revising it for jitter 2. it works okay for me sometimes. i’m gonna try and build this up when i’m not at work i’ll holler with what comes up!

December 16, 2009 | 9:53 pm
December 16, 2009 | 10:18 pm

To get the volume to work just change the @vol attrib in jit.qt.move from 0 to 1.

February 2, 2010 | 2:46 am

to those who can’t play flv due to quicktime bollocks on windows:

change the [combine] arguments in make_download_url patcher to:

combine vid &t= t &fmt=18 @triggers 3

added &fmt=18 gets the url of an mp4 not flv if possible ;>

hope this helps…

edit: video plays only for few seconds, don’t know why is that?

April 13, 2010 | 5:26 pm

Here’s a desktop application that does just that! Check it out…

April 14, 2010 | 4:44 am

MOJO, your project sounds really interesting, I’m a New Media student at the University of Maine, USA and I am intrigued by your project. What do you mean by online editing system? my sense is that anyone will be able to edit uploaded content virally? Love to hear more.

January 6, 2011 | 1:38 am

i’m getting a 404 error when it is looking for the youtube url…I assume this is because youtube has once again changed the format of their urls in order to prevent users from download .flv files. has anyone had any luck with this patch recently? or any updates to correctly parse the new youtube url format? i saw a library for Processing that does this sort of thing

January 6, 2011 | 1:40 am

i’ve also looked into jweb a lot but there’s currently no way to get jweb to output to jitter matrices…

July 28, 2011 | 9:49 pm

Any news about nesa patch?
Regular expression is really a hard way to go …
Anyone in this forum to share something that would work with youtube new format?

July 30, 2011 | 5:42 pm

Same issue: crash with
Any chance to have a look at your java patch?

August 1, 2011 | 11:37 pm

sure. basically the crucial bit is here, where it extracts the links from the page source:
private HashMap getVideoLink() throws Exception{
String pageSource = getPageSource("" + videoID);
// System.out.println(videoID);

Matcher matcher = Pattern.compile(""t":\s*"([^"]*)"").matcher(pageSource);
String videoTicket =;
videoTicket = videoTicket.replace(""t": "", "").replace(""", "");
// System.out.println(videoTicket);

matcher = Pattern.compile(""fmt_url_map":\s*"([^"]*)"").matcher(pageSource);
String videoFormats =;
videoFormats = videoFormats.replace(""fmt_url_map": "", "").replace(""", "");

// parse fmt_url_map
HashMap videoURLs = new HashMap();
String sep1 = "%2C", sep2 = "%7C";
if (videoFormats.indexOf(",") > -1) { // new UI
sep1 = ",";
sep2 = "\|";
String[] videoFormatsGroup = videoFormats.split(sep1);

for (int i = 0; i < videoFormatsGroup.length; i++) {
String[] videoFormatsElem = videoFormatsGroup[i].split(sep2);
videoURLs.put(Integer.parseInt(videoFormatsElem[0]), URLDecoder.decode(videoFormatsElem[1]).replace("\", "").replace("u0026", "&") + "&title=video");

return videoURLs;

Viewing 25 posts - 1 through 25 (of 25 total)

Forums > Jitter