Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Hardware encoding on Ubuntu Bionic #23

Open
AAlon opened this issue Jun 14, 2019 · 4 comments
Open

Hardware encoding on Ubuntu Bionic #23

AAlon opened this issue Jun 14, 2019 · 4 comments
Labels
invalid This doesn't seem right

Comments

@AAlon
Copy link
Contributor

AAlon commented Jun 14, 2019

In our testing, HW encoding worked out of the box for RPi running Xenial (most likely because the ffmpeg was properly configured). However, we've been having difficulties getting it to work on Ubuntu Bionic.
This is tightly related to #2 , but the issue is two fold:

  1. Correct detection of encoding capabilities is still not quite there. If ffmpeg was configured without --enable-omx-rpi, it will try to use libOMXCore.so, which (by default) is unavailable - only libopenmaxil.so is. The code that detects HW encoding support (workaround avcodec_find_encoder_by_name() unreliably indicating that h264_omx codec is available #3) reports that it is available because it found libopenmaxil.so. One option to solve it, once and for all, is to actually try to open the codec (invoke avcodec_open2) as part of the check (inside is_omx_available). If it fails, fall back to SW encoding, while warning about it.

  2. The bigger problem, in my mind, is that there seems to be no easy or simple way to set up the RPi for HW encoding with Bionic... the Bionic images we've tried do not come with properly-configured ffmpeg. When building ffmpeg from source there are numerous intricacies with regards to how to compile it properly (configuration flags etc.). We need to come up with a solution to simplify this, and I wouldn't rule out building & vending binaries of ffmpeg (along with all related libraries) ourselves.

@xabxx
Copy link
Contributor

xabxx commented Aug 29, 2019

@AAlon this is urgent? if so, we should put this in our backlog.

@xabxx
Copy link
Contributor

xabxx commented Aug 29, 2019

we should add tags of some sort to help us prioritize tasks and get a closer-to-accurate ops report.

@AAlon
Copy link
Contributor Author

AAlon commented Aug 29, 2019

Thanks for checking - we're actively investigating HW encoding on RPi Bionic as part of the ROS2 support work. No new insights yet.

@mm318
Copy link
Contributor

mm318 commented Sep 4, 2019

In my opinion, the work that needs to be done is on the Bionic OS image, not on this package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants