Selecting audio channels for ofVideoPlayer file playback

Hi,

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!

Robert

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.

ofxQTKitVideoPlayer.zip

qtkit-audio-select.zip

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?

thx

Hi Stephan,

I would think it should. It looks like the

  
setAudioTrackChannelLayoutDiscrete  

method in QTKitMovieRenderer.mm 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

  
setPlaybackChannels  

method in ofxQTKitVideoPlayer…

Good luck, let me know how it goes.

Best,

Robert

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