Crackling sound when using jit.movie~ with OpenGL

Andreas Bade's icon

Hi!

This is my first post to this forum, so please bear with me if I am asking a question that has been asked before.

I am working on a Max program that combines the use of OpenGL- rendered videos and vst plugins.

The problem is, that when I am playing videos using the jit.movie~ object we experience bad sound quality in the form of crackling sounds.

The quality is somewhat improved when we increase I/O Vector Size and Signal Vector Size in Audio Status, but since we need low latency for the vst~ plugins, we cannot increase these as much as we would like.

Is anybody experiencing this problem? Does anybody know of a good solution?

I have attached a max patch to illustrate the problem.

The exhibition is opening next week, so all input is much appreciated.

player.maxpat
Max Patch
Example Patch

msnf's icon

Hi Andreas,
how is about your exhibition?
Did you solve your problem?
I have same and no solution...

Andreas Bade's icon

Hi!

Unfortunately, we did not manage to solve it before the opening, but the problem can be reduced by increasing I/O Vector size (which again means more latency).

I have done som experiments using jweb as video player, and it seems promising. I made a HTML- file with video- tag that I control from max by javascript- messages. I was able to control all aspects of the player that I needed, including starting, stopping, seeking and detecting the end of each movie.

Unfortunately, you will not be able to get the audio streams from the video to MSP as this will be controlled på jwwb (which in turn is an embedded Chromium browser). Also, jweb can only read OGG Vorbis video- files, so we will maybe need to reencode all videofiles used in the exhibition.

Hopefully we will test a prototype of this solution this week.

I you like, I can share the prototype. I am not at the computer with the prototype at the moment, but can upload it the this forum tomorrow.

msnf's icon

Not very good news...
Hope somebody from Cycling is reading the posts about this problem - we are not alone!
Yes, if you can share your prototype it could be nice.
Thanks a lot

Andreas Bade's icon

Hei!

Attached is the prototype of video player using jweb.

Please test with the movie file in movies folder inside the zip, sa jweb / cef is very picky on the encoding format.

We are in the process of testing out this way of playing back video, so we are not using the way of playback in the exhibition yet.

Also, when running on Windows, the [conformpath] object may need to be changed.

If no video is played, try hitting the "open html" message/ button and choose the html- file in the others- folder.

This prototype actually plays back with a lot better quality on windows than on mac. Since we are using Windows- machines in our exhibition this is OK.

Hope this is of some help.

videoplayertest.zip
zip 1.82 MB

msnf's icon

Thank you very much Andreas. Your patch is working well, but if I understand with your patch I can play only movies from my hard disk? But it's possible to do with jit.movie~ without pb. The pb is when I try to play mp4 from ftp server...
Another pb with your patch is that I lose max menu and only way to find it is to quit Max....
Is there any possibility to play files form web with your patch? And don't swith of th emax menu?

Andreas Bade's icon

Hei!

Thanks for feedback!

>> I lose max menu and only way to find it is to quit Max. (..) And don't swith of th emax menu?

I did this in order to make the example easier to test for my customer. Press space- key to exit from full screen.

This method also works fine when run in non- fullscreen mode.

>> only movies from my hard disk? (..) Is there any possibility to play files form web with your patch?

This method also works with videos on the web. See the object [sprintf executejavascript src('%s')] The string (%s) gets populated from [opendialog]. If you set the paramteter as a regular URL, you can play movies from the web.

I used [opendialog] to make the example easier to run.

>> But it's possible to do with jit.movie~ without pb.

What do you mean with the word "pb"?

~A :)

msnf's icon

Hi Andreas,
Sorry for a long time for my answer. It's clear now, but the problems are the same finally.
I see know that we use a different approaches - you use jweb for playing you files (wirh javascript commandes , but I try to use jit.movie or better jit.movie~
With your solution it's impossible for me to play this mp4 file :
http://www.redi-musix.com/redi-musix/pieces/test/Daniel_Kientzy_--_Aulodie_Francois-Bernard_Mache.mp4
into jweb I have error - Couldn't load plug-in...
And ji.movie doesn't work well - lot of glitches !!!! Absolutely unusable object and nobody answer for our questions - crazy !!!

PS. pb => problem ;-) (without pb => without problem)