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

SVO to MP4 (+ downsizing procedure question) #547

Open
2 tasks done
AlexanderKhazatsky opened this issue Apr 3, 2023 · 5 comments
Open
2 tasks done

SVO to MP4 (+ downsizing procedure question) #547

AlexanderKhazatsky opened this issue Apr 3, 2023 · 5 comments

Comments

@AlexanderKhazatsky
Copy link

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, bug report, or anything other than a feature request directly related to this project.

Proposal

I would like to convert SVO files to MP4 files, and at a later time down size them in such a way that is identical to passing in the resolution parameter. What is the exact approach used for downsizing images so that I can replicate it without any distribution shift to my model?

Furthermore, it would be awesome if there was a built in way to convert SVO files to MP4 files without having to compress (live to svo), decompress, and then recompress into a new MP4 file.

Use-Case

Converting from SVO files to a more easily readable and supported format.

Anything else?

No response

@AlexanderKhazatsky AlexanderKhazatsky changed the title What is the downsizing procedure? SVO to MP4 (+ downsizing procedure question) Apr 3, 2023
@AlexanderKhazatsky
Copy link
Author

Bump

@obraun-sl
Copy link
Member

Hi,

You can use the sample for svo export here :
https://github.com/stereolabs/zed-sdk/tree/master/recording/export/svo

You just need to create a single mode left only.
You can resize the image using cv::resize() and adjust the resolution when creating the opencv videowriter
Here : https://github.com/stereolabs/zed-sdk/blob/master/recording/export/svo/cpp/src/main.cpp#L136

Furthermore, it would be awesome if there was a built in way to convert SVO files to MP4 files without having to compress (live to svo), decompress, and then recompress into a new MP4 file.

That is not possible. SVO file contains RAW YUYV side by side image and the MP4 file will contain RGB Left image. So it cannot be the same encoding. it will always require re-encoding.

@AlexanderKhazatsky
Copy link
Author

Hi! The cv2.resize function aside, I wanted to know what resizing scheme was used when we pass in the Zed resolution to the reader functions. Basically, I want to know what resizing parameters to use with cv2.resize so that the resulting images are the same.

@AlexanderKhazatsky
Copy link
Author

For example, bilinear, lanzos, etc. What does the Zed SDK use?

@obraun-sl
Copy link
Member

We use bilinear sampling inside the SDK for direct resizing

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

No branches or pull requests

2 participants