roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.76k stars 179 forks source link

Jetson Nano password issue #470

Closed luizvaz closed 1 year ago

luizvaz commented 1 year ago

We had a viseron setup working fine with a ubuntu machine running docker. After moving the setup to a Jetson Nano, the cameras didn't connect.

After trying FFmpeg we changed the password. Voila!

The password was something like "blablah!" with an exclamation mark. After changing it to a command-line friendly password it worked.

To make sure it works, I checked if FFmpeg can successfully connect to the stream like this:

ffprobe -v debug -show_error "rtsp://viseron:12345abc%@192.168.0.123:554/Streaming/Channels/102"

ffprobe version a1b534b Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
  configuration: --enable-nvmpi
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
[tcp @ 0x55925abd40] No default whitelist set
[tcp @ 0x55925abd40] Original list of addresses:
[tcp @ 0x55925abd40] Address 192.168.0.123 port 554
[tcp @ 0x55925abd40] Interleaved list of addresses:
[tcp @ 0x55925abd40] Address 192.168.0.123 port 554
[tcp @ 0x55925abd40] Starting connection attempt to 192.168.0.123 port 554
[tcp @ 0x55925abd40] Successfully connected to 192.168.0.123 port 554
[rtsp @ 0x55925bb7c0] SDP:
v=0
o=- 1674544777121904 1674544777121904 IN IP4 192.168.0.123
s=Media Presentation
e=NONE
b=AS:5050
t=0 0
a=control:rtsp://192.168.0.123:554/Streaming/Channels/102/
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:5000
a=recvonly
a=x-dimensions:640,480
a=control:rtsp://192.168.0.123:554/Streaming/Channels/102/trackID=1
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z00AM4qKUFAe3/gACAALYCA=,aO48gA==
a=Media_header:MEDIAINFO=494D4B48010300000400000100000000000000000000000000000000000000000000000000000000;
a=appversion:1.0

[rtsp @ 0x55925bb7c0] video codec set to: h264
[rtsp @ 0x55925bb7c0] RTP Profile IDC: 42 Profile IOP: 0 Level: 29
[rtsp @ 0x55925bb7c0] RTP Packetization Mode: 1
[rtsp @ 0x55925bb7c0] Extradata set to 0x55925c29c0 (size: 29)
[rtp @ 0x55925ab930] No default whitelist set
[udp @ 0x55925c2d80] No default whitelist set
[udp @ 0x55925c2d80] end receive buffer size reported is 131072
[udp @ 0x55925d3040] No default whitelist set
[udp @ 0x55925d3040] end receive buffer size reported is 131072
[rtsp @ 0x55925bb7c0] setting jitter buffer size to 500
[rtsp @ 0x55925bb7c0] hello state=0
[h264 @ 0x55925c2590] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x55925c2590] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x55925c2590] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x55925c2590] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x55925c2590] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x55925c2590] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x55925c2590] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x55925c2590] Format yuvj420p chosen by get_format().
[h264 @ 0x55925c2590] Reinit context to 640x480, pix_fmt: yuvj420p
[h264 @ 0x55925c2590] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    Last message repeated 5 times
[rtsp @ 0x55925bb7c0] All info found
[rtsp @ 0x55925bb7c0] rfps: 24.500000 0.015484
[rtsp @ 0x55925bb7c0] rfps: 24.583333 0.011084
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 24.666667 0.007420
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 24.750000 0.004493
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 24.833333 0.002303
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 24.916667 0.000849
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.000000 0.000131
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.083333 0.000150
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.166667 0.000906
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.250000 0.002398
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.333333 0.004627
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.416667 0.007593
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.500000 0.011295
    Last message repeated 1 times
[rtsp @ 0x55925bb7c0] rfps: 25.583333 0.015733
[rtsp @ 0x55925bb7c0] rfps: 50.000000 0.000525
    Last message repeated 1 times
Input #0, rtsp, from 'rtsp://viseron:12345abc%@192.168.0.123:554/Streaming/Channels/102':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.040000, bitrate: N/A
    Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, progressive, left), 640x480 [SAR 1:1 DAR 4:3], 0/1, 25 tbr, 90k tbn, 180k tbc
[h264 @ 0x55926fbd80] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x55926fbd80] nal_unit_type: 8(PPS), nal_ref_idc: 3

I hope it helps!

roflcoopter commented 1 year ago

Could you explain a bit more what your issue is? Is the problem that you cannot use a password with special characters for your camera?

luizvaz commented 1 year ago

Yes, my camera was something like 12345Abc! with an exclamation mark. After changing the camera password to a command-line safe password it worked.

roflcoopter commented 1 year ago

Will see if i can escape the password somehow to allow for special characters

roflcoopter commented 1 year ago

I tested this just now with the password 123!123! and it worked fine for me, not sure if something has changed Closing this, please feel free to reopen if it is still an issue, and if you do have issues please provide the log so i can troubleshoot since i cant replicate