quadrotor-IITKgp/bag2video

Name: bag2video

Owner: Aerial Robotics Kharagpur

Description: Convert images in a rosbag to a video

Forked from: OSUrobotics/bag2video

Created: 2017-02-19 13:33:04.0

Updated: 2017-02-19 13:33:05.0

Pushed: 2017-02-19 13:44:40.0

Homepage: null

Size: 8

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.