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

Converting MCAP files to mp4 #154

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Converting MCAP files to mp4 #154

wants to merge 5 commits into from

Conversation

sh1negg
Copy link
Collaborator

@sh1negg sh1negg commented Dec 24, 2024

Hey there,

after our last meeting, @DerSimi told me, his biggest Christmas wish would be a Python script, which converts MCAP files to their respective mp4 file. With this PR, I'm happily granting this wish 🎄

What was changed

I created mcap_to_mp4.py, which is a Python script, that can extract the video data from a MCAP file and converts said data to a mp4 file. The connection with the CLI will come in a separate PR

How to test

The mcap_file variable defines the path to the MCAP file to be converted. To test this function, you must replace the empty string with a valid path. After running the script, a file called output.mp4 will be created, which contains the video file of the used MCAP file

@sh1negg
Copy link
Collaborator Author

sh1negg commented Dec 24, 2024

Btw, I’ve assigned all of you to the review, but I want to emphasize that there’s no pressure at all to take it on. I just wanted to make sure that whoever has the time and capacity can pick it up.

Copy link
Collaborator

@DerSimi DerSimi left a comment

Choose a reason for hiding this comment

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

Hi Felix, thank you and merry Christmas 🌲🌲🌲 !

Ig your file just wants to show how this works in principle, and it does:
image

So, I won't bother you with creating a more convenient way of selecting a mcap file. :)

We can keep this for now, and the function in it seems reasonable, but are you sure there is only one camera topic? Maybe consider extending extract_mcap_data by argument topic, and rename the function.

Your code also shows how to read all topics, this should also be a part of the CLI connection.

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

Successfully merging this pull request may close these issues.

2 participants