2

I'm using RPi4 board with Raspbian on top of it

I wonder if there is a way to tell if any process currently using hardware accelerated video playback?

Ideally it would be nice to be able to say which process exactly is using it, but it's not critical.

I know there could be various interfaces and probably it's possible to detect V4L2 M2M usage with /dev/video10 device opened. But what's about MMAL interface? If it makes difference I'm interested in playback of H.264 videos.

I've considered following approaches but haven't found any traces:

  1. Using lsof to track specific dev-files
  2. Checking state of kernel using sys-files
  3. Using vcdbg or vcgencmd to get stats
1

I would approach this by checking the output of

lsof | grep /opt/vc

This will list all processes which access videocore libraries. This can be further narrowed down to a specific library you're interested in. For video decoding in general, libbcm_host could be a good start.

| improve this answer | |
  • Thank for the answer, but unfortunately provided solution can only indicate that application may use hardware accelerated video and doesn't tell if it actually uses at the moment (shared libraries linked to the app). – reddot Apr 29 at 6:59
  • @reddot If you need the exact moment, run the app under gdb and set a breakpoint to the call you're interested in. – Dmitry Grigoryev Apr 30 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.