processing / processing-video

GStreamer-based video library for Processing
274 stars 130 forks source link

Black Magic Atem Mini results in 'Internal data stream error' #164

Open ghost opened 3 years ago

ghost commented 3 years ago

Issue Cannot use capture to get video feed from Black Magic Atem Mini via USB.

Background The device is listed when looping through Capture.list() but does not show an image and gives an error message. The error message is not shown for other USB attached cameras in the list and they do show an image when used. The hardware is fully functional in other applications that accept USB (web)cameras as input: OBS, Discord, Google Hangout.

The following code

//within void setup()
String[] cameras = Capture.list();
println("All the cameras: ");
for (int i= 0; i < cameras.length; i++){
  println(cameras[i]);      
}
cam = new Capture(this, 1280, 720, "Blackmagic Design");
cam.start();
//within void draw()
if(cam.available()){
  cam.read();
}
image(cam, 0, 0);

results in a black rectangle where the image should be, along with the list of available cameras in the console:

Processing video library using GStreamer 1.16.2
All the cameras: 
HD Pro Webcam C920
Blackmagic Design
BaseSrc: [ksvideosrc0] : Internal data stream error.

Expected behaviour Image should show up.

Steps to reproduce On Windows 10, with Atem Mini connected, run the code above. No change in behaviour if it is connected by itself or with other cameras.

Possible problems The video library uses GStreamer 1.16.2 (according to the console output). The latest version might be able to handle the Black Magic device. However, by following this guide I have updated the GStreamer library to 1.18.1. This does not change the output of the console (it still says 1.16.2).

K0rrid0r commented 3 years ago

I get the same error but with another video capture device.

dragonlinux commented 3 years ago

My device is EZCAP 261 alse got this problem.

os:ubuntu 18.04.1 processing: 3.5.3

Processing video library using GStreamer 1.14.5
Available cameras:
BaseSrc: [v4l2src0] : Internal data stream error.
mamoru-iwahashi commented 2 years ago

@rgrtnlst Did you manage to solve the problem? I have the same problem

AtrashDingDong commented 2 years ago

Same with ATEM mini processing: 3.5.4 and 4.0-b2 os: windows 10 GStreamer: 1.16.2 (have updated to 2.0 but still shows 1.16.2 in the console)

ShubhamBhatt commented 2 years ago

I am having the same problem any solutions?? But for some reason, it can open my intel d435i depth camera. My normal webcam does not work.

AtrashDingDong commented 2 years ago

Unfortunately I haven't found a way to use GStreamer with the ATEM mini. Here is a workaround that has worked for me. If you are on PC, Instead of using the GStreamer library, it's possible to use Spout for Processing. (Syphon for Mac but I haven't tried it) 1) Download Spout: https://spout.zeal.co/ 2) Get SpoutCam: https://github.com/leadedge/SpoutCam I haven't tried this specific one. But I can't manage to find the source for the ofSpoutExample/bin/ofSpoutWebcam.exe which works for me. 3) Install Spout for Processing from the Processing library UI. 4) If you need to access pixels, refer to this Processing sketch: https://spout.discourse.group/t/read-pixel-color-in-processing/378 This requires to modify your Processing code since the Spout library doesn't access pixels the same way as GStreamer. It's a bit of a pain but if you need results right now it might be an option.

Hope it helps