Question / Help DirectShow RAW RGB8 support?

ckambiselis

New Member
Good afternoon,
I am looking to use a couple of ZWO ASI cameras with OBS Studio, but I would like to make sure they will work with OBS, I currently have a monochrome camera, which uses the same driver as the color cameras I'm looking to order and I have installed the DirectShow driver provided by the manufacturer that makes the camera visible in the Video Capture Device list, but it doesn't seem to start the camera since I'm not getting any image and the Video Configuration window of the driver doesn't open when I press the button.

I was searching if anyone had the same problem and there was an old forum post from 2016 that mentioned that the monochrome cameras use RAW RGB8 monochrome encoding and that might be the problem but there wasn't any fix mentioned.

The camera does work with XSplit using the DirectShow driver. So is there a file I could install or change so I could get it working with OBS?

Thanks
Oscar
 

mkoch

New Member
Unfortunately there is a bug in the DirectShow driver for monochrome ZWO ASI cameras. The problem is that the only possible pixel format is declared incorrectly as RGB8, but the data is in fact GRAY (or MONO8). The data is correct, but it's 8-bit GRAY and not RGB8.
With FFmpeg it's possible to use the following workaround. The first instance of FFmpeg gets the data from the DirectShow driver in RGB8 pixel format (which in fact is GRAY, but incorrectly declared as RGB8), and passes the raw data via pipe to the second instance of FFmpeg, which interprets the data as pixel format GRAY and shows the correct image on the screen:
ffmpeg -f dshow -video_size 3096x2080 -framerate 30 -pixel_format rgb8 -i video="ASI178MM Camera (ZWO Design)" -map 0 -c copy -f rawvideo pipe:1 | ffmpeg -f rawvideo -video_size 3096x2080 -framerate 30 -pixel_format gray -i pipe:0 -vf format=rgb24 -window_size 1548x1040 -f sdl2 -

I have reported the issue to ZWO, but I doubt they will ever fix it, as the issue is already known since 2016.

Michael
 
Top