Skip to content

fpltool extract: parallel video decoding, optional hw (VA-API) decoding - #222

Open
flipflip8952 wants to merge 4 commits into
mainfrom
parallel-decode
Open

flipflip8952 wants to merge 4 commits into
mainfrom
parallel-decode

Conversation

@flipflip8952

@flipflip8952 flipflip8952 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

fpltool:

  • Decode video in parallel when extracting camera data to a ROS bag. Each group of pictures (GOP) is decoded by its own decoder in its own thread. All messages go through a queue and are written in the order they are in the log.
  • Add -j, --jobs option for the number of parallel video decoders (default: number of CPUs - 2, at least 1)
  • Add -a, --accel option to select the hw acceleration of the video decoders: SW, HW or AUTO (default: SW)
  • Write the last frame of each camera, which was decoded but not written
  • Count errors, so that the limit of 100 errors has an effect

fpsdk_common:

  • video: make hardware (VA-API) decoding work. The filter graph is set up from the format of the first decoded frame. Hardware frames are scaled on the GPU, downloaded as yuv420p and converted to the output pixel format in software. HwAccel::HW fails if the decoder cannot use the hardware, HwAccel::AUTO falls back to software decoding.
  • video: document hardware vs. software decoding performance in video.hpp
  • fpl: fix rec_time in the CamData info string

Docker, devcontainer:

  • Build FFmpeg with the h264 and hevc VA-API hwaccels
  • Pass /dev/dri to the trixie-dev container
  • Install the time utility
  • Move persistent devcontainer data to .devcontainer/.persist
  • Add .devcontainer/helper.sh script to help setting things up

flipflip8952 and others added 4 commits October 5, 2026 17:05
fpltool:
- Decode video in parallel when extracting camera data to a ROS bag. Each
  group of pictures (GOP) is decoded by its own decoder in its own thread.
  All messages go through a queue and are written in the order they are in
  the log.
- Add -j, --jobs option for the number of parallel video decoders (default:
  number of CPUs - 2, at least 1)
- Add -a, --accel option to select the hw acceleration of the video
  decoders: SW, HW or AUTO (default: SW)
- Write the last frame of each camera, which was decoded but not written
- Abort the extraction if a GOP has more than 100 frames

fpsdk_common:
- video: make hardware (VA-API) decoding work. The filter graph is set up
  from the format of the first decoded frame. Hardware frames are scaled on
  the GPU, downloaded as yuv420p and converted to the output pixel format
  in software. HwAccel::HW fails if the decoder cannot use the hardware,
  HwAccel::AUTO falls back to software decoding.
- video: document hardware vs. software decoding performance in video.hpp
- fpl: fix rec_time in the CamData info string

Docker, devcontainer:
- Build FFmpeg with the h264 and hevc VA-API hwaccels
- Pass /dev/dri to the trixie-dev container
- Install the time utility
- Keep persistent devcontainer data in .devcontainer/.persist, created by
  the new .devcontainer/helper.sh

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… effect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant