Video format for URL Generator target

Hi there…this weekend's project involved using the SecuritySpy URL generator to tie my cameras into HomeKit via Scrypted. It works wonderfully, but I was curious as to whether there's a way to specify the size and format of the video stream that the URL points to.

Specifically, my cameras are all 4K/30fps, and HomeKit Secure Video would prefer H.264/1080p/2000kbps. Scrypted can transcode in a pinch, but I have a feeling that SecuritySpy would be more efficient for this sort of thing. Thanks!

Comments

  • emergent
    edited August 2022

    For the bitrate, that's something you'll want to change on the camera itself, although not all cameras allow this. When they do it's something you'll probably change through the camera's web interface.

    To change the SecuritySpy stream width, height and codec you would add the arguments to the URL like this:

    rtsp://ipaddress/stream?cameraNum=1&width=1920&height=1080codec=h264

    The codec part isn't really required since it's currently the only option.

    Here's more info:

    https://www.bensoftware.com/securityspy/web-server-spec.html

  • Ah, of course…thanks! I tried this, and it mostly worked. FYI:

    Adding the &width and &height parameters seems to break the &auth parameter. Scrypted couldn't find the stream, and when I loaded the URL in VLC I was prompted to enter a username and password. While not ideal, the username:password@ prefix in the URL worked, and it's up and running as expected.

    Beyond that, exposing all of the parameters in the URL Generator UI would be handy. ;)

  • I wasn't aware that it didn't work with the auth parameter since I have it setup in Scrypted using the username:password prefix as well. Not as secure unfortunately.

  • @Ben, a possible bug (and humble feature request) for you above. :)

  • For security, the auth parameter is tied to the exact URL that is generated - if you change the URL in any way, this breaks the authentication.

    We've now added additional options for video size and frame rate to the URL Generator window in the latest beta version of SecuritySpy (currently 5.5.1b9) so please test this and confirm that this works as expected.

  • Hi, @Ben…thanks for turning this around so quickly! I tried the beta and it works largely as expected.

    I did have one situation where I tried to manually type values into the width and height fields and noticed that the URL didn't update. That said, I was trying to do this for a 1080p video that was rotated 90°, and the app did The Right Thing™ even when the URL was set to width=1920 and height=1080 (the pre-rotation dimensions).

  • Great. Thanks for letting me know about this, you are correct that the URL isn't updating when typing in the values manually, I'll make sure this gets fixed.