We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › gsvideo with (slightly) better OSX support
Pages: 1 2 
gsvideo with (slightly) better OSX support (Read 3410 times)
gsvideo with (slightly) better OSX support
Jan 29th, 2009, 5:35pm
 
Hello,

I just released a new version of gsvideo that doesn't require macports or any other additional install on OSX, so it should be much easier to use (same thing on windows, actually). However, Processing needs to be started from the terminal, but this will hopefully solved soon. For more details and downloads follow this link:

http://codeanticode.wordpress.com/2009/01/29/new-gsvideo-with-better-osx-support/
Re: gsvideo with (slightly) better OSX support
Reply #1 - Jan 30th, 2009, 2:49am
 
Update: The terminal thing can be avoided by editing the file ~/.MacOSX/environment.plist. Details in the link above.

But please be careful when following this method, since you can break other applications (and even the whole system) when modifying the environment.plist file (specially if typos are introduced in it). Create a backup of your environment.plist file if it already exists before making any changes, and don't replace its entire contents with the sample I posted on sourceforge example, just add the DYLD_LIBRARY_PATH variable.

Hopefully, this hack won't be needed in the future as we find a better way to install gsvideo on OSX.
Re: gsvideo with (slightly) better OSX support
Reply #2 - Mar 11th, 2009, 4:33am
 
checking in on any possible progress including OSX GStreamer plugin for capture, osxvideosrc, in gsvideo-mac

i'm headed to get a new vid card for my windows xp in the morning to solve the problems i was having there, but i'd rather use gsgl on mac.  not trying to bug, windows just gives me anxiety...

thanks.
Re: gsvideo with (slightly) better OSX support
Reply #3 - Mar 11th, 2009, 7:17pm
 
I recently did some progress on the mac front. I compiled gstreamer from scratch using the latest packages from macports, and it seems to work nicely with gsvideo. The capture plugin osxvideosrc runs ok (although it is still in alpha stage), and GSMovieMaker should work as well. However, I need to do some more tweaks and run a couple of additional tests. If I have some available time, I'll upload a preliminary version to my website so you can start testing it.
Re: gsvideo with (slightly) better OSX support
Reply #4 - Mar 12th, 2009, 12:54am
 
Ok, I have a version of gsvideo + gstreamer binaries that you can use... not finished yet, but I think is worthwhile giving a try. You need to download the following two files:

http://users.design.ucla.edu/~acolubri/test/gstreamer/macosx/gsvideo-20090311.zip

http://users.design.ucla.edu/~acolubri/test/gstreamer/macosx/opt.zip

The first is just the gsvideo library package, which goes into Processing's library folder.

The second zip file contains gstreamer binaries, and it should be unzipped into the root folder of the main hard drive.

The included examples require a little hack in order to work properly, which is the following: before running any gsvideo function, add the following line:

GSVideo.forceGlobalGstreamer = true;

For example, you could add this line right after the size() function, i.e.:

Code:

