new source path

Current Development version likely to have breaking changes
Post Reply
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

new source path

Post by dougmccrary »

How do I cram this from 1.36.25 into .21?

rtsp://192.168.1.217:554/user=admin_password=Buffy4@sdCA_channel=0_stream=1.sdp?real_stream

gave
Screenshot from 2022-09-13 01-58-19.png
Screenshot from 2022-09-13 01-58-19.png (33.84 KiB) Viewed 1386 times
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: new source path

Post by iconnor »

@ symbols really mess up url parsing. All the special characters are not valid in a URL. They have to be % encoded. So the @ has to be %40

https://www.w3schools.com/tags/ref_urlencode.ASP
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path

Post by dougmccrary »

Yes, but that's not really part of the the URL, is it? anyway I changed it in 1.36 and copy/paste into 1.37, and it does this:
Screenshot from 2022-09-13 22-09-21.png
Screenshot from 2022-09-13 22-09-21.png (17.5 KiB) Viewed 1346 times
and looks like this on the console
Screenshot from 2022-09-13 22-04-42.png
Screenshot from 2022-09-13 22-04-42.png (19.63 KiB) Viewed 1346 times
but it doesn't work on either...because the camera wants the plain @, I suppose.

This works in 1.36
Screenshot from 2022-09-13 22-18-55.png
Screenshot from 2022-09-13 22-18-55.png (40.47 KiB) Viewed 1345 times
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: new source path

Post by iconnor »

We are going to need to see debug logs.

Everything in the url is url and must be properly encoded. Just because it generally works, doesn't mean it is correct.

This is actually why we now have the separate username and password fields, to deal with weird characters in the password.

But this cam wants it in the query part of the url. We are probably url-encoding what we are given before sending to the cam, and so we have a double url-encoding. At least that's my suspicion.
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path

Post by dougmccrary »

OK. Makes sense.

So what log(s) do you need?

Please give settings as I don't really understand how those settings work - Maybe because I didn't restart after trying change them?
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: new source path

Post by iconnor »

Options->Logging->ZM_DEBUG checked
LOG_DEBUG_TARGET => clear or _zmc
LOG_DEBUG_LEVEL => 3

restart. Then /var/log/zm/zmc_mwhateveridnumber.log should have lots of great debugging info.

I was under the impression that the console should filter auth etc out of the source url. This is controlled by Options->Web->WEB_FILTER_SOURCE
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path

Post by dougmccrary »

I have the web filter turned off.
I’ll get back later with the log.
Thanks!
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path

Post by dougmccrary »

Not sure this says much useful.

Code: Select all

09/16/22 00:33:16.564975 zmc_m19[92491].ERR-zmc.cpp/267 [Failed to prime capture of initial monitor]
09/16/22 00:33:22.605734 zmc_m19[92491].ERR-zm_ffmpeg_camera.cpp/323 [Unable to open input rtsp://192.168.1.219:554/user=admin_password=Buffy4%40sdCA_channel=0_stream=1.sdp?real_stream due to: Server returned 4XX Client Error, but not one of 40{0,1,3,4}]
09/16/22 00:33:22.605798 zmc_m19[92491].ERR-zmc.cpp/267 [Failed to prime capture of initial monitor]
09/16/22 00:33:29.636744 zmc_m19[92491].ERR-zm_ffmpeg_camera.cpp/323 [Unable to open input rtsp://192.168.1.219:554/user=admin_password=Buffy4%40sdCA_channel=0_stream=1.sdp?real_stream due to: Server returned 4XX Client Error, but not one of 40{0,1,3,4}]
09/16/22 00:33:29.636910 zmc_m19[92491].ERR-zmc.cpp/267 [Failed to prime capture of initial monitor]
09/16/22 00:33:37.661843 zmc_m19[92491].ERR-zm_ffmpeg_camera.cpp/323 [Unable to open input rtsp://192.168.1.219:554/user=admin_password=Buffy4%40sdCA_channel=0_stream=1.sdp?real_stream due to: Server returned 4XX Client Error, but not one of 40{0,1,3,4}]
09/16/22 00:33:37.661927 zmc_m19[92491].ERR-zmc.cpp/267 [Failed to prime capture of initial monitor]
09/16/22 00:33:46.695421 zmc_m19[92491].ERR-zm_ffmpeg_camera.cpp/323 [Unable to open input rtsp://192.168.1.219:554/user=admin_password=Buffy4%40sdCA_channel=0_stream=1.sdp?real_stream due to: Server returned 4XX Client Error, but not one of 40{0,1,3,4}]
09/16/22 00:33:46.695496 zmc_m19[92491].ERR-zmc.cpp/267 [Failed to prime capture of initial monitor]
09/16/22 00:33:56.696152 zmc_m19[92491].ERR-zm_ffmpeg_camera.cpp/323 [Unable to open input rtsp://192.168.1.219:554/user=admin_password=Buffy4%40sdCA_channel=0_stream=1.sdp?real_stream due to: Immediate exit requested]
I notice the user and password fields are not shown when used, even with the web filter turned off. Not sure I like that.
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: new source path

Post by iconnor »

You didn't follow my instructions for turning on debug. Those logs contain no debugging info.
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path

Post by dougmccrary »

Yeah, that's what I thought.
Options->Logging->ZM_DEBUG checked (LOG_DEBUG ?)
LOG_DEBUG_TARGET => clear or _zmc
LOG_DEBUG_LEVEL => 3
So maybe something else is wonky?
Screenshot from 2022-09-16 13-47-18.png
Screenshot from 2022-09-16 13-47-18.png (81.76 KiB) Viewed 1232 times
Screenshot from 2022-09-16 13-48-02.png
Screenshot from 2022-09-16 13-48-02.png (98.57 KiB) Viewed 1232 times
then
$ sudo service zoneminder restart
And even a reboot...
and LOG_DEBUG_TARGET blank and _zmc along with LOG_DEBUG_LEVEL UP TO 9
So I'm at a loss.
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: new source path

Post by iconnor »

Ok, LOG_LEVEL_FILE also needs to be set to DEBUG
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path log

Post by dougmccrary »

Code: Select all

[attachment=0]zmc_m19.log[/attachment]
Might be truncated, but I think it's probably a full set...
Attachments
zmc_m19.log
(94.85 KiB) Downloaded 53 times
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: new source path

Post by iconnor »

Wow... 451 not available due to legal reasons!

I think what we need to do here, is smarten up the username/password stripping out code so that it doesn't mange the url. I don't really understand why it doesn't like the % encoded url... but at the end of the day I think we should send what the user has put in regardless of whether it is right or not.

So... stay tuned.
dougmccrary
Posts: 1174
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: new source path

Post by dougmccrary »

Yeah, I have very mixed feelings about that, but I guess ya gotta do what works.

Thanks for your time.
Post Reply