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.
Pages: 1 2 3 
Using a dvcam as a web-cam in Linux (Read 13157 times)
Re: Using a dvcam as a web-cam in Linux
Reply #15 - May 13th, 2008, 3:53pm
 
What happens if you try:

pipe = new GSCustom(this, "dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! ffmpegcolorspace ! video/x-raw-rgb, width=720, height=480, bpp=32, depth=24");

Does gst-launch work with this pipeline?
Re: Using a dvcam as a web-cam in Linux
Reply #16 - May 13th, 2008, 5:16pm
 
Just tried this at cmdline:

Code:

gst-launch dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! ffmpegcolorspace ! video/x-raw-rgb, width=720, height=480, bpp=32, depth=24 ! autovideosink


and it returned:

Code:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /pipeline0/dv1394src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2165): gst_base_src_loop (): /pipeline0/dv1394src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 56756393 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
send oops
Setting pipeline to NULL ...
FREEING pipeline ...
Re: Using a dvcam as a web-cam in Linux
Reply #17 - May 13th, 2008, 9:15pm
 
Not exactly sure what is going on...

One possible issue could the the resolution. There are two DV resolutions, one is 720x480, and the other is 720x486. What happens if you try width=720, height=486? Try also removing bpp=32, depth=24.

Perhaps you still need video/x-raw-yuv.
Re: Using a dvcam as a web-cam in Linux
Reply #18 - May 13th, 2008, 10:20pm
 
I'll have a play around with it, and post the results

Re: Using a dvcam as a web-cam in Linux
Reply #19 - May 14th, 2008, 1:44pm
 
the saga continues :/

... it's the video/x-raw-rgb bit that is causing trouble

Does gsvideo require rgb over yuv?  If it does, I'll find a filter that will perform the conversion...
Re: Using a dvcam as a web-cam in Linux
Reply #20 - May 14th, 2008, 6:02pm
 
It is strange, when I try raw-yuv on windows (in the directshow example) seems to work fine. Didn't test on linux yet though.

I'll research more about this. Keep me posted about your own findings. My impression is that we are quite close to have it working...
Re: Using a dvcam as a web-cam in Linux
Reply #21 - Sep 6th, 2009, 6:45pm
 
Hello there,
very interesting posts above, I am on linux box and gstreamer is only way how to get a dv-stream to processing, actually there is something I do not understand much..

When I try to run inside a bash following:
Code:
gst-launch dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! ffmpegcolorspace !  video/x-raw-yuv,width = 720, height = 576, bpp=32, depth=24 ! xvimagesink 


everything is running just perfect.. xv window showing happily a nice-looking-full-fps video, but processing gsvideo library cannot read the same pipeline.. there is definitely something missing.. like some kind of color conversion.

I have tried almost everything, setup init of pipeline seems good, but my "pipe" never return available() == true ..so no image at all

any suggestion?
much appreciated!
thanks, kof
Re: Using a dvcam as a web-cam in Linux
Reply #22 - Sep 7th, 2009, 12:05am
 
I assume that you are trying to run the following pipeline inside Processing:

pipeline = new GSPipeline("dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! ffmpegcolorspace !  video/x-raw-yuv,width = 720, height = 576, bpp=32, depth=24");

