Accessing Playback Video Records Using ONVIF Bridge

Hi

we need to get video records from milestone in our software. so we are using Milestone ONVIF Bridge. the installation is completed and ODM is login successfully but there is problem the streams is not available but the camera is working fine. here is a screenshot from ODM software:

Also i tried to access the stream using FFMPEG. but it stay stuck on this :

and the there is not errors in the logs of Onvif Device Manager.

Thanks for reading and appreciate any help

Hi, @Abaas Mahroos

Does your user have proper access rights for the camera? Were you able to play video from Smart client or Web client? Please provide a WireShark capture and ONVIF+RTSP logs.

Hi @Nikolay Dimitrov

Yes the user have Administrators role and smart client access the camera without any issues.

logs in file logs.txt

The errors happened after i tried to fetch the stream using VLC and i got this

Your input can't be opened:
VLC is unable to open the MRL 'rtsp://haider:haider@desktop-0ve7n61:554/live/aafcf0e3-7db6-4c6c-935e-6a2ed4d94d9c'. Check the log for details.

+ Is using ONVIF Bridge is the only way to get the playback records because base on my research i didn’t find another way. we already using AI Bridge so if it possible to get the videos records from it will be way better then using other tools.

Thanks for help

Best Regards

Are you sure both user user and password are haider?

According to RTSP logs, credentials are incorrect.

Regarding AI bridge, I cannot really answer, but I can ask a colleage to do so.

the basic user i use in ONVIF installation is not haider which is the user that have Administrators, and the user in ONVIF plugin is haider and the password also haider. FYI i have used the IP Address in fetching the stream and i got 404 Resource Not Found so i used the host name since milestone uses the hostname in login with smart client and managment client.

And yes please ask your colleague if we can use AI Bridge in accessing video records

Thanks Again

Best Regards

> the basic user i use in ONVIF installation

I guess you mean domain user? ONB service user (the one you provide during installation) is not a basic user. It’s AD user. Can you please make sure this user has admin access?

Also - what version of Open Network Bridge and Corporate do you have installed. It looks quite old to me.

In RTSP logs I can see something is quite off:

09-04-2025 13-26-36.528: Error - ImplementerHelper::GetRecorderServerUrl: GetRecorderServerUrl failure, hr:0, result:0, recorderURLIsNull:true

Make sure that your ONB machine has access to your recording server by hostname and IP.

Again - please provide WireShark logs from the machine of the ONB server. It should capture ONB restart and a connection attempt from ODM and ffmpeg/VLC.

@Nikolay Dimitrov​ Hi

What I mean is the basic user that created from management client, which I can use to log in into Smart Client, Management client, even AI Bridge. So I was trying to use it.

Now I have used the same user that I used in the installation, and it works, thank you.

But just to be clear if I should use the same user in used in installation, what are the ONVIF users for?

And one last question. In FFMPEG, I can’t specify the time range in header because the header option is not exists. So what should I use??

Thanks again for help

Hi Abaas,

just to confirm: Yes, you can access recorded video using AI Bridge, but only through the gRPC (“ds”) streaming endpoint (that is, not RTSP).

Hi @Abaas Mahroos

Happy to hear you made it work with another user.

To try answer your question - ONVIF users in that list should already be defined in Security → Basic users and added to a proper group in Security → Roles. If you add them properly in all places, haider should work, too.

But your product version is quite old. ONVIF user handling is no longer in Management client.

In relation to ffmpeg - I don’t have much experience with it, but it seems possible. See this example.

@Hans Kierulff

Hi Hans

Happy to hear that, which will make a lot of work for use much easier. so can you just provide docs or some reference of how to use it ?

Hi @Nikolay Dimitrov

so you mentioned that the Product version quite old. but i couldn’t find any other version of ONVIF Bridge in the website. we are using XProtect 2024

That’s strange. As you can see below, new versions are available on Milestone’s download page.

Hi @Abaas Mahroos​ ,

gRPC streaming is documented in the Reference Manual in your live installation or downloadable from Reference manual | NVIDIA NGC, under the StreamAvailability subject. There’s link to a .proto file you use to develop your IVA client. Look for the PlaybackRequest message.

Please note, you’ll retrieve the video as fast as it can be delivered and you can consume it - typically faster than an actual playback speed. If you need to watch/process the video in normal speed, you have to clock the frames utilizing their timestamps.

To add on what @Hans Kierulff​ has said, I’ve attached a sample (written in go) that can fetch playback video (pulling from AI Bridge)

Hi @Lisber Pontes

Thank you, that was very helpful since I didn’t understand a lot from the documentation.

But I still have a problem with the example you provided. I have set my configuration in .env files:

AIB_HOSTNAME="192.168.0.250"
IDP_HOSTNAME="http://192.168.0.250/IDP/" # For example http://esvm-ft17-40.milestone.dk/IDP
IDP_USER="USERNAME"
IDP_PASSWORD="PASSWORD"
CAMERA_ID="aafcf0e3-7db6-4c6c-935e-6a2ed4d94d9c" # For example bfcb0e43-568b-4d3d-9ee9-9fd718917fb6 be sure to use lowercase letters
STREAM_ID="28dc44c3-079e-4c94-8ec9-60363451eb40" # For example 28dc44c3-079e-4c94-8ec9-60363451eb40 be sure to use lowercase letters
START_DATE_UTC="2025-04-11 11:11" #In the following format: YYYY-MM-DD HH:MM observe the hyphens and colon, use 24h clock
END_DATE_UTC="2025-04-11 12:12" #In the following format: YYYY-MM-DD HH:MM observe the hyphens and colon, use 24h clock

First I used hostname, but it always says unknown hostname even when i test it with ping it works. Then, when I used AI Bridge IP, I got this :

01:54:57.671684 failed getting playback data.  rpc error: code = Unknown desc = Error routing stream: Unknown stream

and in the aibridge-connector logs, I’m also getting this:

2025-04-15T22:29:34Z Error routing stream: Unknown stream

2025-04-15T22:38:55Z Error routing stream: Unknown stream

2025-04-15T22:41:12Z Error routing stream: Unknown stream

2025-04-15T22:41:41Z Error routing stream: Unknown stream

2025-04-15T22:43:53Z Error routing stream: Unknown stream

2025-04-15T22:48:32Z Error routing stream: Unknown stream

2025-04-15T22:49:29Z Error routing stream: Unknown stream

2025-04-15T22:52:53Z Error routing stream: Unknown stream

can you help me with that?

Again, thanks for helping.

Best Regards

mind that if you’re running the app as in the zip (not containerized) that means that AI Bridge should be running in “debug mode”.

if you’re using docker-compose installation, that means using the ‘docker-compose.yml’ file

if you’re using k8s, that means setting the parameter:

general:
  debug: true

Why ?

AI Bridge enforces the usage of containerized apps so the security boundaries lies within the AI Bridge network.

Also mind running the graphQL query:

query getCameras {
  
  cameras {
    id
    name
    description
#videoStreams(streamID: "c5582991-f119-4fb0-8c5f-4f6dbb78e36b/28dc44c3-079e-4c94-8ec9-60363451eb40")
    videoStreams {
      id
      name
      description
      videoCodec
      videoResolution {
        width
        height
      }
      videoFrameRate
      streamAvailability {
        rtsp
      }
    }
  }
}

And getting the cameraID+streamID:

In the response grab them from:

 "videoStreams": [
          {
            "id": "0bea3d7f-c16c-4f81-8898-5ce27c6bdca6/cd8b282a-3745-4c3b-b2be-9cc76f689db9",

The first guid is the cameraID + / + streamID

Maybe you were setting the wrong values in your env file.

Hi @Lisber Pontes

we are using docker compose to run the AI Bridge. and i just use the zip file that you giave me to run the go app.

for the stream i was setting the values just like you explain and it still the same :

        "videoStreams": [
          {
            "id": "aafcf0e3-7db6-4c6c-935e-6a2ed4d94d9c/28dc44c3-079e-4c94-8ec9-60363451eb40",

Hi there,

Let us know:

1 - Which version of XPCO are you targeting.

2 - Which version of AI Bridge are you using.

3 - Attach the logs from ‘/var/log/aib’

Hi @Lisber Pontes

1- i don’t know that you mean by XPCO do you mean XProtect?

2– we are using 3.2 version

3- I didn’t find this file in the file system, is it inside a container ? And if so, which containers ?

Hi @Abaas Mahroos​ ,

1 - Yes, I meant XProtect, which version are you using ?

2 - AI Bridge latest is 2.0, please verify which version of AI Bridge are you using (should be stated in the .env file)

3 - Since AI Bridge 1.7.2 (July 2024): (From release-notes: Log files are mounted in volumes, in host: `/var/log/aib/[container-name]/`- i.e `/var/log/aib/aibridge-webservice/webservice.log`)