camera-streamer icon indicating copy to clipboard operation
camera-streamer copied to clipboard

Can't pass a tuning-file as a parameter

Open sosagarcia opened this issue 2 years ago • 6 comments

Hello!,

I use your camera-streamer service in a fluidd web interface to stream what is happening while I'm 3D printing.

I noticed that is not possible to pass a tuning-file as a parameter ( which is something you can do with libcamera ) For example executing: libcamera-still --tuning-file /usr/share/libcamera/ipa/rpi/vc4/ov5647_noir.json -o image.jpg

As I have a NOIR camera in my Raspberry it would be perfect if I could apply to the streaming a tuning file to see a full-color streaming

For example, the imagen2.jpg is how the camera captures the image in infrared. In image.jpg is with a -tuning-file="/usr/share/libcamera/ipa/raspberrypi/ov5647_noir.json" imagen2 image

The closest thing I could get is when I set --camera-options=AwbEnable=true ( see image3.jpg) image3

Do you know if there is a solution for that? In the past, I could manage it by putting awb_auto_is_greyworld=1 in /boot/config.txt in my raspberry pi. But seems is not working anymore...

I would appreciate any help :) thanks

sosagarcia avatar Aug 25 '23 20:08 sosagarcia

Hi, No one can answer? I am also interested in my configuration under Octopi. THANKS

albatorsssx avatar Nov 29 '23 12:11 albatorsssx

I think these can be set with an environment variable.

kbingham avatar Nov 29 '23 14:11 kbingham

	// We have to pass the tuning file name through an environment variable.
	// Note that we only overwrite the variable if the option was given.
	if (tuning_file != "-")
		setenv("LIBCAMERA_RPI_TUNING_FILE", tuning_file.c_str(), 1);

kbingham avatar Nov 29 '23 14:11 kbingham

Oh. Good hack. I guess, this is best solution then.

ayufan avatar Nov 29 '23 14:11 ayufan

Oh great! It works ! So in my case I added the following line in the configuration file /boot/camera-streamer/libcamera.conf

LIBCAMERA_RPI_TUNING_FILE=/usr/share/libcamera/ipa/rpi/vc4/imx219_noir.json

big thanks !

albatorsssx avatar Nov 29 '23 15:11 albatorsssx

I set the environment variable but it seems to just be ignored. Using libcamera-still --tuning-file also works fine for me.

Delivator avatar Feb 11 '24 12:02 Delivator