How to replay RTSP video from onvif bridge with a specific time in VLC player?

Dear Sir:

I tried rtsp url down as below in VLC player.It is not work for me.

rtsp://user:123@192.168.1.223:554/control/uuid:44D03279-F54F-4E6C-AC9B-B06B100D9AEC:video/playback?time=epoch time

Is that correct way to search recording video?

Please support to assist me!

RTSP log:

11-03-2022 21-41-04.281: Error - GetCamerNameByUUID: exception, System.FormatException: GUID �����]�t�㦳 4 �ӵ�u�� 32 �ӼƦr (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)�C

�� System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)

�� System.Guid.TryParseGuidWithDashes(String guidString, GuidResult& result)

�� System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result)

�� System.Guid..ctor(String g)

�� VideoOS.OnvifGateway.OnvifMipLibrary.OnvifMipLibraryClass.GetCamerNameByUUID(Int32 userContextIndex, String aCameraUUID, String& aCameraName, String& aErrorLog)

Url reference link:

https://developer.milestonesys.com/s/question/0D73X000007XR80SAG/detail?s1oid=00D200000008Uid&s1nid=0DB0O000000Kzmh&emkind=chatterCommentNotification&s1uid=0050O0000071vmN&emtm=1579636403783&fromEmail=1&s1ext=0

You might want to read this article - https://doc.milestonesys.com/latest/en-US/universaldriver/testing_with_videolan_player.htm

Dear Rie:

Thanks for your support! But it’s still not work.

That’s my config in my vlc player as below.

​Milestone management client’s configI sure live and vod both parameters are work fine.

Does not suitable using below command to seek recording via VLC?

rtsp://user:123@192.168.1.223:5544/control/uuid:44D03279-F54F-4E6C-AC9B-B06B100D9AEC:video/playback?time=epoch time

Which version of VSM are you using? Also, please make sure to use the newest Open Network Bridge version.

Dear Rie:

Sorry! Reply too late! My Milestone is expert 2021R1. Open Network Bridge version is 2022 R1.

Hi Ryan,

I think you’ve misunderstood the thread you are mentioning.

The idea that Tsvetomira explains there is about the RTSP protocol and in particular the “Range: clock=20151019T113705.365Z-” header.

The URL you are trying to use is not in valid format for the RTSP server.

It should be something like (using your example):

rtsp://user:123@192.168.1.223:554/vod/44D03279-F54F-4E6C-AC9B-B06B100D9AEC

If you want to navigate to a specific time, you could set this up via VLC User Interface or starting VLC via command line.

The UI for changing playback parameters looks like this:

If you want to control/start VLC via command line, you could use something like this bat file:

c:
cd "C:\Program Files (x86)\VideoLAN\VLC"
vlc.exe --start-time=3600 --rate=-4.0 "rtsp://admin:Test1234@bgvm-pvv-01:554/vod/F4121B2C-21E5-4312-8399-3172F160E4F3
@ --start-time=3600 - specifies "seek" command to 3600 seconds after begining of the records in the RS DB (relatively to DB start)
@ --rate=-4.0 - specifies speed of the playback - backwards, 4 times higher than normal (for 1 second of the clock time will pass 4 seconds of the recorded video)
@ --rate - supported values [-32.0 : 32.0]. With increase of the speed more and more frames are skipped (otherwise bandwidth becomes unnormeous)

Please bear in mind that VLC supports only seek by relative time - in seconds since the beginning of the DB record.

Dear Petar:

Sorry! Reply too late! First,thank you suggestion.

I know vlc parameter can config start and end time or via command way that i read it from onvif bridage admin manual.

In this project. Our partner final achieve will need develop convert rtsp command to resful api for rtsp replay with specific time.

I found some reference from forum.

So i tried SOAP of FindRecordings via postman.But unfortunately! i stiil fail and got response “Sender not authorized” message after request.

Please refer to attached files my request and response. ​

I have found a lots of reference but still stuck now. The reference about user authentication ,invaild argument, time sync or disable replay attack feature.

Could you help me through this?

Hi @ryan chu

On first look XML seems in correct format. Something in password hash generation however probably fails. I cannot comment on what exactly.

Are you using some built-in implementation ?

On what language / platform are you trying to integrate ?

Dear Petar:

Thank your reply soon.I found issue was using Basic Auth.If i chose Digest Auth is work out.

Now i meet new problem is no recording list from response.

The SearchState Just only show “Completed”

I also tried add option like Max/MinResults or WaitTime.But it does not work.

I found reference from forum.

https://mymilestone.force.com/developer/s/question/0D53X00007Qf5h2SAB/onvif-bridge-getrecordingsearchresults-response-empty

​I follow your post before that to modify the filter.But i seem like the same.

Please to refer attached of GetRecordingSearchResults and FindRecording request.

Great to hear!

I had to mentioned it before - ONVIF interface supports two types of authentication - the older WSSE, when there is a specific XML Security Tag and ad the newer Digest, where you could put authentication HTTP header.

For most integrations Digest is the preferred one as it is supported out-of-the-box in many tools/libraries.

Dear Petar:

Thank you for you support!

I meet another problem of GetRecordingSearchResults

Please refer above section then expand post(Below picture)

Hi @ryan chu

Parameters in FindRecordings seems correctly formed.

Unfortunately error cases in FindRecordings and GetRecordingsSearchResult are not well implemented. In such way you will receive “completed”, even if something is not completely correct with the parameters.

What I could advice you is to play a little bit with the recording filter parameters.

With this string:

boolean(//Track[TrackType= "Video"]),2022-03-28T11:07:43Z,0,0,99999999,20

You are trying to search in the interval from

“2022-03-28T11:07:43Z” to the “unlimited future” for maximum 20 sequences.

So you could:

  • check if there are recordings for the particular camera
  • change “central time” a little bit in the past. Right now it seems to be very close to “now”. And if you try to look for the recordings from “now” to the “future” - you won’t find anything. Bear in mind date-time here is in UTC.
  • try to put before time/count also

Or try all the changes :wink:

If I were you I would try at least:

2022-03-01T11:07:43Z,0,0,99999999,20

2022-03-28T11:07:43Z,99999999,20,0,0

2022-03-28T11:07:43Z,99999999,20,99999999,20

Dear Petar:

Thank you for you kindly support.

Unfortunately! It is still the same problem without recording list show up.I am realy sure recording files exist during 2022.3.26 till 3.28.(snapshot as below)

I was tried your recommand and found some information on internet,but not work out ! Now i do testing about FindRecording command. I don’t know even why without given camera guid token that itstill response a search token?

On the other hand,i found some error in onvif bridage log.

Message like this:

“”“Error - GetConfigurationXml: Configuration not found, add this Onvif Bridge in the Management Client”“”

“”“Error - ServerConfiguration::ReadConfiguration: Configuration data retrival failed hr:0, result:-1, isConfigNull:true”“”"

And now,my Milestone managment and Onvif bridage version is 2021R1.

Please refer attached log.​

@ryan chu

This (error in the log entry) generally means you have to go to the Management Client and create entry with settings for all the ONB services you’ve installed.

@ryan chu

I’ve just tested with this recording filter

boolean(//Track[TrackType="Video"]),2022-04-02T11:07:43Z,99999999,20,0,0

and it works on my side.

So it should be something in the parameters.

P.S. To overcome any possible problem with dates I deliberately put central date for “tomorrow”.