Send short video clip via HTTPS

Completed

Comments

6 comments

  • Avatar
    Roman Yuldashev

    Hello Kyle T,

    The server is not meant to send video to someone else. But I can suggest you this way to do what you want:

    1) Make a rule that creates a bookmark with a specific tag and pre-recording and post-recording parameters on a "Motion on Camera" event  As shown in the screenshot 1.

    2) Make a rule that triggers "Do HTTP Request" on the same event (as shown in screenshot 2) with camearId and other parameters (put given in step 1 tag in the "filters" tab in the requetsts generator)  to an external system. See screen 3.

    In order to get it, you need to have some kind of service on the third party system that can process HTTP requests.

    In my case, the following example:

    https://localhost:7001/ec2/bookmarks?cameraId=c2efc532-c174-9eb1-420f-f6021b29137a&filter=motion1

    3)The external system pulls out bookmark data from the Server using the /etc/bookmakrs API supplied with cameraId and the tag extracted from the HTTP request.

    The expected response is JSON array of objects. It should look similar to show on the scheenshot below.

    You can generate such a request using the generator at THIS link.

    4) The external system downloads the video clip of the bookmark using the "Direct download" facility of Server API. See details in the API documentation.

    In my case, the following example:

    https://192.168.1.42:7001/hls/c2efc532-c174-9eb1-420f-f6021b29137a.mkv?pos=1619800763669&duration=10

    Where the "pos" parameter has the value of the "startTimeMs" parameter taken from the HTTP Request output of step 3 and the "duration" has the value of the "durationMs" parameter converted to seconds.See screen 4.
    In my example I use duration=10 just for simplicity.

    0
    Comment actions Permalink
  • Avatar
    Nyaundi Brian

    Hello Roman,  Thanks for the well explained steps. However i am unable to receive  the Bookmark events.

    Events from Motion detection are showing up okay, What could be the problem?

     

     

     

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Tagir Gadelshin

    Nyaundi Brian
    hi! thanks for reaching out!

    how do you create bookmarks? I see that you use /ec2/bookmarks, but it returns bookmarks, not creates them

    To create a bookmark, please, use /ec2/bookmarks/add

    Also, I see that you use Nx Meta. If you are interested, we release early preview versions, which are located here (see 4.3 versions): https://meta.nxvms.com/downloads/patches
    It contains new bookmarks API that you may find useful
    4.3 should be officially released next year and since then ec2/bookmarks will be supported, but deprecated in favor of new /rest/v1/devices/{deviceId}/bookmarks

    0
    Comment actions Permalink
  • Avatar
    Nyaundi Brian

    Hello Tagir Gadelshin

    Thanks for the quick response,

    I am trying to create the bookmarks using a camera rule, When a motion event is detected.

    Kindly have a look at the last picture i attached.

    I used /ec2/bookmarks to confirm if any bookmark was created

    0
    Comment actions Permalink
  • Avatar
    Tagir Gadelshin

    Nyaundi Brian
    sorry, missed that screenshot

    How does recording is configured? I see that the icon near the camera indicates, that the recording is Scheduled, but Off at the moment. Can you open Camera Settings -> Recording and post a screenshot of the schedule, please?

    And the screenshot of the camera opened on the scene with a timeline (zoomed to last hours) would also help.


    I suspect that recording wasn't happening due to recording schedule, hence bookmarks are not created

    0
    Comment actions Permalink
  • Avatar
    Nyaundi Brian

    Tagir Gadelshin

    You are right, the recording wasn't happening because i was lacking enough storage.

    I am able to receive the bookmark events now.

    0
    Comment actions Permalink

Please sign in to leave a comment.