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.
IndexProcessing DevelopmentLibraries,  Tool Development › cross-platform video library
Pages: 1 2 3 ... 6
cross-platform video library (Read 38684 times)
cross-platform video library
Dec 12th, 2007, 4:59pm
 
Hi,

I'm implementing a new video library based on GStreamer, which works on Linux, Windows and OSX. Well, I have it tested on Windows and Linux, not on OSX yet Wink

Anyways, the idea is to re-implement the three classes of the processing.video library: Capture, Movie and MovieMaker, so the API of the new library is identical to the original.

Here you can download the code and some examples:
http://codeanticode.wordpress.com/2007/12/12/cross-platform-video-library-for-processing/

I've just started coding this last week, so it is very experimental at this point. Looks quite promising, though. I have done some tests with HD videos, and performance is very good indeed. Please let me know of any comments, suggestions, bug reports, etc.

Andres
Re: cross-platform video library
Reply #1 - Dec 14th, 2007, 10:52am
 
hi,

super cool! tried to compile it on os x, with no luck though. I'll give it another try this weekend.
would there be a way to include everything with the library, once you have them for all 3 platforms? I mean all the needed binaries for GStreamer? Because it's nice to have it all in one place, without needing to install stuff and hack around in the system.

It would be great to finally have serious video performance in processing, thanks! Smiley
Re: cross-platform video library
Reply #2 - Dec 14th, 2007, 10:58am
 
As far as I can tell, if it works like I think it does, it's not going to be as easy as OpenGL to use in an online sketch, but more like jSyn, where you have to get people to go and download and install the library if they want to view your sketch.
Re: cross-platform video library
Reply #3 - Dec 15th, 2007, 10:52am
 
how can i setup gstreamer on xp?

i alreay installed the gtk runtime . but still says i need glib to finish the gstreamer setup. should i compiled the Glib by myself? coz i hardly can't find any glib win32 file.

any hints? thank you in advanced!
btw,thank you for this great Library!
Re: cross-platform video library
Reply #4 - Dec 15th, 2007, 2:49pm
 
Ok, I did some more tests on machines with windows XP, and I realized that the version of java that comes with Processing (1.4.2) is not compatible with the gsvideo library. This is probably because I compiled it with jdk 1.5, I will try to compile it with jdk 1.4 later. But for now, I have to use the "expert" version of processing (0135), with jre 1.5 (or 1.6) installed separately.

As for the files required for gstreamer to work, the only requirement is the gtk+ library, which you can download from here:
http://downloads.sourceforge.net/gimp-win/gtk%2B-2.10.13-setup.exe

Then, all the components of gstreamer should install without problems. I installed the following packages:
gstreamer-0.10.13
gst-plugins-base-0.10.13
gst-plugins-good-0.10.6
gst-plugins-bad-0.10.5
gst-plugins-ugly-0.10.6
gst-ffmpeg-0.10.2
grabbed from here:
http://gstreamer.freedesktop.org/pkg/windows/releases/

For each package, you have a setup.zip and a win32.zip file, the setup.zip contains an automated installer, which is the one I used.
I think that you also need to restart the system after installing gstreamer, since it updates the system PATH.
Re: cross-platform video library
Reply #5 - Dec 16th, 2007, 6:46am
 
thank you for the help,it all works.
i tested some files as following format:
divx,xvid,x264,quicktime under processing 0135,jdk1.5

it working fine,but it gave me some waring like this:

** (java.exe:656): CRITICAL **: file E:\devel-release\src_releases\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL' failed

** (java.exe:656): WARNING **: Add decoder dsicinvideo (97) please

** (java.exe:656): WARNING **: Add decoder gif (100) please

** (java.exe:656): WARNING **: Add decoder kmvc (88) please


is it normal? or did i missing something.
Re: cross-platform video library
Reply #6 - Dec 16th, 2007, 8:31am
 
"system PATH."?

Re: cross-platform video library
Reply #7 - Dec 16th, 2007, 9:58pm
 
