Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Recording - Seektable attribute in cloud object metadata #446

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

MaximeBdrd
Copy link
Contributor

With the Cloud Recording feature, the devices will push video files (or "segments" in this context) on cloud object storage. When a user wish to playback these files, if they are big enough the callup time will be delayed by the need to download the entire file. This is especially true if the user wish to use HLS or MPEG-DASH to play video across multiple files.

By adding a simple seek table in the metadata of the blob, a video player could download a smaller part to start playing faster. It also allows the player to only download the parts that the user wants to play, and thus seeking in the file more efficiently.

This seek table leverage the fact that a file (or segment in this context) can be built of multiple individual and autonomous fragments according to the CMAF/fragmented MP4 standards.

Accessing this information in the metadata is much faster (and less costly) than downloading part of the file to parse the "SIDX" box at the start (or "MFRA" at the end); which are currently optional. Additionally, this feature would be compatible with a potential future full-file encryption option.

@HansBusch
Copy link
Member

I prefer to refer to existing standards as much as possible.
Mentioning of full file encryption is an important point. We should analyze how decryption can start at random fragments.

@sujithhanwha
Copy link
Contributor

Is this seek table object attribute mandatory or optional ? concerned about the extra work on the device (mainly multi source cameras) side to create this table additionally and dynamically merge fragment offset to maintain a list not exceeding 20 for each track (audio, video and metadata) separately in case of CMAF.

@MaximeBdrd
Copy link
Contributor Author

This seek table object would be optional, like all other blob metadata fields. It's presence doesn't add much functionality, but can improve greatly performance of some use cases.

@HansBusch
Copy link
Member

Instead of defining own format suggest to use hex or base64 encoded MP4 track random access box (TRAF). Please note that this information typically can only be written after file upload has completed which may introduce extra cost depending on provider policies.

@MaximeBdrd
Copy link
Contributor Author

MaximeBdrd commented Sep 7, 2024

I updated this PR and applied Hans's recommendations. Please have a look again :)
JF and José will be available at the face-to-face to discuss the implications of this change.
Note: I used the MFRA (movie fragment random access) box instead of the TFRA to support the format where there are multiple tracks in the file. The only difference is that MFRA can contain one or multiple TFRA boxes.

Copy link
Contributor

@kieran242 kieran242 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had rendered the RecordingControl.xml in Internet Explorer to read the content as per specification an issue in rendering the SGV file.

<title>Typical structure of a Movie Fragment Random Access ('mfra') box</title>
<mediaobject>
<imageobject>
<imagedata fileref="media/RecordingControl/seekTableStructure.svg" contentwidth="130mm"/>
Copy link
Contributor

@kieran242 kieran242 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Image is not rendering for the seekTableStructure.svg. All I see is the following issue rendering the image outside the scope of the document.

SeekTableStructure_Not_Rendering_Issue

I believe what I should be seeing is the following file rendered;

SeekTableStructure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned Internet Explorer? Is that a goal to be able to render in there? That's been discontinued/end-of-life/retired two years ago and removed from most Windows installations and I certainly did not expect to hear about it in 2024! 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha!!, I took down the full PR and opened the recording xml in Microsoft Edge and rendered the file in compatibility mode. The same issue will happen when published on the ONVIF web site. It will need fixed 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm learning about the publishing process apparently, wasn't aware it relied on the IE engine :o I guess we could replace the SVG with a regular image if there's issue rendering that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't actually render the xml/svg in the browser when we publish, as we ship the pdf on the onvif website. So I don't think this will be an issue if it renders properly in the generated PDF

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a side note, its possible the contentwidth or some other property is badly set which triggers that time of rendering

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned by the colleagues, rendering of the development pages requires a state of the art browser base like Chromium, Firefox or Safari. Edge is nowadays based on Chromium. Compatibility mode is no option.

Copy link
Contributor

@kieran242 kieran242 Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HansBusch I use Edge and Chrome.

To be reasonable and it is an expectation that all content of a specification inclusive of images should render properly regardless of what browser you use to review the content.

I do agree with @jflevesque-genetec that it should display properly in the PDF! Does it?

The primary point before it is missed by all !! Is that the image in the recordingcontrol.xml is not rendering as being shown in the screen shot and the images in the rest of the file do render correctly!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kieran242 could you tell us how you render the page? Because on my side, it seems to render fine (and scales properly if I zoom in/out)
image

Copy link
Contributor

@kieran242 kieran242 Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jflevesque-genetec I was using the link https://developer.onvif.org/pub/specs/ and selected branches/video/seektable-cloud-recording/doc/RecordingControl.xml.

I have just went and reviewed the same on Edge, and Chrome and it is rendering now. Did you make an update? If not ??? if so renders great :)

I have just re-reviewed and I also see it is for 25.12. Is there more update for this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants