Help with custom header
Help with custom header
Hello to everyone
i'm new to zoneminder and i can't find a way to access my camera stream .
I know that the address (tested with ffmpeg and ffplay) is this: http://192.168.0.136/livestream/11 but the problem is that works only if i pass this custom header: -headers "Authorization: Basic YWRtaW46" , if i pass user:pass@ip won't work...
The full ffplay command that works well is: ffplay -headers "Authorization: Basic YWRtaW46" -i "http://192.168.0.136/livestream/11"
How could i pass this custom header to my source?
Thanks a lot
Stefano
i'm new to zoneminder and i can't find a way to access my camera stream .
I know that the address (tested with ffmpeg and ffplay) is this: http://192.168.0.136/livestream/11 but the problem is that works only if i pass this custom header: -headers "Authorization: Basic YWRtaW46" , if i pass user:pass@ip won't work...
The full ffplay command that works well is: ffplay -headers "Authorization: Basic YWRtaW46" -i "http://192.168.0.136/livestream/11"
How could i pass this custom header to my source?
Thanks a lot
Stefano
Re: Help with custom header
Usually if you have the stream right and the cam doesn't work it is the resolution you enter in Zoneminder. VLC is a great tool to prove if a cam will work in Zoneminder. To see the resolution you need to use: VLC (Tools, Media Information, Codec) to check camera Display Resolution.
You can also halve the listed resolution to lower the load on the server.
You can also halve the listed resolution to lower the load on the server.
Re: Help with custom header
Thanks a lot for your reply
Unfortunately the problem is that without the custom header authorization i have a 403 unahutorized error
The log:
Unable to open input http://admin:@192.168.0.50/livestream/1 ... audio_data due to: Server returned 401 Unauthorized (authorization failed)
The problem is that i need to pass the custom header instead of admin:pass
So i can't find where i need to put the custom header...
LINK : http://192.168.0.50/livestream/11?actio ... audio_data
ADD FLAG : -headers "Authorization: Basic YWRtaW46"
Using this FLAG i could see the image via ffplay
Again thanks a lot
Stefano
Unfortunately the problem is that without the custom header authorization i have a 403 unahutorized error
The log:
Unable to open input http://admin:@192.168.0.50/livestream/1 ... audio_data due to: Server returned 401 Unauthorized (authorization failed)
The problem is that i need to pass the custom header instead of admin:pass
So i can't find where i need to put the custom header...
LINK : http://192.168.0.50/livestream/11?actio ... audio_data
ADD FLAG : -headers "Authorization: Basic YWRtaW46"
Using this FLAG i could see the image via ffplay
Again thanks a lot
Stefano
Re: Help with custom header
Did you remove the password for posting in the forum? Just checking because it looks like you might have just missed that bit.
Try this, but update password to the real password. You may have done this already but it’s not clear.
http://admin:password@192.168.0.50/live ... audio_data
Try this, but update password to the real password. You may have done this already but it’s not clear.
http://admin:password@192.168.0.50/live ... audio_data
Re: Help with custom header
The OP is saying that putting the username and password in the URL does not work. He wants to use an HTTP connection and pass the credentials in the headers, like you’d do with an API.
Unless it can be done as part of the FFMPEG command, I can’t see how this would happen in ZM without a code change.
Unless it can be done as part of the FFMPEG command, I can’t see how this would happen in ZM without a code change.
-
- makers_mark
- Posts: 20
- Joined: Sun Jul 05, 2020 7:23 pm
Re: Help with custom header
In the 'Source" tab for that monitor under 'Options', have you tried putting:wes93 wrote: ↑Wed Apr 28, 2021 8:48 am Hello to everyone
i'm new to zoneminder and i can't find a way to access my camera stream .
I know that the address (tested with ffmpeg and ffplay) is this: http://192.168.0.136/livestream/11 but the problem is that works only if i pass this custom header: -headers "Authorization: Basic YWRtaW46" , if i pass user:pass@ip won't work...
The full ffplay command that works well is: ffplay -headers "Authorization: Basic YWRtaW46" -i "http://192.168.0.136/livestream/11"
How could i pass this custom header to my source?
Thanks a lot
Stefano
Code: Select all
headers="Authorization: Basic YWRtaW46"
Re: Help with custom header
Thanks a lot for everyone for the help,
@gbruneau, the camera has no password, just the admin and Infact works with custom header
@makers_mark
Unfortunately won't work:
Unable to open input http://@192.168.0.50/livestream/11?acti ... audio_data due to: Server returned 401 Unauthorized (authorization failed)
@Magic919
So you think the only solution it’s hope in a code update?
Best regards
Stefano
@gbruneau, the camera has no password, just the admin and Infact works with custom header
@makers_mark
Unfortunately won't work:
Unable to open input http://@192.168.0.50/livestream/11?acti ... audio_data due to: Server returned 401 Unauthorized (authorization failed)
@Magic919
So you think the only solution it’s hope in a code update?
Best regards
Stefano
Re: Help with custom header
I don't expect it'll happen unless there is a demand for it and some funding. It's not a common use case.
-
Re: Help with custom header
@Magic919
Ok thanks a lot for your reply and your time.
I love zoneminder and the app...
Should you know some other app or suggestion?
Best Regards
Stefano
Ok thanks a lot for your reply and your time.
I love zoneminder and the app...
Should you know some other app or suggestion?
Best Regards
Stefano
Re: Help with custom header
I don't, sorry.
You could ask on the Slack channel, someone might have experience.
You could ask on the Slack channel, someone might have experience.
-
Re: Help with custom header
OK thanks i could try