Selecting audio channels for ofVideoPlayer file playback


I have three video files playing simultaneously and want to route the audio for each of them back to a different pair of audio channels. I’ve looked at examples with ofSoundStream setting up six channel audio output (which works), but I can not find a way to select which channels a particular file will play back on.

I’ve dug through the ofVideoPlayer code a bit (ofQuickTimePlayer since I’m on OS X) but have not found any easy way into the problem.

I’d appreciate any suggestions you OF audio gurus have… ; )

Many thanks!


OK. So this is working. I made a modified version of ofQTKitVideoPlayer which lets you select audio playback channels for video files. It assigns discrete audio channels to the particular audio tracks. There are a few kludgey things at the moment (it hardcodes the audio as track #1), but it works.

I’m using Jack to create a six channel virtual audio device and routing the sound through that to supercollider. But it should work more general for multi-track audio output.

I’ve attached a revised copy of ofxQTKitVideoPlayer and a qtkit-audio-select project file for os X that uses the code.

Also, I think the additions could just as easily be made to the base ofQuickTimePlayer class if that is a useful functionality. I also made a setAudioPlaybackDevice method for the video files.

hi robert

do you think this might also work if my video file has 6 audio tracks and i want to route each audio track to a different output?


Hi Stephan,

I would think it should. It looks like the


method in was written for six-channel audio, I just commented out everything after the first two. It should be pretty straight forward to pass six values for output mappings and get that working. And change the


method in ofxQTKitVideoPlayer…

Good luck, let me know how it goes.



how can i get access to your modified version of ofQTKitVideoPlayer?
the links are down :frowning: