I won't go into the full detail of how we arrived here but I have a need to play two (locally stored on the eMMC) video files simultaneously in Firefox running on a Pi CM4.

Right now it's struggling for a variety of reasons (mainly because the files are full HD being squashed to fit in the page) - I'm planning on re-encoding & scaling the videos with ffmpeg to remove as much CPU/GPU load from the Pi as possible.

With that in mind I have the following questions;

  1. What's the optimum format / parameters (EG bitrate) that will reduce the processing load on the Pi when playing back? We have plenty of storage and can take as long as we need to do the re-encoding.
  2. Are there any settings/confg to check in Raspbian / Firefox to ensure the GPU is being used to full effect?
  • @JohnU True, but you still might want to explain why you want to play videos with a browser instead of a regular video player. Sep 15, 2021 at 14:51
  • Regarding video formats, check out raspberrypi.stackexchange.com/q/104939/33476 Sep 15, 2021 at 14:53
  • @DmitryGrigoryev - the requirement isn't "just play videos on a CM4" because obviously you use a video player for that, the requirement is "play videos as part of an interactive web page in firefox" but I hoped that I didn't need to give an entire back-story in the question just to head off stereotypical SO pedantry.
    – John U
    Sep 15, 2021 at 15:22
  • @Milliways - I just checked, Chromium is way slower and can't play the videos smoothly, even re-scaled and re-compressed. What's your far better solution you're not sharing?
    – John U
    Sep 15, 2021 at 15:24
  • 1
    All I was pointing out was that Firefox doesn't use Pi hardware acceleration which is what you asked.
    – Milliways
    Sep 15, 2021 at 22:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.