Convert images in a rosbag to a video
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore Initial commit Aug 27, 2013
LICENSE Update org name in license Aug 28, 2013
README.md Note about variable framerates Oct 16, 2013
bag2video.py fix method names for CV2 module Feb 7, 2018
manifest.xml Update author Apr 22, 2014

README.md

bag2video

Convert images in a rosbag to a variable framerate video. Variable framerate is achieved through duplicating frames since OpenCv can't encode at variable framerates. This can produce very large files which should be re-encoded with something like ffmpeg.

Usage

usage: bag2video.py [-h] [--outfile OUTFILE] [--precision PRECISION] [--viz]
                    [--start START] [--end END] [--encoding {rgb8,bgr8,mono8}]
                    topic bagfile

Extract and encode video from bag files.

positional arguments:
  topic
  bagfile

optional arguments:
  -h, --help            show this help message and exit
  --outfile OUTFILE, -o OUTFILE
                        Destination of the video file. Defaults to the
                        location of the input file.
  --precision PRECISION, -p PRECISION
                        Precision of variable framerate interpolation. Higher
                        numbers match the actual framerater better, but result
                        in larger files and slower conversion times.
  --viz, -v             Display frames in a GUI window.
  --start START, -s START
                        Rostime representing where to start in the bag.
  --end END, -e END     Rostime representing where to stop in the bag.
  --encoding {rgb8,bgr8,mono8}
                        Encoding of the deserialized image.