(note that you don't have to add the element xvimagesink at the end).  

Are you using the latest version of gsvideo available at sourceforge ( https://sourceforge.net/projects/gsvideo/files/ )?

Also, did you try to convert to rgb (video/x-raw-rgb,width...)?
Re: Using a dvcam as a web-cam in Linux
Reply #23 - Sep 7th, 2009, 2:52am
 
Hi ac, thanks, got it. Problem was the old library with a x/video-raw-yuv instead of rgb. Works as charm.

Thanks so much.
kof
Re: Using a dvcam as a web-cam in Linux
Reply #24 - Jan 1st, 2010, 8:02pm
 
Hello I'm newbe to.

Running an Ubuntu 9.10 Karmic and gsvideo library.
I also traing to conect a dv camera to processing...

Anybody succed?? how?? Running the  example using the pipe only show me a gray window
Re: Using a dvcam as a web-cam in Linux
Reply #25 - Jan 3rd, 2010, 2:46am
 
Did you try running the dvcam pipeline from a terminal with the gst-launch command mentioned earlier in the thread:

Quote:
gst-launch-0.10 dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! ffmpegcolorspace !  video/x-raw-yuv,width = 720, height = 576, bpp=32, depth=24 ! xvimagesink


Does it work ok? Do you get any error? Same grey output as in processing?
Re: Using a dvcam as a web-cam in Linux
Reply #26 - Jan 3rd, 2010, 8:13pm
 
Hello AC, thanks for replaying so soon.

I did it but I get this error:

(gst-launch-0.10:3948): GLib-WARNING **: g_set_prgname() called multiple times
Estableciendo el flujo a PAUSADO ...
El flujo es en vivo y no necesita PRECACHEADO ...
Estableciendo el flujo para REPRODUCCIÓN ...
New clock: GstSystemClock
ERROR: del elemento /GstPipeline:pipeline0/GstDV1394Src:dv1394src0: Error en el flujo de datos interno.
Información adicional de depuración:
gstbasesrc.c(2378): gst_base_src_loop (): /GstPipeline:pipeline0/GstDV1394Src:dv1394src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 77681689 ns.
Estableciendo el flujo a PAUSADO ...
Estableciando el conducto a PREPARADO …
Estableciendo el conducto a NULL …
Liberando la tubería…

What I did wrong? old libraries?

By the way, happy new year! And thanks for helping
Re: Using a dvcam as a web-cam in Linux
Reply #27 - Jan 4th, 2010, 4:32am
 
If you are using the official gstreamer packages that come with karmic, then the libs should be up-to-date.

In any case, seems to be an issue at the level of the dv1394src plugin (some compatibility problem with your camera maybe)?

I found this other pipeline you can use to capture from dv:

Quote:
gst-launch dv1394src port=0 ! video/x-dv ! dvdemux ! dvdec ! xvimagesink


Note that you can set a port parameter for the dv1394src element, maybe trying different values would help. There is also a guid parameter that allows you to choose between multiple dv devices plugged into your system. You can get a full description of all the parameters accepted by dv1394src at this page:

http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-dv1394src.html
Re: Using a dvcam as a web-cam in Linux
Reply #28 - Jan 4th, 2010, 10:08pm
 
Hello AC, THANKS FOR THT!!!, that script work geat on bash!!! (previus doing a: sudo chmod 777 /dev/raw1394)

So I use:

pipe = new GSPipeline(this, "dv1394src port=0 ! video/x-dv ! dvdemux ! dvdec ! xvimagesink");

But running it on the pipe give me a extrange result. Apear two windows (one in gray the other one with a STATIC picture get from the camera)
So I read a previus comment and I realice that I have to take out the xvimagesink.

pipe = new GSPipeline(this, "dv1394src port=0 ! video/x-dv ! dvdemux ! dvdec");

And then again gray screen. We are getting closser I guess...

The error message on processing was:

BufferUnderflowException

and then

Exception in thread "Animation Thread" java.nio.BufferUnderflowException
     at java.nio.HeapIntBuffer.get(HeapIntBuffer.java:127)
     at java.nio.IntBuffer.get(IntBuffer.java:675)
     at codeanticode.gsvideo.GSPipeline.read(GSPipeline.java:146)
     at Test.draw(Test.java:52)
     at processing.core.PApplet.handleDraw(PApplet.java:1425)
     at processing.core.PApplet.run(PApplet.java:1327)
     at java.lang.Thread.run(Thread.java:619)

I also play with the port on bash only works with 0 and -1.

My camera its a canon ZR60 (realy old) and works perfect with pitivi.

May be its better If I try doind a clean instalation of my OS. I'm upgrading this one since ubuntu 8.04 and I think the library are a mees.
Some times processing makes the xorg go crazy and shutdown the session with extrange and bizzarre broken images... :S

Re: Using a dvcam as a web-cam in Linux
Reply #29 - Jan 5th, 2010, 4:19am
 
You should convert to rgb as the last step, otherwise processing won't accept the video frame:

pipe = new GSPipeline(this, "dv1394src port=0 ! video/x-dv ! dvdemux ! dvdec ! ffmpegcolorspace ! video/x-raw-rgb, width=720, height=480, bpp=32, depth=24);
Pages: 1 2 3