dv video under linux

  • Hi, the missing video library on linux kept me off processing for long time. now that I found gsvideo, the webcam seems to work fine. so great!

    is this also expected to work with dv-cameras? would be even greater indeet.

    using GSPipeline I would expect that to give me working input from DV-camera:

    import codeanticode.gsvideo.*;

    GSPipeline pipe;

    void setup() {
      size(720, 576);
      // Video pipeline 
      pipe = new GSPipeline(this, "dv1394src ! dvdemux name=demux demux. ! dvdec name=dv quality=5 !  ffmpegcolorspace ");

    void draw() {
      if (pipe.available() == true) {
        image(pipe, 0, 0);

    however all I get is an "ArrayIndexOutOfBoundsException":
    Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 1
        at codeanticode.gsvideo.GSPipeline.extractElements(Unknown Source)
        at codeanticode.gsvideo.GSPipeline.<init>(Unknown Source)
        at dv_in.setup(dv_in.java:27)
        at processing.core.PApplet.handleDraw(PApplet.java:1400)
        at processing.core.PApplet.run(PApplet.java:1328)
        at java.lang.Thread.run(Thread.java:619)

    • Andres Colubri
      Andres Colubri

      Does this pipeline work fine when running it from the command line with gst-launch?

      The "dvdemux name=demux demux." part looks strange, are you sure "demux." is not a typo?

    • yes it's screwed  but it works from the command line that way.

      but simplifying the pipeline to:

         pipe = new GSPipeline(this, "dv1394src ! dvdemux name=demux ! queue ! dvdec quality=5 ");

      works without errors. though there is still no image!?

      • Andres Colubri
        Andres Colubri

        Try adding a colorspace conversion after dvdec, i.e.:

        "...dvdec quality=5 ! ffmpegcolorspace ! video/x-raw-rgb, width=320, height=240, bpp=32, depth=24"

        with the resolution appropriate to your case.

    • same result. no picture. pipe.available delivers false..

    • Andres Colubri
      Andres Colubri

      Actually, this is a long standing bug:


      I tried fixing it a while ago, but without success.

      I'll give it another try for the next release of gsvideo. Thanks a lot for your feedback!