Camera Capture not working with MPEG streams

edited August 2017 in Library Questions

Dear all,

For a basic Truck-PC project, I use Processing as a general interface launching dedicated programs for GPS and display data such as speed, levels,... and rear camera.

The rear-view camera is a USB ELP 960p (screen resolution is 1024x768p).

Using the video library, with the Capture, I am able to retrieve the streams formatted in YUY2 (low frame rate), but not the MPEG streams above 640x480p...

To try so, I just used the given GettingStartedCapture example.

Is this a bug?

Thank you.





  • We cannot read the code you posted there or what the console output shows. The images in the forum are resized and this operation can make them unreadable. You should select the content of your console and past it here. I am assuming you console shows the list of cameras detected by the video library? If not, have you tried calling Capture.list() and see what cameras are detected there?

    When you copy and paste from the console to here in the forum, select those lines and hit ctrl+q to format them as quoted text.

    Is the unit mounted on the truck? Are you using a Raspberry-PI for this?

    Notice that not all cams are supported by the video library. This is what I gather from post that I have seen in the last year or so. Hopefully this is not the case for you.


  • (it's just the usual code for printing the list of available cameras and the said list. Output just says "HD camera manufacturer", no other make, very generic)

  • edited August 2017

    Hello, The image was just to show the general «screen» of the program. I don't use raspberry, but a 2 in 1 foldable 11" touchscreen PC: HP Stream x360. This roams in the Sahara desert. GPS, Arduino (for temp probes, batteries and fuel levels), and cameras are linked with USB via a router: only one cable to plug so I can hide the device simply. The Capture.list() returns the modes of the camera, with YUY2 then MPEG streams. Processing with Video library is unable to decode the MPEG streams, only the YUY2 at low resolution. I wanted to select the 1280*720 to fill the screen at 30fps. So far I can only use the 10 (YUY2 640x480 30fps), and my sketch runs at 55fps.

     Available cameras:
    [0] "name=HD Camera Manufacturer,size=1280x720,fps=15"
    [1] "name=HD Camera Manufacturer,size=1280x720,fps=30"
    [2] "name=HD Camera Manufacturer,size=640x480,fps=15"
    [3] "name=HD Camera Manufacturer,size=640x480,fps=30"
    [4] "name=HD Camera Manufacturer,size=320x240,fps=15"
    [5] "name=HD Camera Manufacturer,size=320x240,fps=30"
    [6] "name=HD Camera Manufacturer,size=800x600,fps=15"
    [7] "name=HD Camera Manufacturer,size=800x600,fps=30"
    [8] "name=HD Camera Manufacturer,size=1280x960,fps=15"
    [9] "name=HD Camera Manufacturer,size=1280x960,fps=30"
    [10] "name=HD Camera Manufacturer,size=640x480,fps=30"
    [11] "name=HD Camera Manufacturer,size=320x240,fps=30"
    [12] "name=HD Camera Manufacturer,size=800x600,fps=20"
    [13] "name=HD Camera Manufacturer,size=1280x720,fps=10"
    [14] "name=HD Camera Manufacturer,size=1280x960,fps=9"
  • Answer ✓

    Well, given the time needed to implement this in this library, i decided to call a third-party software (the VLC) to display the camera ontop of my program.

Sign In or Register to comment.