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 ... 3 4 5 6 
cross-platform video library (Read 38686 times)
Re: cross-platform video library
Reply #60 - Sep 16th, 2008, 3:51am
 
Even though gsvideo tries to use qtwrappersrc to capture video, in fact all this plugin does is to use quicktime to decode video files, it doesn't include any source element to access cameras on OS X.

GSvideo capture for OS X will require to develop a new plugin for video capture, unless such a plugin I'm not aware of already exists.
Re: cross-platform video library
Reply #61 - Jan 9th, 2009, 2:37am
 
I released a new version of the gsvideo library, for more info check out this post:

http://codeanticode.wordpress.com/2009/01/08/new-version-of-gsvideo-045/
Re: cross-platform video library
Reply #62 - Aug 28th, 2009, 1:42am
 
Hola,

I'm quite new to Processing so excuse my perhaps noobie question.  I've installed the GSVideo library in processing and installed the programs listed in post $4 in this thread.  I've added a number of directories concerning the gstreamer installation to my Windows system environment PATH, but when testing some of the GSVideo examples I get the following error:


Code:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: Could not load library gstreamer-0.10
at org.gstreamer.lowlevel.GNative.loadWin32Library(GNative.java:83)
at org.gstreamer.lowlevel.GNative.loadLibrary(GNative.java:43)
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:68)
at codeanticode.gsvideo.GSCapture.init(GSCapture.java:291)
at codeanticode.gsvideo.GSCapture.initOS(GSCapture.java:271)
at codeanticode.gsvideo.GSCapture.<init>(GSCapture.java:53)
at ColorSorting.setup(ColorSorting.java:48)
at processing.core.PApplet.handleDraw(PApplet.java:1403)
at processing.core.PApplet.run(PApplet.java:1328)
at java.lang.Thread.run(Thread.java:619)


....and I'm not really sure where to start to fix this, although in reality I've already tried a lot of little things but to no avail.   Any help is greatly appreciated!

Thanks, Adriaan

ps -> reason I want to use this lib and not the native Video library is because I want to use the ps3 eye cam in Processing.  As I understand it, it's not possible to use the ps3 cam with the native lib, right?
Re: cross-platform video library
Reply #63 - Sep 4th, 2009, 8:38am
 
*bump*  I'm still stumped about the above.... if anyone has a tip/idea for me.... that would be awesome.  Thanks!
Re: cross-platform video library
Reply #64 - Dec 25th, 2009, 2:04pm
 
has anyone managed to get gstreamer running on OS X 10.6?

after hours of MacPorts doing its thing i'm getting an error that i don't know to fix:
Code:
--->  Building gst-plugins-bad
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gst-plugins-bad/work/gst-plugins-bad-0.10.14" && /usr/bin/make -j2 all " returned error 2
Command output: osxvideosrc.c:1255: error: dereferencing pointer to incomplete type
osxvideosrc.c:1255: error: dereferencing pointer to incomplete type
osxvideosrc.c:1255: error: dereferencing pointer to incomplete type
osxvideosrc.c:1255: error: dereferencing pointer to incomplete type
osxvideosrc.c:1257: error: dereferencing pointer to incomplete type
osxvideosrc.c:1259: warning: implicit declaration of function 'UnlockPixels'
osxvideosrc.c: In function 'prepare_capture':
osxvideosrc.c:1269: warning: implicit declaration of function 'SGSetChannelUsage'
osxvideosrc.c:1269: error: dereferencing pointer to incomplete type
osxvideosrc.c:1269: error: 'seqGrabRecord' undeclared (first use in this function)
osxvideosrc.c:1275: warning: implicit declaration of function 'SGSetDataProc'
osxvideosrc.c:1275: error: dereferencing pointer to incomplete type
osxvideosrc.c:1275: warning: implicit declaration of function 'NewSGDataUPP'
osxvideosrc.c:1281: warning: implicit declaration of function 'SGPrepare'
osxvideosrc.c:1281: error: dereferencing pointer to incomplete type
make[3]: *** [libgstosxvideosrc_la-osxvideosrc.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from osxvideoplugin.m:31:
osxvideosrc.h:54: error: syntax error before 'SeqGrabComponent'
osxvideosrc.h:54: warning: no semicolon at end of struct or union
osxvideosrc.h:55: warning: type defaults to 'int' in declaration of 'video_chan'
osxvideosrc.h:55: warning: data definition has no type or storage class
osxvideosrc.h:58: error: syntax error before 'dec_seq'
osxvideosrc.h:58: warning: type defaults to 'int' in declaration of 'dec_seq'
osxvideosrc.h:58: warning: data definition has no type or storage class
osxvideosrc.h:62: error: syntax error before '}' token
make[3]: *** [libgstosxvideosrc_la-osxvideoplugin.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Angry
Re: cross-platform video library
Reply #65 - Dec 28th, 2009, 6:04pm
 
For Adriaan: can you access the Ps3 eye cam with DirectShow? It this is the case, then it could be possible to grab the video with gstreamer (since it has a dshow input plugin).
Re: cross-platform video library
Reply #66 - Feb 16th, 2010, 3:16am
 
I've got the same problem as phlog in a mac os x.

I cannot run the gsvideo examples, processing throws an error of library doesn't found.
Re: cross-platform video library
Reply #67 - Apr 30th, 2010, 11:36am
 
ac wrote on Jan 9th, 2009, 2:37am:
I released a new version of the gsvideo library, for more info check out this post:

http://codeanticode.wordpress.com/2009/01/08/new-version-of-gsvideo-045/


Hi,

i have installed on windows:
- Processing 1.1
- GStreamerWinBuild-0.10.5.1
- gsvideo-0.6-pre2 copy in libraries

I use a microsoft HD USB Cam.

I get this warnings:
Code:
** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstdshowsrcwrapper.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstdshowsrcwrapper.dll': Das angegebene Modul wurde nicht gefunden.

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstffmpeggpl.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstffmpeggpl.dll': Das angegebene Modul wurde nicht gefunden.

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstjpeg.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstjpeg.dll': Das angegebene Modul wurde nicht gefunden.

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstnice.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstnice.dll': Das angegebene Modul wurde nicht gefunden.

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstopengl.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstopengl.dll': Das angegebene Modul wurde nicht gefunden.

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstpng.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstpng.dll': Das angegebene Modul wurde nicht gefunden.

(java.exe:3916): GLib-GObject-WARNING **: specified instance size for type `GstMsGSMPayload' is smaller than the parent type's `GstBaseRTPPayload' instance size

** (java.exe:3916): CRITICAL **: file ..\..\..\Source\gstreamer\gst\gstelementfactory.c: line 263: assertion `g_type_is_a (type, GST_TYPE_ELEMENT)' failed

(java.exe:3916): GLib-GObject-WARNING **: specified instance size for type `GstRTPG729Pay' is smaller than the parent type's `GstBaseRTPAudioPayload' instance size

(java.exe:3916): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

** (java.exe:3916): CRITICAL **: file ..\..\..\Source\gstreamer\gst\gstelementfactory.c: line 263: assertion `g_type_is_a (type, GST_TYPE_ELEMENT)' failed

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstschroedinger.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstschroedinger.dll': Das angegebene Modul wurde nicht gefunden.

** (java.exe:3916): WARNING **: Failed to load plugin 'C:\gstreamer\lib\gstreamer-0.10\libgstx264.dll': `C:\gstreamer\lib\gstreamer-0.10\libgstx264.dll': Die angegebene Prozedur wurde nicht gefunden.

(java.exe:3916): GLib-GObject-WARNING **: cannot register existing type `GstRTPDepay'

(java.exe:3916): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

** (java.exe:3916): CRITICAL **: file ..\..\..\Source\gstreamer\gst\gstelementfactory.c: line 263: assertion `g_type_is_a (type, GST_TYPE_ELEMENT)' failed
Available cameras:
USB-Videogerät


Re: cross-platform video library
Reply #68 - Apr 30th, 2010, 6:00pm
 
So it is working, even though it gives you lots of warnings, correct?

In order to get rid of all these error messages, try removing the stand-alone version of gstreamer altogether. GSvideo comes with its own gstreamer binaries, which in the latest preview release (02) are not 100% compatible with gstreamer-winbuils 0.10.5.1
Re: cross-platform video library
Reply #69 - May 2nd, 2010, 4:33am
 
HI, I uploaded a new preview version of gsvideo to sourceforge:

https://sourceforge.net/projects/gsvideo/files/gsvideo/0.6/gsvideo-0.6-pre3.zip/...

It should work much better than the previous ones. You can use it in combination with a stand-alone version of gstreamer-winbuilds already installed on the system, but it is highly recommended that you use the latest one (0.10.6-RC2). The other alternative is to remove any gstreamer installer, in which case gsvideo will use its own copy of gstreamer (which is basically 0.10.6-RC2).
Re: cross-platform video library
Reply #70 - May 9th, 2010, 6:53am
 
First of all: thank you so much for this library! I've been using it for a while on my Linux netbook now, and with this I pretty much have no reason to switch back to Mac or Windows anymore.

I've been using it for capturing video, modifying the frames and then exporting it (I'd give an example, but this is my first post and I'm not allowed to include links Tongue), and it's been working great!

However, I run into a peculiar problem: when the rendering of the frames goes too fast, the GSMovieMaker object gets filled up with unprocessed frames, which crashes the processing sketch. My poor little netbook just can't keep up Sad.

Now, I get the advise to lower the framerate, but the whole point is that I'm not drawing to the screen: I just want to send arrays with pixels into the GSMovieMaker as fast as possible, to export a highres movie as fast as possible. The limiting factor seems to be the speed at with the frames are processed by GSMovieMaker, and there's no way for me to tell how long I should wait untill I pass another array of pixels.

Would it be possible to make a function that tells wether or not the GSMovieMaker still has unprocessed frames or not? So that I could do something like:

Code:
while (currentFrame < totalFrames) {
 if (!mm.unprocessedFrames()) {
   // render currentFrame, add it to GSMovieMaker object, ++currentFrame
 }
}


or maybe make a variant of the addFrame() function which doesn't return to the sketch untill the added frame has been processed? Those are the two most obvious solutions I could think of.

(I saw in the messageboard on sourceforge you made some changes that would reduce the amount of memory used by this library in the first place, so maybe my problem already has been solved indirectly...)
Re: cross-platform video library
Reply #71 - May 9th, 2010, 8:01am
 
Ok, I've just tried to use the new 0.6 pre4 version. If I set my PSEye resolution to 640x480 it crashes immediatly, in 320x240 it takes a while.

Basically I get this message:

Quote:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEV (0xb) at pc=0xb7e82896, pid: 13360, tid=2147867536
#
# Java VM: OpenJDK Client VM (14.0-b08 mixed mode linux-x86)
# Distribution: Ubuntu 9.04, package 6b14-1.4.1-0ubuntu13
# Problematic frame:
# C  [libc.so.6+0x79896]  memcpy+0x46

And a whole lot more stuff. Is this a bug in the GSVideo library or one in OpenJDK?
Re: cross-platform video library
Reply #72 - May 9th, 2010, 8:57pm
 
Hi, thanks for the suggestion of adding a method to retrieve the number of unprocessed frames in the queue. I agree it is an useful feature. It will available in the next version of GSVideo as GSMovieMaker.queuedFrames().

The memory optimization mentioned in some forums shouldn't have any effect in movie creating, because it only affects playback (GSMovie, GSPipeline).

Regarding the crashes that appear when you try to use PSEye camera, I'm not sure what could be the reason. Maybe a problem with the drivers? How well supported in this camera on Linux? Maybe you can try running the gstreamer capture pipeline directly from the command line using the gst-launch tool, to determine if the problem is with gstreamer or with gsvideo.
Re: cross-platform video library
Reply #73 - May 11th, 2010, 4:02pm
 
I don't know.

On the one hand, I never had any problems when running, say, Cheese Webcam Booth or XawTV. Also, the previous versions of GSVideo also didn't have this problem.

On the other hand, GSVideo 0.5.1 did sometimes crash due to buffer underflow errors. And I always got this warning:
Quote:
(GSVideo:13200): GStreamer-WARNING **: pad v4l2src0:src returned caps which are not a real subset of its template caps
Maybe those problems are related to this problem?
Re: cross-platform video library
Reply #74 - May 11th, 2010, 5:34pm
 
I see. At some point I made substantial changes in the way GSPipeline works, maybe this is the reason. What is the last version of GSVideo that works with your PSEye camera?
Pages: 1 ... 3 4 5 6