![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.1.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.1.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.1.1 (2019-02-07)
- Fixed permissions.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
bag_tools | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
![]() |
movie_publisher package from movie_publisher repomovie_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.2.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | kinetic-devel |
Last Updated | 2019-03-17 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package is meant to work with moviepy. However, due to packaging issues, moviepy cannot be installed automatically as a dependency. There’s a fallback using OpenCV, which is however worse. Please, install moviepy manually calling:
sudo pip install moviepy
or
rosdep install python-moviepy-pip
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. It also allows starting animage_transport/republish
node that converts the video stream from raw to compressed/theora. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A batch script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps. -
merge.py
: A copy of srv_tools/merge.py which is not available in indigo.
movie_publisher_node
The node can run with either of two backends - moviepy
and opencv
. moviepy
is strongly recommended, as it uses
ffmpeg
, which is quite versatile and efficient. Is you do not set the backend
param, autodetection is run.
Published topics
-
movie
(sensor_msgs/Image
): The published movie, in raw format.
Node-private parameters:
-
movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
start
(float|tuple|string, optional): If set, playback will start from the specified time. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withend
andduration
. -
end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andduration
. -
duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Can be expressed in seconds(15.35)
, in(min, sec)
, in(hour, min, sec)
, or as a string:'01:03:05.35'
. Cannot be set together withstart
andend
. -
loop
(bool, default False): Whether to loop the movie until the node is shut down. Exludesimmediate
. -
immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can setfake_time_start
if you want these timestamps to begin from a non-zero time. Excludesloop
. -
playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
fake_time_start
(float, default 0.0): Used withimmediate
to specify the timestamp of the first message. -
frame_id
(string, default “”): The frame_id used in the messages’ headers. -
spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
verbose
(bool, default False): If True, logs info about every frame played. -
wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher. -
backend
(string, default “moviepy”): The backend to use for reading video. Eithermoviepy
oropencv
. Ifmoviepy
is selected and not found,opencv
will be used (which might support less codecs). -
ffmpeg
(string, default “”): If nonempty, specifies the (absolute) path to the ffmpeg binary to use.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
Additionally, it takes these arguments:
-
transport
(string, default'raw'
): Type of the image transport. The launch file will start up animage_transport/republish
node that publishes the video encoded to this transport type. -
republished_topic_basename
(string, defaultmovie_$(arg transport)
): Base name of the topic that will serve the republished messages. Full name of the topic will be$(arg republished_topic_basename)/$(arg transport)
(or$(arg republished_topic_basename)
in case ofraw
transport). The base name cannot be the same as the topic themovie_publisher_node
subscribes to (movie
by default).
movie_to_bag
Convert a movie file to a bag file with video topic.
It is a Bash script with ROS node-like API - you pass it parameters via _param:=value
on commandline or via ROS param
server.
File truncated at 100 lines see the full file
Changelog for package movie_publisher
1.2.2 (2019-03-07)
- Made imageio and moviepy mandatory dependencies (they will be removed from package.xml in release repo)
- Contributors: Martin Pecka
1.2.1 (2019-02-07)
- Fixed permissions.
- Kinetic release.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
- Contributors: Martin Pecka
1.0.1 (2019-01-25)
- Fixed install rule.
- Documented all tools in readme.
- Added support for rewriting timestamps from TF messages.
- Fix Python3 compatibility. Added fix_bag_timestamps.
- Added readme.
- Initial commit.
- Contributors: Martin Pecka
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
cv_bridge | |
python-moviepy-pip | |
rosbash_params | |
rospy | |
sensor_msgs |
System Dependencies
Dependant Packages
Launch files
- launch/movie_publisher.launch
-
- movie_file
- transport [default: raw]
- republished_topic_basename [default: movie_$(arg transport)]
- fps [default: ]
- loop [default: false]
- start [default: ]
- end [default: ]
- duration [default: ]
- frame_id [default: ]
- immediate [default: false]
- playback_rate [default: ]
- fake_time_start [default: 0.0]
- spin_after_end [default: false]
- verbose [default: false]
- wait_after_publisher_created [default: 1.0]
- backend [default: moviepy]
- ffmpeg [default: ]
- publisher_queue_size [default: 10]
- publisher_queue_size [default: 1000]
- required [default: true]
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
Package Summary
Tags | No category tags. |
Version | 3.0.3 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/peci1/movie_publisher.git |
VCS Type | git |
VCS Version | melodic-devel |
Last Updated | 2025-05-28 |
Dev Status | DEVELOPED |
CI status | Continuous Integration : 0 / 0 |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package used to be implemented in Python using pip-installed libraries. That is no longer needed as the package now uses C++ API of ffmpeg/libav. Some things have changed and work a bit differently, but a big effort was spent to keep the new version as backwards compatible as possible.
It can also extract interesting image/video metadata like GPS coordinates and camera calibrations and provide them as ROS-native types.
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps.
movie_publisher_node and nodelet movie_publisher/movie_publisher_nodelet
Published topics
-
movie
(sensor_msgs/Image
): The published movie. Subtopics from image_transport are also provided. -
movie/camera_info
(sensor_msgs/CameraInfo
): Camera info. -
movie/azimuth
(compass_msgs/Azimuth
): Georeferenced heading of the camera. -
movie/faces
(vision_msgs/Detection2DArray
): Faces detected in the image. -
movie/fix
(sensor_msgs/NavSatFix
): GNSS position of the camera. -
movie/fix_detail
(gps_common/GPSFix
): GNSS position of the camera. -
movie/imu
(sensor_msgs/Imu
): Orientation and acceleration of the camera. -
movie/mag
(sensor_msgs/MagneticField
): Magnetic field strength.
To extract the additional topics except movie
, the node uses metadata extractors. See
the stack-level README for details about the provided
metadata extractors.
Parameters
Parameters ~start
, ~end
and ~duration
can be expressed in seconds (15.35)
, in (min, sec)
,
in (hour, min, sec)
, or as a string: '01:03:05.35'
.
-
~movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
~fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
~start
(float|tuple|string, optional): If set, playback will start from the specified time. Cannot be set together with~end
and~duration
. -
~end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Cannot be set together with~start
and~duration
. -
~duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Cannot be set together with~start
and~end
. -
~loop
(bool, default False): Whether to loop the movie until the node is shut down. Excludes~immediate
. -
~immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can set~fake_time_start
if you want these timestamps to begin from a non-zero time. Excludes~loop
. -
~playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
~fake_time_start
(float, default 0.0): Used with~immediate
to specify the timestamp of the first message. -
~timestamp_offset
(int|float|string, default~fake_time_start
): Adjustment of timestamps determined by~timestamp_source
. If given as string, it can be a simple mathematical expression that can also resolve several variables:ros_time
(current ROS time),wall_time
(current wall time),metadata_start
(start time from metadata). -
~timestamp_source
(str, defaultmetadata
): How to determine timestamps of the movie frames. Options are:-
metadata
: Extract absolute time when the movie was recorded and use that time as timestamps. -
all_zeros
: Use zero timestamps. -
absolute_timecode
: Use the absolute timecode as timestamps (i.e. time since start of movie file). -
relative_timecode
: Use the relative timecode as timestamps (i.e. time since~start
). -
ros_time
: Timestamp the frames with current ROS time.
-
-
~frame_id
(string, default “”): The frame_id used in the geometrical messages’ headers. -
~optical_frame_id
(string, default${frame_id}_optical_frame
): The frame_id used in the image messages’ headers. -
~spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
~verbose
(bool, default False): If True, logs info about every frame played. -
~allow_yuv_fallback
(bool, default False): Set whetherYUV***
formats should be decoded to YUV422, or whether the default encoding should be used. -
~default_encoding
(string, optional): Set the default encoding which should be used for output frames if there is no direct match between the libav pixel format and ROS image encodings. -
~encoding
(string, optional): Set the encoding which should be used for output frames regardless of their source encoding (one of sensor_msgs::image_encodings constants). -
~wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
~publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
movie_to_bag
File truncated at 100 lines see the full file
Changelog for package movie_publisher
3.0.3 (2025-05-28)
- Fixed swapped roll and pitch in RollPitchComposer. Closes #16.
- Make timestamps of messages passed to MovieMetadataProcessors consistent. Closes #15.
- Set inner frame_ids of detected faces. Closes #14.
- Fixed creation of static TFs in movie_to_bag. Closes #13.
- Fixed setting frame_id to latest metadata before they are updated from latest metadata. Closes #10.
- Fixed handling of movies where image rotation changes in the middle of the movie. Closes #9.
- Fixed doc comments.
- Update latest metadata from timed metadata. Closes #8.
- Fixed OpticalFrameTFComposer producing too much output. Closes #7.
- Fixed priority of composers. Closes #6.
- Fixed exception when stream start_time is wrong and leads to negative stream time.
- Contributors: Martin Pecka
3.0.2 (2025-05-13)
- Added ROS parameters allowed_extractors and excluded_extractors.
- Contributors: Martin Pecka
3.0.1 (2025-05-13)
3.0.0 (2025-05-13)
- Finished the refactor for timed metadata support.
- Big refactoring towards better handling of timed metadata.
- Added more metadata: angular velocity, magnetic field and detected faces.
- Contributors: Martin Pecka
2.0.3 (2025-02-27)
2.0.2 (2025-02-19)
- Fixed buildfarm issues.
- Contributors: Martin Pecka
2.0.1 (2025-02-16)
- Try fixing build on buildfarm
- Contributors: Martin Pecka
2.0.0 (2025-02-13)
- Cleaned up dependencies.
- Refactor out MovieProcessorBase.
- CI: Add license linting.
- Compatibility with Melodic.
- Improved documentation, rewritten movie_to_bag to C++, added tests.
- Added support for ImgGPSDirection and GPSTrack expressed towards magnetic North.
- Big rewrite. Moved movie_publisher to a subfolder. Added C++/libav implementation and metadata extraction plugins.
- Contributors: Martin Pecka
1.4.0 (2022-06-08)
- Compatibility with Noetic
- Contributors: Martin Pecka
1.3.1 (2021-04-27)
- Fix pixel format of moviepy videos.
- Contributors: Martin Pecka
1.3.0 (2019-03-10)
- Updated for melodic.
- Contributors: Martin Pecka
1.2.1 (2019-02-07)
- Fixed permissions.
- Kinetic release.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Launch files
- launch/movie_publisher.launch
- SPDX-License-Identifier: BSD-3-Clause
-
- movie_file — Path to the movie to play. Any format that ffmpeg can decode.
- fps [default: ] — If set, the playback will be at the specified FPS (speeding up/slowing down the movie).
- loop [default: ] — Whether to loop the movie until the node is shut down. Excludes 'immediate'.
- start [default: ] — If set, playback will start from the specified time.
- end [default: ] — If set, playback will stop at the specified time (not affected by start).
- duration [default: ] — If set, playback will have this duration.
- frame_id [default: ] — The frame_id used in the geometrical messages' headers.
- optical_frame_id [default: ] — The frame_id used in the image messages' headers.
- immediate [default: false] — If True, the movie will be processed and published as quickly as possible not waiting for the real time. Excludes 'loop'.
- playback_rate [default: ] — If set to a number, immediate mode will not play as fast as possible, but at this rate.
- fake_time_start [default: ] — Used with 'immediate' to specify the timestamp of the first message.
- timestamp_offset [default: ] — Adjustment of timestamps determined by 'timestamp_source'.
- timestamp_source [default: ] — How to determine timestamps of the movie frames. metadata|all_zeros|absolute_timecode|relative_timecode|ros_time
- spin_after_end [default: false] — If True, a rospy.spin() is called after the movie has been published.
- verbose [default: false] — If True, logs info about every frame played.
- wait_after_publisher_created [default: ] — A workaround for the case where you need to give your subscribers some time after the publisher was created.
- publisher_queue_size [default: 10] — 'queue_size' of the movie publisher.
- publisher_queue_size [default: 1000] — 'queue_size' of the movie publisher.
- required [default: true] — Whether the launch file should be exited when playback stops.
Messages
Services
Plugins
Recent questions tagged movie_publisher at Robotics Stack Exchange
Package Summary
Tags | No category tags. |
Version | 3.0.3 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ctu-vras/movie_publisher.git |
VCS Type | git |
VCS Version | melodic-devel |
Last Updated | 2025-05-28 |
Dev Status | MAINTAINED |
CI status | Continuous Integration : 0 / 0 |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Martin Pecka
Authors
- Martin Pecka
movie_publisher
This package contains several tools for using movie files in ROS (playback, conversion to bag files etc.).
It handles any file formats the system installation of ffmpeg can decode.
Important: This package used to be implemented in Python using pip-installed libraries. That is no longer needed as the package now uses C++ API of ffmpeg/libav. Some things have changed and work a bit differently, but a big effort was spent to keep the new version as backwards compatible as possible.
It can also extract interesting image/video metadata like GPS coordinates and camera calibrations and provide them as ROS-native types.
Main tools
-
movie_publisher_node
: A ROS node that serves a video file as video topic source (sensor_msgs/Image
and friends). -
movie_publisher.launch
: A launch file for convenient usage of the node. In theimmediate
mode, it can also be used to convert video files to bagfiles in a batch. -
movie_to_bag
: A script that takes a video as input and transforms it into a bag file. -
add_movie_to_bag
: A batch script that adds a video as a topic into an existing bag file.
Helper tools
-
fix_bag_timestamps
: A batch script that rewrites bag files so that the message publication time is taken from the message header. This allows you to generate bagfile data at high speed and then reprocess them to have more suitable publication timestamps.
movie_publisher_node and nodelet movie_publisher/movie_publisher_nodelet
Published topics
-
movie
(sensor_msgs/Image
): The published movie. Subtopics from image_transport are also provided. -
movie/camera_info
(sensor_msgs/CameraInfo
): Camera info. -
movie/azimuth
(compass_msgs/Azimuth
): Georeferenced heading of the camera. -
movie/faces
(vision_msgs/Detection2DArray
): Faces detected in the image. -
movie/fix
(sensor_msgs/NavSatFix
): GNSS position of the camera. -
movie/fix_detail
(gps_common/GPSFix
): GNSS position of the camera. -
movie/imu
(sensor_msgs/Imu
): Orientation and acceleration of the camera. -
movie/mag
(sensor_msgs/MagneticField
): Magnetic field strength.
To extract the additional topics except movie
, the node uses metadata extractors. See
the stack-level README for details about the provided
metadata extractors.
Parameters
Parameters ~start
, ~end
and ~duration
can be expressed in seconds (15.35)
, in (min, sec)
,
in (hour, min, sec)
, or as a string: '01:03:05.35'
.
-
~movie_file
(string, required): Path to the movie to play. Any format that ffmpeg can decode. -
~fps
(float, optional): If set, the playback will be at the specified FPS (speeding up/slowing down the movie). -
~start
(float|tuple|string, optional): If set, playback will start from the specified time. Cannot be set together with~end
and~duration
. -
~end
(float|tuple|string, optional): If set, playback will stop at the specified time (not affected by start). Cannot be set together with~start
and~duration
. -
~duration
(float|tuple|string, optional): If set, playback will have this duration. If end is also set, the duration is counted from the end of the clip, otherwise, it is the duration from the start of the clip. Cannot be set together with~start
and~end
. -
~loop
(bool, default False): Whether to loop the movie until the node is shut down. Excludes~immediate
. -
~immediate
(bool, default False): If True, the movie will be processed and published as quickly as possible not waiting for the real time. The timestamps in the resulting messages act “real-world-like” (i.e. 15 FPS means the frames’ timestamps will be 1/15 sec apart). You can set~fake_time_start
if you want these timestamps to begin from a non-zero time. Excludes~loop
. -
~playback_rate
(float, optional): If set to a number, immediate mode will not play as fast as possible, but at this rate (set the rate to a number where you do not lose any messages, e.g. in image_transport/republish). -
~fake_time_start
(float, default 0.0): Used with~immediate
to specify the timestamp of the first message. -
~timestamp_offset
(int|float|string, default~fake_time_start
): Adjustment of timestamps determined by~timestamp_source
. If given as string, it can be a simple mathematical expression that can also resolve several variables:ros_time
(current ROS time),wall_time
(current wall time),metadata_start
(start time from metadata). -
~timestamp_source
(str, defaultmetadata
): How to determine timestamps of the movie frames. Options are:-
metadata
: Extract absolute time when the movie was recorded and use that time as timestamps. -
all_zeros
: Use zero timestamps. -
absolute_timecode
: Use the absolute timecode as timestamps (i.e. time since start of movie file). -
relative_timecode
: Use the relative timecode as timestamps (i.e. time since~start
). -
ros_time
: Timestamp the frames with current ROS time.
-
-
~frame_id
(string, default “”): The frame_id used in the geometrical messages’ headers. -
~optical_frame_id
(string, default${frame_id}_optical_frame
): The frame_id used in the image messages’ headers. -
~spin_after_end
(bool, default False): If True, a rospy.spin() is called after the movie has been published. -
~verbose
(bool, default False): If True, logs info about every frame played. -
~allow_yuv_fallback
(bool, default False): Set whetherYUV***
formats should be decoded to YUV422, or whether the default encoding should be used. -
~default_encoding
(string, optional): Set the default encoding which should be used for output frames if there is no direct match between the libav pixel format and ROS image encodings. -
~encoding
(string, optional): Set the encoding which should be used for output frames regardless of their source encoding (one of sensor_msgs::image_encodings constants). -
~wait_after_publisher_created
(float, default 1.0): A workaround for the case where you need to give your subscribers some time after the publisher was created. Tweak this number until you get no missing start messages. -
~publisher_queue_size
(int, default 1000 in immediate mode, 10 otherwise):queue_size
of the movie publisher.
movie_publisher.launch
This launch file takes arguments with the same name as the node’s parameters.
movie_to_bag
File truncated at 100 lines see the full file
Changelog for package movie_publisher
3.0.3 (2025-05-28)
- Fixed swapped roll and pitch in RollPitchComposer. Closes #16.
- Make timestamps of messages passed to MovieMetadataProcessors consistent. Closes #15.
- Set inner frame_ids of detected faces. Closes #14.
- Fixed creation of static TFs in movie_to_bag. Closes #13.
- Fixed setting frame_id to latest metadata before they are updated from latest metadata. Closes #10.
- Fixed handling of movies where image rotation changes in the middle of the movie. Closes #9.
- Fixed doc comments.
- Update latest metadata from timed metadata. Closes #8.
- Fixed OpticalFrameTFComposer producing too much output. Closes #7.
- Fixed priority of composers. Closes #6.
- Fixed exception when stream start_time is wrong and leads to negative stream time.
- Contributors: Martin Pecka
3.0.2 (2025-05-13)
- Added ROS parameters allowed_extractors and excluded_extractors.
- Contributors: Martin Pecka
3.0.1 (2025-05-13)
3.0.0 (2025-05-13)
- Finished the refactor for timed metadata support.
- Big refactoring towards better handling of timed metadata.
- Added more metadata: angular velocity, magnetic field and detected faces.
- Contributors: Martin Pecka
2.0.3 (2025-02-27)
2.0.2 (2025-02-19)
- Fixed buildfarm issues.
- Contributors: Martin Pecka
2.0.1 (2025-02-16)
- Try fixing build on buildfarm
- Contributors: Martin Pecka
2.0.0 (2025-02-13)
- Cleaned up dependencies.
- Refactor out MovieProcessorBase.
- CI: Add license linting.
- Compatibility with Melodic.
- Improved documentation, rewritten movie_to_bag to C++, added tests.
- Added support for ImgGPSDirection and GPSTrack expressed towards magnetic North.
- Big rewrite. Moved movie_publisher to a subfolder. Added C++/libav implementation and metadata extraction plugins.
- Contributors: Martin Pecka
1.4.0 (2022-06-08)
- Compatibility with Noetic
- Contributors: Martin Pecka
1.3.1 (2021-04-27)
- Fix pixel format of moviepy videos.
- Contributors: Martin Pecka
1.3.0 (2019-03-10)
- Updated for melodic.
- Contributors: Martin Pecka
1.2.1 (2019-02-07)
- Fixed permissions.
- Kinetic release.
- Moved to python from bc, because it is not installed everywhere.
- More informative error strings.
- Updated to the fixed version rosbash_params==1.0.2.
- Contributors: Martin Pecka
1.1.0 (2019-01-28)
- Added checks for exit codes to bash scripts.
- Fixed install targets.
- Added python-opencv alternative backend. This resolves debian packaging issues.
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Launch files
- launch/movie_publisher.launch
- SPDX-License-Identifier: BSD-3-Clause
-
- movie_file — Path to the movie to play. Any format that ffmpeg can decode.
- fps [default: ] — If set, the playback will be at the specified FPS (speeding up/slowing down the movie).
- loop [default: ] — Whether to loop the movie until the node is shut down. Excludes 'immediate'.
- start [default: ] — If set, playback will start from the specified time.
- end [default: ] — If set, playback will stop at the specified time (not affected by start).
- duration [default: ] — If set, playback will have this duration.
- frame_id [default: ] — The frame_id used in the geometrical messages' headers.
- optical_frame_id [default: ] — The frame_id used in the image messages' headers.
- immediate [default: false] — If True, the movie will be processed and published as quickly as possible not waiting for the real time. Excludes 'loop'.
- playback_rate [default: ] — If set to a number, immediate mode will not play as fast as possible, but at this rate.
- fake_time_start [default: ] — Used with 'immediate' to specify the timestamp of the first message.
- timestamp_offset [default: ] — Adjustment of timestamps determined by 'timestamp_source'.
- timestamp_source [default: ] — How to determine timestamps of the movie frames. metadata|all_zeros|absolute_timecode|relative_timecode|ros_time
- spin_after_end [default: false] — If True, a rospy.spin() is called after the movie has been published.
- verbose [default: false] — If True, logs info about every frame played.
- wait_after_publisher_created [default: ] — A workaround for the case where you need to give your subscribers some time after the publisher was created.
- publisher_queue_size [default: 10] — 'queue_size' of the movie publisher.
- publisher_queue_size [default: 1000] — 'queue_size' of the movie publisher.
- required [default: true] — Whether the launch file should be exited when playback stops.