Max7: AVF vs Quicktime = AVF wins, but no spigot functionality?

    Nov 14 2014 | 1:07 am
    Hello, i'm finally getting in depth with Maxmsp and was really happy to see a new method of video playback in Max7. A patch i've been working on for a few years on and off never properly stayed on tempo before, it uses midi triggered video playback with processed sound coming out of spigot. The patch was always too choppy/off sync to count on for a live performance, but now when I switch to AVF the patch plays extremely smoothly. Still not perfectly but good enough to use for a live show. Anyways I'm wondering if there is a new way or a work around to use spigot or something else to pull audio from the video and process it in real time? The spigot object doesn't work with the AVF mode, at least as far as i can tell. Any ideas?
    system: Macbook pro 2.8 ghz i7 16gb 1600mhz ddr3 ram ssd startup drive OSX 10.8.4

    • Nov 14 2014 | 3:12 pm
      export the audio track as a separate file, load with sfplay~ (or other buffer based player), and sync the playback with the sync out of sfplay.
    • Nov 14 2014 | 9:53 pm
      I never use spigot~ and instead do what Rob suggests. Here is a version using groove~ I had laying around, but you could easily patch together an sfplay~ version as well:
    • Nov 15 2014 | 4:49 am
      thanks! i'll give that a try
    • Nov 15 2014 | 9:23 am
      i tried making a frankenstein patch with what Ben posted but every video I've tried to load gives me a 'buffer~ can't open' error in the max window. tried a few different videos with different codecs, no luck
    • Nov 15 2014 | 9:38 am
      I totally missed the first part of the what the original poster said above. So without spigot~, there is no way in with jitter/maxmsp to use the audio attached to an existing video file? My idea is still workable this way, I'll just have to export audio from all my video files.
      edit: I'm having trouble figuring out where to load the audio file that corresponds to the video file in this groove~ example patch
    • Nov 15 2014 | 2:13 pm
      in ben's example patch, you don't actually need to separate the audio file from the video file. it instead uses the read notification from to get the movie file properties, and properly format an "import" message to buffer~ to import the audio from the movie file. this works great if your audio file can fit in to memory.
    • Nov 16 2014 | 12:14 am
      hm ok, makes a little bit more sense now. What's strange is that I exported several of the movies to the exact same type as '' in the media folder. Photo JPEG with uncompressed audio, and the first time I loaded one of them instead of 'blading.move' in Ben's example patch it worked great, but every subsequent time i've tried to load any of my own videos it says "buffer~ cannot load" and lists the name of my movie file. Any ideas? Maybe it has something to do with a setting on the codec I can't see in the 'get info' tab on the mac finder. I guess i'm stumped on why it would work at first but even after restarting my computer none of my own videos work anymore. So what happens now is the '' sound track stays in the buffer, but my new video will actually play (just not my audio).
      update: ok I was testing this patch out on Max 6.1 (stupid me), now testing it on Max7. Works on my video files now and plays back my audio. thanks guys! Now i just have to figure out how to incorporate this whole sync/feedback setup with my original patch which lets me skip to predetermined points in the video timeline with midi is there a guideline or faq about which video codecs work in AVF?
    • Nov 18 2014 | 2:02 am
      the recommended codecs for AVF are H264, Photo-Jpeg, Prores 422, and Prores 4444
    • Jul 10 2015 | 8:06 am
      I'm also very interested in getting this working but couldn't get the patch Ben posted above to work. I get the same error message as Awepittance:
      buffer~: can't open
      I opened Max 7 in 32 bit and it worked, but the goal of this thread is to be able to do it in 64 bit—which is what I also need! My current Max version is 7.0.3, the latest available is 7.0.4. I looked at the release notes for all 7 versions (0.1-0.4) and all four say "Import features for buffer~ are limited" under 64 bit limitations.
      However, it looks like it worked for some of you guys, which version were you using?
      Any other ideas?
      Help appreciated! Thanks!
    • Jul 10 2015 | 8:17 am
      Oh, I see that indeed it is 32 bit only: No other methods than exporting the audio file then? This would be very cumbersome for my project as I am combining preloaded video clips with live camera / audio recordings; so I'd need to have two complete different routings of signal instead of just one.
    • Jul 12 2015 | 2:23 am
      Hi Federico
      Use Quicktime 7 if you want to export an audio file. If not, the lazy quick version is to use [importreplace] message with [buffer~] , loading any codecs Rob mentioned. ProRes 422 etc. The soundfile will load no problem.
      Also , now has [position $1] , so send the right outlet from groove~ to it and voilà :-) no more quicktime time units conversion etc... yay!!
    • Jul 13 2015 | 4:34 pm
      Hi Phiol,
      Thanks for the message! This is similar to what Rob suggested in the other post: My problem with this is it's 32-bit only and I was looking for 64-bit since it's for a Max for Live project and all of my Live installation is 64-bit—maybe I made the wrong choice then since I am finding a lot of problems with the 64 bit!
    • Jul 14 2015 | 11:31 pm in @engine avf is perfectly fine in 64 bit :-) !
    • Jul 15 2015 | 3:43 pm
      for 64 bit, you must export the audio file as an aif or wav file. you can easily use something like mpegstreamclip to batch process multiple files, and then load the corresponding audio or video file by replacing the extension in the file name (e.g. wav to mov).
    • Mar 16 2018 | 10:50 am
      Hi guys, Still not a solution for this problem in 2018 ?? I have the same exact problem with a PC installation where MAX is 64bit, and well spigot doesn't work ! It was the only simple (and great) way to route the video files as I needed.
      I'll separate the audio files from the videos and then load each duo together at the same time with a toggle button ( + splay), but I would like it to be 100% safe and in sync.
      Good enough ?
      Thanks !
    • Mar 16 2018 | 11:01 am
      PS: in any case, is there a problem if I use a MAX 32-bit version on the PC in order to use spigot ? 0r it is not recommended to use 32-bit app in a 64-bit PC ? $ (the patches were made on my MACbook pro in 64)
    • Mar 21 2018 | 11:53 am