Forums > MaxMSP

guaranteeing audio output from a movie file

September 26, 2006 | 11:06 am

Hi list,

sorry if i’m asking a dumb question, but i’ve been mostly concentrating on Jitter since i’m working with max… i know MSP offers a lot damn good possibilities but i just didnt get to it yet.

so here goes, i’m playing a movie through jit.qt.movie, and even when my framerate is still good i sometimes get ‘hiccups’ in the audio (that is embedded in the movie). Since one channel of the audio contains timecodes for external sample sinchronisation I do not like these hiccups. I must mention that the patch it is in is pretty intensive on the CPU, but i’m pretty sure I must be able to get an insured audio output.

Do you people have some tips or example patches of how I can assure the timely audio output?

this would be more than appreciated.

thanks
d


September 26, 2006 | 1:01 pm

Hey,
Not sure if theres an easy answer for this, if your patch is pretty intensive, are you using Open GL as this can cut down the CPU usage (leaving it all to your poor GPU) also worth using UYVY – if you are already doing this stuff, ignore me:P

Other than that, why not deinterlace the audio and video, and play the audio from a buffer in parralel to the video, that way you will be able to edit it better and wont have to rely on the video playback to create a good result + by buffering it, it has no exuse to not play properly!

Hope this helps anyways
T


September 26, 2006 | 1:10 pm

Hi Trum,

thanks for the reply. The first part I will indeed ignore since i’m allready saddling up my GPU with all video tasks, in UYVY colormode too :)

but the second part sounds really interesting, better even; it could be just what i’m looking for! But as i mentioned i’m a bit lost in the MSP world for now so i would appreciate it if you could point me to an object or tutorial which could help me on my way?

anyhow thanks!


September 26, 2006 | 1:20 pm

We’ll need more info about what you mean by hiccups and some kind of
example patch which describes the phenomenon, in order to provide an
answer. Thanks.

jb

Am 26.09.2006 um 13:06 schrieb david:
> so here goes, i’m playing a movie through jit.qt.movie, and even
> when my framerate is still good i sometimes get ‘hiccups’ in the
> audio (that is embedded in the movie). Since one channel of the
> audio contains timecodes for external sample sinchronisation I do
> not like these hiccups. I must mention that the patch it is in is
> pretty intensive on the CPU, but i’m pretty sure I must be able to
> get an insured audio output.


September 26, 2006 | 2:21 pm

My patch contains three jit.qt.movies playing simultaneously and synchronised. Only one of them contains an audio track. I read them in in uyvy colormode, pumping them straight through to jit.net.send objects, which in its turn sends it to my second patch (via the localhost), where the matrices are texturized and composited using only OpenGL. A pretty basic setup as u can read.
-if necessary i can post a patch later on, but I ain’t got it on me right now-

What I mean whit hiccups is that small chunks of audio get lost, randomly throughout the movie. I can make things worse when i start scrolling through the patch. or taking other actions outside of my patch, so my hunch is that the audio processing has got a lower priority than the other actions/object, and so small chunks of audio don’t get processed and thus go lost. I must mention this is not happening all the time and with all of my video files. When i get the ‘hiccups’ It’s usually happening in bursts.

So the idea of Trum to buffer them (in ram?) and synchronously playing them back with the movie would do just fine i believe… only i don’t really now how to do this (loading them and playing back SYNCHRONOUSLY to the movie that is…)

Is this clearing things up? if not, let me know what isn’t quite clear enough yet and i’ll try to bring it across.

thanks!
d


September 26, 2006 | 2:22 pm

My patch contains three jit.qt.movies playing simultaneously and synchronised. Only one of them contains an audio track. I read them in in uyvy colormode, pumping them straight through to jit.net.send objects, which in its turn sends it to my second patch (via the localhost), where the matrices are texturized and composited using only OpenGL. A pretty basic setup as u can read.
-if necessary i can post a patch later on, but I ain’t got it on me right now-

What I mean whit hiccups is that small chunks of audio get lost, randomly throughout the movie. I can make things worse when i start scrolling through the patch. or taking other actions outside of my patch, so my hunch is that the audio processing has got a lower priority than the other actions/object, and so small chunks of audio don’t get processed and thus go lost. I must mention this is not happening all the time and with all of my video files. When i get the ‘hiccups’ It’s usually happening in bursts.

So the idea of Trum to buffer them (in ram?) and synchronously playing them back with the movie would do just fine i believe… only i don’t really now how to do this (loading them and playing back SYNCHRONOUSLY to the movie that is…)

Is this clearing things up? if not, let me know what isn’t quite clear enough yet and i’ll try to bring it across.

thanks!
d

< >


September 26, 2006 | 2:30 pm

Am 26.09.2006 um 16:22 schrieb david:

> if necessary i can post a patch later on, but I ain’t got it on me
> right now-

Yes, please do. We don’t like reconstructing test patches from verbal
descriptions of them.

> What I mean whit hiccups is that small chunks of audio get lost,
> randomly throughout the movie. I can make things worse when i start
> scrolling through the patch. or taking other actions outside of my
> patch, so my hunch is that the audio processing has got a lower
> priority than the other actions/object, and so small chunks of
> audio don’t get processed and thus go lost. I must mention this is
> not happening all the time and with all of my video files. When i
> get the ‘hiccups’ It’s usually happening in bursts.

Do you have periodic activity on your system (email checks, etc.)
that could be grabbing a lot of processor and/or disk from time to time?

> So the idea of Trum to buffer them (in ram?) and synchronously
> playing them back with the movie would do just fine i believe…
> only i don’t really now how to do this (loading them and playing
> back SYNCHRONOUSLY to the movie that is…)

Take a look at the spigot~ object. It does this more or less
automatically.

Thanks for taking the time to put together a clear, simple example
patch.

jb


September 26, 2006 | 2:36 pm

What isn’t clear is that you haven’t yet provided an example patch that
demonstrates the issue. Without this, we can’t really do much to help.
If you haven’t already, you might look at spigot~ for playing back the
movie audio through MSP.

Andrew B.


September 26, 2006 | 3:34 pm

Hi,

The reason I didn’t include an example patch is that on this pc i don’t have max installed. When I get home (in an hour or two) I will post an example patch. sorry for bugging u with all those words…

concerning the spigot~ object, i just looked through the documentation and I think i’ll give that a try before I go on bugging you guys.

cheers,d


October 9, 2006 | 11:49 am

Hi,

first off, sorry if I didn’t reply earlier and did as i promised to post an example patch. I just didn’t get around to it. In the mean while all got fixed and our first (and second) performance passed by whithout any problems.

I found out that the distorted audio signal was not a problem with my patch, but more a physical problem. The audio signal that my laptop outputs was simply not ‘strong’ enough at all times. So putting an amplifier after the output and before inputting it into the DR8 device solved my problems.

Thanks to all for the advice and help though!

Cheers
d


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