Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpiCameraTuningFile is not effective #1344

Closed
1 task done
dedeibel opened this issue Dec 30, 2022 · 1 comment
Closed
1 task done

rpiCameraTuningFile is not effective #1344

dedeibel opened this issue Dec 30, 2022 · 1 comment

Comments

@dedeibel
Copy link
Contributor

Which version are you using?

Which operating system are you using?

  • Linux arm64 standard

Describe the issue

The configuration entry of rpiCameraTuningFile for the raspberry pi camera using libcamera is not working. It makes not difference whether it is specified or not.

Describe how to replicate the issue

  1. Have a raspberry pi and camera (v1 noir in my case - but does not matter actually)
  2. Configure with tuning file (see example below)
  3. Start the server
  4. Look at the resulting picture, is has a reddish touch
  5. Expected: Not so much of a reddish touch, results can be compared using libcamera-sill and providing a --tuning-file or not.

Config

Relevant parts:

paths:
  cam:
    source: rpiCamera
    rpiCameraTuningFile: /usr/share/libcamera/ipa/raspberrypi/imx219_noir.json

Did you attach the server logs?

yes

Did you attach a network dump?

no

Logs

I debugged the issue with some printfs and realized that the initialization of LIBCAMERA_RPI_TUNING_FILE in camera.cpp is happening too late. Will add a PR for this.

$ ./rtsp-simple-server 
2022/12/30 14:16:38 INF rtsp-simple-server v0.0.0
2022/12/30 14:16:38 INF [path cam] [rpicamera source] started
2022/12/30 14:16:38 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
hello // CUSTOM PRINTF IN RTSP CODE
w 1296 h 972 - /usr/share/libcamera/ipa/raspberrypi/imx219_noir.json
[17:11:43.229031317] [77964]  INFO Camera camera_manager.cpp:299 libcamera v0.0.2+47-0684c373
BP configurationFile: /usr/share/libcamera/ipa/raspberrypi/ov5647.json // CUSTOM PRINTF IN upstream libcamera code
[17:11:43.331251488] [77965]  INFO RPI raspberrypi.cpp:1423 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
setting tuning file: /usr/share/libcamera/ipa/raspberrypi/imx219_noir.json // CUSTOM PRINTF IN exe/camera.cpp - note, AFTER the init in the libcamera code
env check: /usr/share/libcamera/ipa/raspberrypi/imx219_noir.json // CUSTOM PRINTF, re-read the env var just for checking
[17:11:43.804227963] [77964]  INFO Camera camera.cpp:1026 configuring streams: (0) 1296x972-YUV420 (1) 1296x972-SGBRG10_CSI2P
[17:11:43.805176925] [77965]  INFO RPI raspberrypi.cpp:803 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA
2022/12/30 14:16:41 INF [path cam] [rpicamera source] ready: 1 track (H264)
…
dedeibel added a commit to dedeibel/rtsp-simple-server that referenced this issue Dec 30, 2022
@aler9 aler9 closed this as completed in d15bde3 Dec 30, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant