Created
January 14, 2018 16:07
-
-
Save jokla/587c647c1372fa19fbcd22918a533b84 to your computer and use it in GitHub Desktop.
rosbag record image and export to video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rosbag record -O test2.bag /image_color | |
- Create a file export_img_rosbag.launch: | |
<launch> | |
<node pkg="rosbag" type="play" name="rosbag" args="-d 2 $(find carla_ros)/launch/test.bag"/> | |
<node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="ROS_HOME"> | |
<remap from="image" to="/image_color"/> | |
</node> | |
</launch> | |
$ roslaunch export_img_rosbag.launch | |
mkdir test | |
mv ~/.ros/frame*.jpg test/ | |
cd test | |
ffmpeg -framerate 1 -i frame%04d.jpg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p -f rawvideo output.h264 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment