Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

rpiCamera: selected camera is not available #76

Open
b23prodtm opened this issue Nov 16, 2024 · 4 comments
Open

rpiCamera: selected camera is not available #76

b23prodtm opened this issue Nov 16, 2024 · 4 comments

Comments

@b23prodtm
Copy link
Owner

bluenviron/mediamtx#3715

need to fix it with new mediamtx binary

@b23prodtm
Copy link
Owner Author

b23prodtm commented Nov 24, 2024

webcam 2024/11/24 23:16:24 ERR [path cam] [RPI Camera source] write /dev/shm/mediamtx-rpicamera-1732490184528493204/ipa_conf/rpi/pisp/imx219.json: no space left on device

@b23prodtm
Copy link
Owner Author

b23prodtm commented Dec 6, 2024

Setting SHM_SIZE=10G fix issue of available space, in the above comment.

But the selected camera's still not available:
Actually a bug in the mediamtx binary causes thee error with raspberrypi camera module use

@b23prodtm
Copy link
Owner Author

 webcam  2024/12/08 11:47:18 INF [RTSP] [conn 127.0.0.1:56180] opened
 webcam  2024/12/08 11:47:19 INF [RTSP] [conn 127.0.0.1:56180] closed: no one is publishing to path 'cam'
 webcam  Input #0, video4linux2,v4l2, from '/dev/video0':
 webcam    Duration: N/A, start: 100359.982244, bitrate: N/A
 webcam      Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 12 tbr, 1000k tbn, 1000k tbc
 webcam  Stream mapping:
 webcam    Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
 webcam  Press [q] to stop, [?] for help
 webcam  [libx264 @ 0x55bac2d830] using cpu capabilities: ARMv8 NEON
 webcam  [libx264 @ 0x55bac2d830] profile High 4:2:2, level 2.2, 4:2:2, 8-bit
 webcam  [libx264 @ 0x55bac2d830] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
 webcam  2024/12/08 11:47:20 INF [RTSP] [conn 127.0.0.1:64878] opened
 webcam  2024/12/08 11:47:20 INF [RTSP] [session d72e9b05] created by 127.0.0.1:64878
 webcam  [rtsp @ 0x55bac2b300] method SETUP failed: 461 Unsupported Transport
 webcam  2024/12/08 11:47:20 INF [RTSP] [session d72e9b05] is publishing to path 'webcam', 1 track (H264)
 webcam  Output #0, rtsp, to 'rtsp://127.0.0.1:8554/webcam':
 webcam    Metadata:
 webcam      encoder         : Lavf58.45.100
 webcam      Stream #0:0: Video: h264 (libx264), yuvj422p(pc), 640x480, q=-1--1, 12 fps, 90k tbn, 12 tbc
 webcam      Metadata:
 webcam        encoder         : Lavc58.91.100 libx264
 webcam      Side data:
 webcam        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 webcam  frame=    2 fps=1.7 q=0.0 size=N/A time=00:00:00.00 frame=   16 fps=9.3 q=22.0 size=N/A time=00:00:00.66 bitrate=[27:52:44.084770156] [37]  INFO Camera camera_manager.cpp:325 libcamera v0.3.2+27-7330f29b-dirty (2024-12-02T23:04:17UTC)
 webcam  frame=   51 fps= 23 q=22.0 size=N/A time=00:00:03.582024/12/08 11:47:21 ERR [path cam] [RPI Camera source] camera_create(): selected camera is not available
 webcam  frame=   57 fps= 21 q=22.0 size=N/A time=00:00:04.08frame=   63 fps= 19 q=18.0 size=N/A time=00:00:04.58 bitrate=frame=   70 fps= 19 q=22.0 size=N/A time=00:00:05.16 bitrate=2024/12/08 11:47:23 INF [RTSP] [conn 127.0.0.1:64884] opened
 webcam  2024/12/08 11:47:23 INF [RTSP] [conn 127.0.0.1:64884] closed: no one is publishing to path 'cam'
 webcam  frame=   76 fps= 18 q=22.0 size=N/A time=00:00:05.66frame=   82 fps= 17 q=22.0 size=N/A time=00:00:06.16 bitrate=frame=   88 fps= 17 q=23.0 size=N/A time=00:00:06.66 bitrate=frame=   94 fps= 16 q=22.0 size=N/A time=00:00:07.16 bitrate=frame=  100 fps= 16 q=22.0 size=N/A time=00:00:07.66 bitrate=frame=  106 fps= 16 q=22.0 size=N/A time=00:00:08.16 bitrate=2024/12/08 11:47:26 INF [RTSP] [conn 127.0.0.1:64894] opened
 webcam  2024/12/08 11:47:26 INF [RTSP] [conn 127.0.0.1:64894] closed: no one is publishing to path 'cam'
 webcam  frame=  112 fps= 15 q=22.0 size=N/A time=00:00:08.66frame=  118 fps= 15 q=22.0 size=N/A time=00:00:09.16 bitrate=frame=  124 fps= 15 q=23.0 size=N/A time=00:00:09.66 bitrate=frame=  130 fps= 15 q=22.0 size=N/A time=00:00:10.16 bitrate=frame=  136 fps= 15 q=22.0 size=N/A time=00:00:10.66 bitrate=frame=  142 fps= 14 q=22.0 size=N/A time=00:00:11.16 bitrate=frame=  149 fps= 14 q=22.0 size=N/A time=00:00:11.75 bitrate=frame=  155 fps= 14 q=22.0 size=N/A time=00:00:12.25 bitrate=frame=  161 fps= 14 q=22.0 size=N/A time=00:00:12.75 bitrate=2024/12/08 11:47:31 INF [RTSP] [conn 127.0.0.1:65500] opened
 webcam  frame=  167 fps= 14 q=22.0 size=N/A time=00:00:13.252024/12/08 11:47:31 INF [RTSP] [conn 127.0.0.1:65500] closed: no one is publishing to path 'cam'
 webcam  [27:52:54.320206514] [41]  INFO Camera camera_manager.cpp:325 libcamera v0.3.2+27-7330f29b-dirty (2024-12-02T23:04:17UTC)
 webcam  frame=  173 fps= 14 q=22.0 size=N/A time=00:00:13.752024/12/08 11:47:32 ERR [path cam] [RPI Camera source] camera_create(): selected camera is not available
2024/12/08 11:47:35 INF [RTSP] [conn 127.0.0.1:65516] opened=N/A dup=7 drop=0 speed=1.08x    1.11x  

@b23prodtm
Copy link
Owner Author

b23prodtm commented Dec 8, 2024

image

This screenshot was taken using an usb Microsoft Video Camera

MTX_PATH: webcam as defined in YAML RTSP-configuration

Send the command to the webcam container ./config_mtx.sh webcam to switch to USB video

And the stream can be read as rtsp://127.0.0.1:8554/webcam or anything else for the host IP

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