Yes, the environmental variable PATH, the gstreamer installer also adds a new variable called GS_PLUGIN_PATH:
http://support.microsoft.com/kb/310519


Re: cross-platform video library
Reply #8 - Dec 17th, 2007, 7:22am
 
the path environmental is ok,i checked.
its ok,at least its working. thxs for the help!
Re: cross-platform video library
Reply #9 - Dec 17th, 2007, 12:53pm
 
http://trac.macosforge.org/projects/macports/ticket/12887
mac os x use the macports have some problems

sudo port install gstreamer
--->  Building python25 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.or
g_release_ports_lang_python25/work/Python-2.5.1" && make all " returned error 2
Command output: /usr/bin/libtool -o libpython2.5.dylib -dynamic  \
       -all_load libpython2.5.a -single_module \
       -install_name /opt/local/lib/libpython2.5.dylib \
       -compatibility_version 2.5 \
       -current_version 2.5 -lSystem -lSystemStubs -L/opt/local/lib
ld64 failed: in libpython2.5.a(__.SYMDEF), not a valid ppc64 mach-o file
/usr/bin/libtool: internal link edit command failed
make: *** [libpython2.5.dylib] Error 1

Error: The following dependencies failed to build: py25-gobject python25 py25-numeric py25-wxpython wxWidgets jpeg libpng libsdl libsdl_mixer libogg libvorbis smpeg tiff
Error: Status 1 encountered during processing.

Re: cross-platform video library
Reply #10 - Dec 17th, 2007, 5:20pm
 
Did you try darwinports?
Here are the instructions to install the base gstreamer package and the plugins:

http://gstreamer.darwinports.com/

http://gst-plugins-base.darwinports.com/

http://gst-plugins-good.darwinports.com/

http://gst-plugins-bad.darwinports.com/

http://gst-plugins-ugly.darwinports.com/

I don't have a Mac right now to test it.
Re: cross-platform video library
Reply #11 - Dec 17th, 2007, 6:49pm
 
I also found these intructions to compile gstreamer directly from the CVS:

http://www.tribler.org/GstreamerMac
Re: cross-platform video library
Reply #12 - Dec 19th, 2007, 5:25am
 
hey,me again,does this library support duration,time,jump those functions from builtin video library?

t tried it,things like println(movie.duration()); seems doesn't work at all.

just curious,each time after i closed the application window
it gave me such message:

"OIL: ERROR liboilcpu.c 282: oil_cpu_i386_kernel_restrict_flags(): Operating system is not known to support SSE.  Assuming it does, which might cause problems"

do you have same issue?

Re: cross-platform video library
Reply #13 - Dec 19th, 2007, 6:03am
 
It should, at least it works on my development machine (where I'm using processing 0134-expert). Does the gstreamer6 example work for you? In it, the position in the movie file is set with the mouse position using the jump function:

movie.jump(movie.duration() * mouseX / width);

I'm also getting the OIL error you mention, it doesn't affect playback so I didn't worry about it too much yet. Seems to be some internal error from gstreamer.

I'm also getting a bunch of "Add decoder..." warnings, but they don't seem to be too serious either.
Re: cross-platform video library
Reply #14 - Dec 19th, 2007, 6:22am
 
Regarding JohnG comment:

"As far as I can tell, if it works like I think it does, it's not going to be as easy as OpenGL to use in an online sketch, but more like jSyn, where you have to get people to go and download and install the library if they want to view your sketch."

I agree, but I think it is the same situation with quicktime: you have to have it installed on your machine in order to run the sketches. Of course, quicktime comes by installed by default on Mac, and on most PCs.

Right now, installing gstreamer on Windows is a little bit cumbersome (many different packages have to be installed separately), but I guess that this might became easier in the future (gstreamer being open source means we can start creating our own installers, etc)

On most Linux distros, gstreamer comes installed by default, or it can be installed very easily. Things look the worst on the Mac front, where we are still working on compiling gstreamer and all the required plugin modules.
Pages: 1 2 3 ... 6