bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
11.41k stars 1.45k forks source link

RaspberryPI zero 2 W Raspbian 64bit error symbol lookup and wrong libcamera references #2442

Closed kanehekili closed 11 months ago

kanehekili commented 11 months ago

Which version are you using?

MediaMTX v1.1.1

Which operating system are you using?

Describe the issue

Using Pi 2w zero with RPICamera Model 3. RTMP via libcamera-vid & ffmpeg works against Youtube.

config (path section)

paths:
   cam: 
     source: rpiCamera

    # ID of the camera
     rpiCameraCamID: 0
    # width of frames
     rpiCameraWidth: 1920
    # height of frames
     rpiCameraHeight: 1080
    # flip horizontally
     rpiCameraHFlip: false
    # flip vertically
     rpiCameraVFlip: false

When starting the first time, it did not find the libcamera modules. Could be fixed with linking both libcamera.so.0.0 and libcamera-base.so to the correct versions (currently 0.0.4)

After linking the camera seemed to be found, then:

[1:12:12.966755669] [1145]  INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70
[1:12:13.127106954] [1149]  INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media3 and ISP device /dev/media1
/dev/shm/rtspss-embeddedexe-1696100886793147684: symbol lookup error: /dev/shm/rtspss-embeddedexe-1696100886793147684: undefined symbol: _ZN9libcamera6Camera21generateConfigurationENS_4SpanIKNS_10StreamRoleELm18446744073709551615EEE
2023/09/30 21:08:07 ERR [path cam] [RPI Camera source] process exited unexpectedly

Furthermore all other rpiCamera entries not included in the above description were not accepted (e.g. rpiCameraBrightness). Message: ERR: yaml: line 306: did not find expected key

Describe how to replicate the issue

After fixing the library names and changed the config file this can be reproduced by simply calling the executable (I have worked as root) :/mediamtx

  1. start the server
  2. publish with ...
  3. read with ...

Did you attach the server logs?

yes

Did you attach a network dump?

not the problem (yet) - didn't come that far....

aler9 commented 11 months ago

Hello, as written in the README, the minimum libcamera version is 0.0.5.

Update libcamera with apt, if you are unable to do so reinstall Raspberry Pi OS by using the latest version.

kanehekili commented 11 months ago

I was fully able to use the apt update/upgrade command - but your "Raspberry Pi Camera path settings" keys are still not interpreted - beginning with "rpiCameraBrightness: 0" .

Update

found out that the "indent" is crucial. I'll look it up in the readme

RickRoz commented 8 months ago

@kanehekili did you ever fixed this? i have the same error as you. except the brightness one The indent is correct with my setup.

aler9 commented 8 months ago

@RickRoz this is not the way to report problems. Open a new issue and provide details in order to replicate. Also take a look at this: #2581