How to produce compressedVideo #922
-
Hi! A couple of months ago you announced https://foxglove.dev/blog/announcing-h264-support-in-foxglove
Nonetheless, this doesn't seem trivial to do. Do you have any out-of-the-box tooling so the users can create a rosbag with your compressedVideo messages from a normal ROS2 Image message topic? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
There is an experimental tool which converts foxglove.CompressedImage to foxglove.CompressedVideo: https://github.com/foxglove/mcap-videoify |
Beta Was this translation helpful? Give feedback.
-
We do not - video support tends to depend very much on what hardware you have, what libraries you want to use, etc. The ffmpeg transport package approach is viable and it would be good to make a variant that publishes our CompressedVideo messages but it is not something we've done yet. |
Beta Was this translation helpful? Give feedback.
-
For anyone wondering how to test this, these are the steps we did to create the rosbag with the foxglove messages for compressedVideo:
Finally just run the encoding node with the ffmpeg params suits your case
This should produce an |
Beta Was this translation helpful? Give feedback.
For anyone wondering how to test this, these are the steps we did to create the rosbag with the foxglove messages for compressedVideo:
We have to compile this repo: https://github.com/ros-misc-utilities/ffmpeg_image_transport. In the readme are the instructions on how to install the dependencies with rosdep. We have a Fork of that package modified to output directly foxglove compressedVideo msgs you should use https://github.com/kiwicampus/ffmpeg_image_transport/tree/feature/foxglove_compressed_video.
Install image_common because there is image_transport needed to do the decoding. If your image topics have QoS best_effort we encourage you instead to compile it from source from this br…