void setup() {
size(640, 480);
GSVideo.forceGlobalGstreamer = true;

mov = new GSMovie(...


This ensures that gsvideo finds the gstreamer binaries in /opt/local. This hack won't be needed once the new version of gsvideo is "officially" released.
Re: gsvideo with (slightly) better OSX support
Reply #5 - Mar 12th, 2009, 12:55am
 
I also run some benchmarks with different video formats. Strangely enough, the fps is lower than the windows version. But the CPU utilization is also smaller...

DV/DVCPRO 720x480, 29.5fps with sound (in a mov container): plays at ~20fps with ~32% cpu utilization

XVID4 720x480, 29.5fps with sound (in an avi container): plays at ~22fps with ~27% cpu utilization

H264 1280x544, 23.98 fps with sound (in a mov container): plays at ~19fps with ~40% cpu utilization

XVID4 1280x544, 23.98 fps with sound (in an avi container): plays at ~19fps with ~40% cpu utilization

DV/LAVC 720x576, 25.00 fps with sound (in an avi container): plays at ~19fps with ~27% cpu utilization

Test system: MacPro with Dual-Core Intel Xeon @ 2.66Ghz, 2GB RAM
Operating system: Mac OSX 10.5.5
Re: gsvideo with (slightly) better OSX support
Reply #6 - Mar 12th, 2009, 1:14am
 
Another note, things run fine on OSX 10.5, since I compiled gstreamer using macports on a 10.5 machine.

My impression is that these binaries of gstreamer should run in OSX 10.4 as well, but I haven't tested this.
Re: gsvideo with (slightly) better OSX support
Reply #7 - Mar 13th, 2009, 4:11am
 
thanks for the update!!!
i followed all your directions and i do not get any errors.  the sketch seems to open, but i am only getting a blank screen.  I tried using livepocky example thru gsvid and it opens with blank screen too.  this example works fine when i use it thru processing normal lib.  any thoughts.  I am dropping the "GSVideo.forceGlobalGstreamer = true;" in appropriate spots.

i am using:
MAC OSX 10.5.6
MacbookPro
2.6 GHz Intel
Re: gsvideo with (slightly) better OSX support
Reply #8 - Mar 13th, 2009, 3:37pm
 
Hello.

What about the playback and moviemaker examples. Do the work ok?

Unfortunately, the capture gstreamer plugin I'm currently using in GSVideo (osxvideosrc) is still in a very preliminary stage. Among other things, it doesn't allow to use a resolution different from 640x480. This could be one reason for the problem...
Re: gsvideo with (slightly) better OSX support
Reply #9 - Mar 13th, 2009, 4:27pm
 
working now!  i am digging in!  THANK YOU!!!  it was the resolution that i had 960 x 540.  i ordered a new vid card for my windows xp, so i'll let you know how both machines are running.  really thank you!
Re: gsvideo with (slightly) better OSX support
Reply #10 - Mar 14th, 2009, 6:47pm
 
Great. Keep me posted.

I wonder if anyone has tried these gstreamer binaries on OSX 10.4 or earlier... they should work, but not sure.
Re: gsvideo with (slightly) better OSX support
Reply #11 - Mar 20th, 2009, 3:32am
 
just loaded everything up into a MacBookPro G4 Mac OSX 10.4.11.  

not working.
here's the error:

unsatisfiedlinkerror:  Unable to load library 'gstreamer-0.10' :diopen(/opt/local/lib/libgstreamer-0.10.dylib, 1): no suitable image found. Did find: /opt/local/lib/libstreamer-0.10.dylib: file to short

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError:
Unable to load library 'gstreamer-0.10':
dlopen(/opt/local/lib/libgstreamer-0.10.dylib, 1): no suitable image
found.  Did find:
   /opt/local/lib/libgstreamer-0.10.dylib: file to short
   at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114)
   at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157)
   at com.sun.jna.Library$Handler.<init>(Library.java:123)
   at com.sun.jna.Native.loadLibrary(Native.java:260)
   at org.gstreamer.lowlevel.GNative.loadNativeLibrary(GNative.java:48)
   at org.gstreamer.lowlevel.GNative.loadLibrary(GNative.java:45)
   at org.gstreamer.lowlevel.GstNative.load(GstNative.java:38)
   at org.gstreamer.lowlevel.GstAPI.<clinit>(GstAPI.java:33)
   at org.gstreamer.Gst.init(Gst.java:213)
   at codeanticode.gsvideo.GSVideo.init(GSVideo.java:72)
   at codeanticode.gsvideo.GSCapture.init(GSCapture.java:283)
   at codeanticode.gsvideo.GSCapture.initOS(GSCapture.java:263)
   at codeanticode.gsvideo.GSCapture.<init>(GSCapture.java:53)
   at sketch_081225a_Snow.setup(sketch_081225a_Snow.java:88)
   at processing.core.PApplet.handleDraw(PApplet.java:1400)
   at processing.core.PApplet.run(PApplet.java:1328)
   at java.lang.Thread.run(Thread.java:613)
Re: gsvideo with (slightly) better OSX support
Reply #12 - Mar 20th, 2009, 4:50am
 
Seems that the gstreamer binaries I compiled only work on OSX 1.5. Thanks for checking.
Re: gsvideo with (slightly) better OSX support
Reply #13 - Mar 20th, 2009, 5:10am
 
just tried on MACOSX 10.5 2Ghz PowerPC G5 and not working here either.  so, looks like only intel?
Re: gsvideo with (slightly) better OSX support
Reply #14 - Mar 20th, 2009, 6:08am
 
It's quite likely. I need to check how to compile universal version of the libraries with macports.
Pages: 1 2