Very fast booting and video playback with RockPi 4?

Dear Community,

maybe you can help me to find the right hardware and software for my project. I currently own a Raspberry Pi 4B, but I am unable to limit the boot process to the required time. I have no experience with RockPi so far.

My requirements:

  • very fast boot process (should not exceed about 5 seconds, faster would be better)
  • set a fixed graphics resolution, even if the display is not available during the boot process
  • playback of 1080p videos, fast switching between different videos, depending on the state of certain GPIOs

What do you recommend?

Hardware:

  • RockPi 4A should be enough, don’t need wifi/bluetooth
  • do I need an M.2 NVME SSD? Or would eMMC be fast enough?

Software:

  • which operating system? Debian? armbian? Something else?
  • is hardware accelerated video playback available on Debian?

I was thinking of remotely controlling OMXPlayer or VLC player using a Python script.

I would be grateful for any tip.

If you have a lot of resources, buildroot / Yocto, otherwise Armbian:


Support is on the level of stock, but you have a state of the art build system which will help you getting there where you want.

Video acceleration works on kernel 4.4.y images, this way https://forum.armbian.com/topic/9272-development-rk3399-media-script/ or similar hacky way on stock creations.

For professional grade solutions you will need to support and wait for modern kernel support.

1 Like

Thanks for pointing me into the right direction. Will give it a try. Armbian should be able to do the job.

Honestly linux is not the world where I’m at home. Anyway, I have already built kernels with buildroot for the raspberry pi, but hardware acceleration never worked.

Have ordered a Rock Pi 4A with m.2 SSD today. Hope I will get at least rev. 1.4 (for SPI flash to be soldered) because if I got it right, this would be the best way to boot from SSD.

Mainline kernels for the Pi4 don’t have hardware acceleration for the GPU because RPiF has not upstreamed their changes (or they were considered unacceptable).

I’m curious if I can get it to work. Otherwise, if the RockPi 4 is able to play any video codec in 1080p with an acceptable framerate and without turning the large heat sink into an egg cooker, this could also be a solution.

Buildroot might be a good solution for you. You can build from Rockchip maintained buildroot, with HW decoding for 4K playback.

Check https://github.com/rockchip-linux/manifests

The ROCK Pi 4 support is already included.

For days I have now been trying to create a working image with Buildroot. I found this guide and it helped me a little: http://wiki.friendlyarm.com/wiki/index.php/Buildroot_for_RK3399

Unfortunately I am constantly encountering new problems. There are always compiler errors. I got desperated on Debian Lite … now I’ve tried Ubuntu (as a guest in Virtualbox on Windows because I don’t have a Linux PC).

It became clear to me late that the standard way with “make” for creating a Buildroot image doesn’t work with the RK3399. There is an own make script (build.sh). But there are problems with that too. The instructions described under 5.2 - 5.4 are unfortunately not very detailed. Don’t know why I should compile partial codes, where the image or images (?) will be located after, and what “Auto compilation” should be (the mentioned command is just the build skript without parameters which shows me available options).

The only video player I can select with “make menuconfig” is VLC. But at least with the Raspberry Pi I’ve made the experience that this causes problems under Buildroot. I doubt whether this works better with the Rockpi and the Mali GPU.

The next problems that will come up to me:

  • I don’t need a window manager, but all the video players I’ve tested (VLC, MPV etc.) don’t work directly in a shell without one.
  • The Buildroot image needs to boot from NVME SSD. I found instructions on how to set this up for Debian: https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD
    I don’t know if it works with that boot loader also with Buildroot instead of Debian.
  • I don’t think hardware acceleration works out-of-the-box with Buildroot, especially without window manager. Does the unofficial script mentioned here also work with Buildroot?

Many things that unfortunately depend on each other and I’m not a Linux professional. I thought it would be much easier. Thanks anyway for your help!


Update concerning Buildroot:
sudo ./build.sh all
…gave me the following output:

pack buildroot image at: /home/me/linuxsdk-friendlyelec/buildroot/output/rockchip_rk3399/images/rootfs.ext4
you take 48:21.12 to build builroot
====Build buildroot ok!====
buildroot/output/rockchip_rk3399/images/rootfs.ext4 not generated?
error: please build rootfs first.

ls buildroot/output/rockchip_rk3399/images/
rootfs.tar

Only “rootfs.tar” has been built, no “rootfs.ext4”.

Let me say this. If you don’t wanna or don’t need to understand what are you doing - use Armbian. It’s like RasPi. You just plug it and it works. But now you know what pain it is for Armbian to create such experience

1 Like

My experience so far:

  • Compiling Debian with Buildroot - I didn’t get it to work for the Rockpi
  • Compiling Armbian is easy, but reducing to the absolutely necessary components requires a lot of experience. Further, Hardware accelerated video playback did not work in my tests.
  • The required boot time of approx. 6s with out-of-the-box distros is unrealistic. Deactivating unnecessary services is not sufficient for this. It also takes about 15s to boot from NVME.
  • In my tests, booting from NVME only worked with the original Debian stock image.
  • Full-screen video playback without a window system is practically not supported by any video player (VLC, OMXPlayer, Mplayer etc.)

Finally, I thought the Rockpi would boot faster. This project (which is non-commercial) is only a small piece of the whole project and I have wasted far too much time with it.

If someone would be able to build an image for the Rockpi that meets the requirements, I would be very grateful. I would also be willing to pay for it, please contact me via PM.

Requirements:

  • Rockpi 4b (NVMe can be involved, but don’t have to)
  • HDMI
  • VLC player, OMXPlayer and / or Mplayer with support for hardware accelerated video playback (fullscreen, 1920x1080p, H264)
  • Python
  • Access to GPIOs via Python
  • Python script (comes from me, supposed to control one of the video players) must be able to start video playback within approx. 6 seconds after powering on (!)

Any solution - also with different hardware if the costs are manageable - would be welcome. Any OS would be possible, any script language, any platform. Main requirement is the fast boot time and smooth 1080p video playback where the video clips are depending on external signals.

1 Like

Thank you for the tips. I am no longer interested in a solution. The Rock Pi doesn’t seem to be the best platform for my project.

I found an alternative with the Raspberry Pi 4B and the Dietpi Distribution. After a few optimizations, I’m at 10s boot time from microSD card. In addition, h264 videos with the Omxplayer are played absolutely smoothly without errors from the command line without a Windows manager. I didn’t get something similar to work with the Rock Pi.