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

Allow faster file access over HTTP #15

Merged
merged 5 commits into from
Jun 16, 2023
Merged

Conversation

philipnbbc
Copy link
Collaborator

@philipnbbc philipnbbc commented May 26, 2023

This PR adds the following:

  • a mxf2raw and bmxtranswrap --http-disable-seek option that disables seeking for an input file read over HTTP. The file is treated like a stream. In cases where the header partition contains complete metadata, or incomplete if acceptable, and no seeking is required, then using this option can be more efficient as it avoids indexing the partitions and essence positions.
  • a mxf2raw and bmxtranswrap --disable-indexing-files option that is similar and has the same advantages as --http-disable-seek but it is not specific to HTTP and does try read the header metadata from the last partition as it may be more complete. It doesn't prevent the reader from seeking.
  • extends the cases where mxf2raw will output file info (by default) to when there are no options that specifically require an action like reading essence or metadata. mxf2raw --disable-indexing-files will therefore now return the file info.

Addresses #13 (comment)

@donkon
Copy link

donkon commented Jun 7, 2023

First test looks promising, I wait for further feedback from my ARD/ZDF collegues

Copy link

@donkon donkon left a comment

Choose a reason for hiding this comment

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

Everything fine - can be merged to main from my side

Can be used to speed up access in some cases that don't require random
access or access to footer for complete header metadata.

Seeking is enabled by default.
E.g. if `--http-disable-seek` is used then still output the file
info if not other action has been selected.
Using this option will stop the reader indexing the locations of essence.
That is useful if there are many partitions for example and it's more
efficient to not index and instead treat the file as incomplete. It may
not be efficient if essence is read and the --start option is used with a
position not near the start.

The footer is still searched for and used to extract header metadata
(if available). This ensures that the most up-to-date metadata is used.
The footer is found either using the RIP or the footerPartition property
in the header partition pack.
@philipnbbc philipnbbc force-pushed the philipn-faster-http-mxf2raw branch from d3c7cc3 to 81eb62b Compare June 16, 2023 10:28
@philipnbbc
Copy link
Collaborator Author

Thanks for the review.

@philipnbbc philipnbbc merged commit 0a8d6c6 into main Jun 16, 2023
@philipnbbc philipnbbc deleted the philipn-faster-http-mxf2raw branch June 16, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants