ffmpeg_encoder_decoder repository

Repository Summary

Checkout URI https://github.com/ros-misc-utilities/ffmpeg_encoder_decoder.git
VCS Type git
VCS Version release
Last Updated 2024-08-30
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ffmpeg_encoder_decoder 1.0.1

README

ROS2 FFMPeg encoder/decoder

This ROS2 package supports encoding/decoding with the FFMpeg library, for example encoding h264 and h265 or HEVC, using Nvidia or other hardware acceleration when available. This package is meant to be used by image transport plugins like the ffmpeg image transport.

Supported systems

Continuous integration is tested under Ubuntu with the following ROS2 distros:

Build Status Build Status Build Status Build Status

Installation

From packages

sudo apt-get install ros-${ROS_DISTRO}-ffmpeg-encoder-decoder

From source

Set the following shell variables:

repo=ffmpeg_encoder_decoder
url=https://github.com/ros-misc-utilities/${repo}.git

and follow the instructions here

Make sure to source your workspace’s install/setup.bash afterwards.

Parameters

This package has no parameters. It is the upper layer’s responsibility to e.g. manage the mapping between encoder and decoder, i.e. to tell the decoder class which libav decoder should be used for the decoding, or to set the encoding parameters.

How to use a custom version of libav (aka ffmpeg)

Compile and install ffmpeg. Let’s say the install directory is /home/foo/ffmpeg/build, then for it to be found while building, run colcon like this:

colcon build --symlink-install --cmake-args --no-warn-unused-cli -DFFMPEG_PKGCONFIG=/home/foo/ffmpeg/build/lib/pkgconfig -DCMAKE_BUILD_TYPE=RelWithDebInfo 

This will compile against the right headers, but at runtime it may still load the system ffmpeg libraries. To avoid that, set LD_LIBRARY_PATH at runtime:

export LD_LIBRARY_PATH=/home/foo/ffmpeg/build/lib:${LD_LIBRARY_PATH}

How to use ffmpeg hardware accelerated encoding on the NVidia Jetson

Follow the instructions here to build a version of ffmpeg that supports NVMPI. Then follow the section above on how to actually use that custom ffmpeg library. As always first test on the CLI that the newly compiled ffmpeg command now supports h264_nvmpi. Afterwards you should be able to use e.g. the ffmpeg_image_transport with parameters like so:

The transport can now be configured to use nvmpi like so:

        parameters=[{'ffmpeg_image_transport.encoding': 'h264_nvmpi',
                     'ffmpeg_image_transport.profile': 'main',
                     'ffmpeg_image_transport.preset': 'll',
                     'ffmpeg_image_transport.gop': 15}]

License

This software is issued under the Apache License Version 2.0.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).


Repository Summary

Checkout URI https://github.com/ros-misc-utilities/ffmpeg_encoder_decoder.git
VCS Type git
VCS Version release
Last Updated 2024-08-30
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ffmpeg_encoder_decoder 1.0.1

README

ROS2 FFMPeg encoder/decoder

This ROS2 package supports encoding/decoding with the FFMpeg library, for example encoding h264 and h265 or HEVC, using Nvidia or other hardware acceleration when available. This package is meant to be used by image transport plugins like the ffmpeg image transport.

Supported systems

Continuous integration is tested under Ubuntu with the following ROS2 distros:

Build Status Build Status Build Status Build Status

Installation

From packages

sudo apt-get install ros-${ROS_DISTRO}-ffmpeg-encoder-decoder

From source

Set the following shell variables:

repo=ffmpeg_encoder_decoder
url=https://github.com/ros-misc-utilities/${repo}.git

and follow the instructions here

Make sure to source your workspace’s install/setup.bash afterwards.

Parameters

This package has no parameters. It is the upper layer’s responsibility to e.g. manage the mapping between encoder and decoder, i.e. to tell the decoder class which libav decoder should be used for the decoding, or to set the encoding parameters.

How to use a custom version of libav (aka ffmpeg)

Compile and install ffmpeg. Let’s say the install directory is /home/foo/ffmpeg/build, then for it to be found while building, run colcon like this:

colcon build --symlink-install --cmake-args --no-warn-unused-cli -DFFMPEG_PKGCONFIG=/home/foo/ffmpeg/build/lib/pkgconfig -DCMAKE_BUILD_TYPE=RelWithDebInfo 

This will compile against the right headers, but at runtime it may still load the system ffmpeg libraries. To avoid that, set LD_LIBRARY_PATH at runtime:

export LD_LIBRARY_PATH=/home/foo/ffmpeg/build/lib:${LD_LIBRARY_PATH}

How to use ffmpeg hardware accelerated encoding on the NVidia Jetson

Follow the instructions here to build a version of ffmpeg that supports NVMPI. Then follow the section above on how to actually use that custom ffmpeg library. As always first test on the CLI that the newly compiled ffmpeg command now supports h264_nvmpi. Afterwards you should be able to use e.g. the ffmpeg_image_transport with parameters like so:

The transport can now be configured to use nvmpi like so:

        parameters=[{'ffmpeg_image_transport.encoding': 'h264_nvmpi',
                     'ffmpeg_image_transport.profile': 'main',
                     'ffmpeg_image_transport.preset': 'll',
                     'ffmpeg_image_transport.gop': 15}]

License

This software is issued under the Apache License Version 2.0.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).


Repository Summary

Checkout URI https://github.com/ros-misc-utilities/ffmpeg_encoder_decoder.git
VCS Type git
VCS Version release
Last Updated 2024-08-30
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ffmpeg_encoder_decoder 1.0.1

README

ROS2 FFMPeg encoder/decoder

This ROS2 package supports encoding/decoding with the FFMpeg library, for example encoding h264 and h265 or HEVC, using Nvidia or other hardware acceleration when available. This package is meant to be used by image transport plugins like the ffmpeg image transport.

Supported systems

Continuous integration is tested under Ubuntu with the following ROS2 distros:

Build Status Build Status Build Status Build Status

Installation

From packages

sudo apt-get install ros-${ROS_DISTRO}-ffmpeg-encoder-decoder

From source

Set the following shell variables:

repo=ffmpeg_encoder_decoder
url=https://github.com/ros-misc-utilities/${repo}.git

and follow the instructions here

Make sure to source your workspace’s install/setup.bash afterwards.

Parameters

This package has no parameters. It is the upper layer’s responsibility to e.g. manage the mapping between encoder and decoder, i.e. to tell the decoder class which libav decoder should be used for the decoding, or to set the encoding parameters.

How to use a custom version of libav (aka ffmpeg)

Compile and install ffmpeg. Let’s say the install directory is /home/foo/ffmpeg/build, then for it to be found while building, run colcon like this:

colcon build --symlink-install --cmake-args --no-warn-unused-cli -DFFMPEG_PKGCONFIG=/home/foo/ffmpeg/build/lib/pkgconfig -DCMAKE_BUILD_TYPE=RelWithDebInfo 

This will compile against the right headers, but at runtime it may still load the system ffmpeg libraries. To avoid that, set LD_LIBRARY_PATH at runtime:

export LD_LIBRARY_PATH=/home/foo/ffmpeg/build/lib:${LD_LIBRARY_PATH}

How to use ffmpeg hardware accelerated encoding on the NVidia Jetson

Follow the instructions here to build a version of ffmpeg that supports NVMPI. Then follow the section above on how to actually use that custom ffmpeg library. As always first test on the CLI that the newly compiled ffmpeg command now supports h264_nvmpi. Afterwards you should be able to use e.g. the ffmpeg_image_transport with parameters like so:

The transport can now be configured to use nvmpi like so:

        parameters=[{'ffmpeg_image_transport.encoding': 'h264_nvmpi',
                     'ffmpeg_image_transport.profile': 'main',
                     'ffmpeg_image_transport.preset': 'll',
                     'ffmpeg_image_transport.gop': 15}]

License

This software is issued under the Apache License Version 2.0.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).


Repository Summary

Checkout URI https://github.com/ros-misc-utilities/ffmpeg_encoder_decoder.git
VCS Type git
VCS Version release
Last Updated 2024-08-30
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ffmpeg_encoder_decoder 1.0.1

README

ROS2 FFMPeg encoder/decoder

This ROS2 package supports encoding/decoding with the FFMpeg library, for example encoding h264 and h265 or HEVC, using Nvidia or other hardware acceleration when available. This package is meant to be used by image transport plugins like the ffmpeg image transport.

Supported systems

Continuous integration is tested under Ubuntu with the following ROS2 distros:

Build Status Build Status Build Status Build Status

Installation

From packages

sudo apt-get install ros-${ROS_DISTRO}-ffmpeg-encoder-decoder

From source

Set the following shell variables:

repo=ffmpeg_encoder_decoder
url=https://github.com/ros-misc-utilities/${repo}.git

and follow the instructions here

Make sure to source your workspace’s install/setup.bash afterwards.

Parameters

This package has no parameters. It is the upper layer’s responsibility to e.g. manage the mapping between encoder and decoder, i.e. to tell the decoder class which libav decoder should be used for the decoding, or to set the encoding parameters.

How to use a custom version of libav (aka ffmpeg)

Compile and install ffmpeg. Let’s say the install directory is /home/foo/ffmpeg/build, then for it to be found while building, run colcon like this:

colcon build --symlink-install --cmake-args --no-warn-unused-cli -DFFMPEG_PKGCONFIG=/home/foo/ffmpeg/build/lib/pkgconfig -DCMAKE_BUILD_TYPE=RelWithDebInfo 

This will compile against the right headers, but at runtime it may still load the system ffmpeg libraries. To avoid that, set LD_LIBRARY_PATH at runtime:

export LD_LIBRARY_PATH=/home/foo/ffmpeg/build/lib:${LD_LIBRARY_PATH}

How to use ffmpeg hardware accelerated encoding on the NVidia Jetson

Follow the instructions here to build a version of ffmpeg that supports NVMPI. Then follow the section above on how to actually use that custom ffmpeg library. As always first test on the CLI that the newly compiled ffmpeg command now supports h264_nvmpi. Afterwards you should be able to use e.g. the ffmpeg_image_transport with parameters like so:

The transport can now be configured to use nvmpi like so:

        parameters=[{'ffmpeg_image_transport.encoding': 'h264_nvmpi',
                     'ffmpeg_image_transport.profile': 'main',
                     'ffmpeg_image_transport.preset': 'll',
                     'ffmpeg_image_transport.gop': 15}]

License

This software is issued under the Apache License Version 2.0.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).