Jump to content

RK3288/RK3328 Legacy Multimedia Framework


JMCC

Recommended Posts

IT'S FINALLY HERE...

background-business-design-star-internet-concept-1626698-pxhere_com.jpg.2352c62703c79f129c15f79dbd868248.jpg

THE OFFICIAL ROCKCHIP-LEGACY MULTIMEDIA INTEGRATION

 

After two years of using a separate script to enable the multimedia features in RK3288/3328 Legacy Kernel, the whole framework has been incorporated to the official Armbian packaging system. The choice distro for this integration is Debian Buster (see FAQ at the end of this post about the reasons).

 

I. Installation

  1. Download a Armbian Buster Legacy Desktop image for your board, and install it with the standard Armbian method.
  2. Install the complete multimedia solution with
    sudo apt update && sudo apt upgrade
    
    sudo apt install media-buster-legacy-tinkerboard --install-recommends
    ## Or ##
    sudo apt install media-buster-legacy-rk3328 --install-recommends
    The switch "--install-recommends" will add the whole Kodi binary addons collection (retro-gaming cores, music visualizations, screensavers, additional media decoders/encoders, vfs, etc.), plus the GLES-to-OpenGL wrapper "gl4es".

 

II. Features

  1. Accelerated GLES/EGL X desktop: No action needed.
  2. Accelerated Chromium, with WebGL and video display acceleration: No action needed
  3. Desktop video player capable of smooth 4K HEVC-HDR: Use the "Rockchip Gst Player" from the Multimedia menu, or choose it with right-click on the media file. Command-line 4K playing is also possible with "gst-play-1.0 --videosink=kmssink".
  4. RKMPP-accelerated MPV: Use normally for standard operation (windowed with mouse-operated GUI). For fullscreen, keyboard-operated mode, use the command line switch "--gpu-context=drm" (this will allow you to play smooth 4K).
            - See instructions below, in the next post, for playing Youtube videos up to 4k with this MPV.
  5. ISP Camera with real-time h.264/1080p HW encoding (RK3288 only): Using the Gstreamer Plugin. Check this wiki for instructions on how to use it. Most of it applies to Armbian, except for the selection of ov5647/imx219 camera, which must be done using DT overlays.
  6. OpenCL 1.2 support (RK3288 only): It will be fully functional, no further action needed. You can download some tests and examples from this link.
  7. Kodi 18.9 Leia with full RKMPP+GBM acceleration, 4K-HDR capable: You can start it from Light DM menu as your user account: 
     kodi-gbm-info.jpg.98205322d9bdd05e99626da201d4e84e.jpg
    Alternatively, you can also run it as a system service with these command lines:
    sudo systemctl disable lightdm
    sudo systemctl enable kodi-gbm
    sudo reboot

     

  8. Full collection of Kodi binary add-ons: Includes retrogaming cores, media encoders and decoders, PVR, screensavers, vfs and audio visualizations. They are all installed with the package "kodi-addons-full", but are disabled by default. They need to be enabled individually within the Kodi GUI.
  9. OpenGL 2.1 support through the gl4es wrapper: It is installed with the package "gl4es", with no further action needed.

 

III. Sources

This is the list of the sources used for the packages:

 

IV. FAQ

  • ¿Why did you use Debian Buster as a base for this implementation?
    It was the most appropriate for several reasons. Upstream Rockchip-Linux developers use Debian buster, so the software could be ported with less modifications than if we chose a different distro. Besides, it is a completely stable distro, unlike Bullseye, which is a moving target as of today. It also has Chromium as a package, unlike Focal that uses snap instead. For last, it has a good backports repo, with several libs that would otherwise need to be compiled and maintained if we chose, for example, Focal.
     
  • ¿Why Legacy instead of Mainline?
    This is an implementation based on the vendor's BSP kernel. It has been tested and is reliable, which many people will prefer rather than having a bleeding-edge, less stable implementation. In addition to that, Mainline upstream multimedia support is still a WIP, and lacks many features that are only present on Legacy kernels.
     
  • ¿Will you add new features to this implementation?
    No, this implementation will only receive bug fixes if necessary. From now on, all multimedia work will be focused on Mainline and recent distros (like Focal or Bullseye). All new features will go there.
Link to comment
Share on other sites

Cool!  Great work again JMCC!

 

Am I correct in assuming this is same underlying "framework" as RK3399 based one, just with components specific to this hardware?  And if so, I guess in fact this is the whole point of such "frameworks?"  Trying to get my head around it from a high level, as someone who have yet to play with any "desktop" stuff (at least on Armbian).

Link to comment
Share on other sites

10 minutes ago, TRS-80 said:

this is same underlying "framework" as RK3399

Essentialy, yes. VPU is identical in last generation SoC's RK3328 and RK3399, lacking VP9 capabilities in the older RK3288.

 

GPU, on the other hand, is very similar in the high-end SoC's (RK3288 and RK3399), much faster and supporting OpenGLES 3 and OpenCL 1.2. The weaker one, RK3328, supports only GLES2 and no OpenCL, plus no ISP camera either.

 

There is also a parallel solution for Odroid XU4, I will document it soon. In that case, VPU decoding capabilities are reduced (no 4K, only 1080p). But GPU is the strongest one, as well as VPU encoding.

Link to comment
Share on other sites

New packages uploaded to the repos (it may take some hours to synchronize).

  • Bug fixes:
    • X Desktop no longer restarted on package install, so it can be installed from a desktop session (NOTE: Since the old package is still going to restart X when uninstalled, it is recommended to do this update from console).
    • MPV now is not failing when it cannot create EGL surface (it will just default to standard x11).
    • CEC is now working on several boards (tested in RockPro64 and Rockpi 4B).
  • New features:
Link to comment
Share on other sites

Bugfix release. For those of you upgrading, since the upgrade will install new packages, you need to issue the command like:

sudo apt install media-buster-legacy-tinkerboard
## Or ##
sudo apt install media-buster-legacy-rk3328

instead of the regular "apt upgrade", which would retain the packages to avoid new installations.

Link to comment
Share on other sites

hi JMCC,

happy new year everybody!

unfortunately the rk3328 package is unavailable, can you please have a look?

 

Thanks in advance,

Cheers Globe

 

 

root@miqi:~# apt install media-buster-legacy-rk3328 --install-recommends
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package media-buster-legacy-rk3328

root@miqi:~# apt search media-buster-legacy
Sorting... Done
Full Text Search... Done
media-buster-legacy-tinkerboard/buster 20.11.4 armhf
  Enables multimedia HW acceleration for tinkerboard (legacy branch)

media-buster-legacy-xu4/buster 20.11.4 armhf
  Enables multimedia HW acceleration for Odroid XU4 (legacy branch)

 

Link to comment
Share on other sites

17 minutes ago, Globe said:

the rk3328 package is unavailable

Miqi has RK3288, which has 32 bit architecture. On the other hand, RK3328 is a different  SoC, with 64 bit architecture. That is why it is not present in the same repos as 32-bit RK3288.

 

To avoid confusion between similar numbers, I called the RK3288 package "media-buster-legacy-tinkerboard", that is the one you should use for your board.

 

However, it is even more complicated. Some variants of Miqi have a different version of the SoC, named RK3288W, which needs special mali packages for GPU acceleration. I made no package for that variant, since Miqi is unsupported already. But if you find that the standard package does not work, I can help you get the right library for your board.

Link to comment
Share on other sites

Can you tell me where I can find the best "Armbian Buster Legacy Desktop" image for the Tinkerboard? I can easily find an "Armbian Buster Legacy" image, but not a Desktop version of it.

Or is there an easy way to create the Desktop version from that?

Link to comment
Share on other sites

7 minutes ago, Blind55 said:

Can you tell me where I can find the best "Armbian Buster Legacy Desktop" image for the Tinkerboard?

 

I just ran into this as well, if you download the server image you can install the desktop through armbian-config.  I just did it on Tinkerboard about 20 minutes ago, watching "The Italian Job" on Kodi right now.  :)

Link to comment
Share on other sites

20 minutes ago, Blind55 said:

the best "Armbian Buster Legacy Desktop" image for the Tinkerboard

I recently configured the build script to create a Buster Desktop image for all Rockchip boards, so with next Armbian update it should appear in the download page. In the meantime, as @TonyMac32 said, you can download the server image and use "armbian-config" to install the Desktop easily (it's under System -> Default Desktop).

Link to comment
Share on other sites

On 1/3/2021 at 1:11 PM, JMCC said:

Miqi has RK3288, which has 32 bit architecture. On the other hand, RK3328 is a different  SoC, with 64 bit architecture. That is why it is not present in the same repos as 32-bit RK3288.

 

To avoid confusion between similar numbers, I called the RK3288 package "media-buster-legacy-tinkerboard", that is the one you should use for your board.

 

However, it is even more complicated. Some variants of Miqi have a different version of the SoC, named RK3288W, which needs special mali packages for GPU acceleration. I made no package for that variant, since Miqi is unsupported already. But if you find that the standard package does not work, I can help you get the right library for your board.

 

I'm actually trying to get a openhour Chameleon to work and the only image I could get to boot was the one of Miqi. For any advise of usable OS I'd be very interested.
https://www.cloudmedia.com/?product=chameleon

 

Link to comment
Share on other sites

New release in the repos:

  • Fixed Chromium showing images in indexed color, and other limitations.
  • Fixed OpenCL broken in last update
  • Improved X performance under glamor (by 100%, in gtkperf tests)
  • Fixed rkcamsrc plugin for using the ISP MIPI-CSI camera.
  • Added the Rockchip RGA library (also enabled in the kernel).
Link to comment
Share on other sites

Thank you very much for your efforts.

However, Chromium is totally unstable. It always crashes randomly (aw, snap) after a few minutes of playback in streaming websites. Is there anything that can be done?

 

I have tested other browsers but they are far from perfect. The only option is a HW accelerated one like chromium in full screen mode.

At this point is there any hope that vaapi-enabled firefox 80+ can be compiled and used? What about vaapi-enabled gstreamer ones like epiphany? (I tested it but the performance was terrible as it was not HW-accelerated.)

 

Link to comment
Share on other sites

Thank you very much for your efforts.
However, Chromium is totally unstable. It always crashes randomly (aw, snap) after a few minutes of playback in streaming websites. Is there anything that can be done?
 
I have tested other browsers but they are far from perfect. The only option is a HW accelerated one like chromium in full screen mode.
At this point is there any hope that vaapi-enabled firefox 80+ can be compiled and used? What about vaapi-enabled gstreamer ones like epiphany? (I tested it but the performance was terrible as it was not HW-accelerated.)
 
Vaapi will do nothing, there is no vaapi support in Rockchip Legacy

In order to help you with your problem, you need to provide information about your system. Start with the output of 'sudo armbianmonitor -u'

Enviado desde mi moto g(6) plus mediante Tapatalk

Link to comment
Share on other sites

Thank you very much for your swift reply. I immediately got the needed information but somehow armbian forum did not let me post more than once yesterday.

 

Anyway, this is the output:

https://drive.google.com/file/d/1MTjonq6bYMsD3ef5iHa7ebHA64Vri6om/view?usp=sharing

I have also appended Xorg.0.log to the end of the file.

 

I also tested my own custom compiled kernel for Rock64, and while the experience was a little better, at the end chromium always crashed again with Aw, snap. This is a on 4GB Rock64 SBC. For the fdt I am using rk3328-rock64.dtb.

Link to comment
Share on other sites

1 hour ago, Kete said:

I also tested my own custom compiled kernel for Rock64

We can only help you if you are using the official Armbian kernel, from the stable legacy branch. If you choose to use some other kernel, then you are on your own.

 

Please try on a fresh Armbian image, with the official kernel. Make sure you use a buster legacy desktop image, namely this one: https://redirect.armbian.com/rock64/Buster_legacy_desktop.torrent.

I am telling you to start over with a new image, because from the logs above I suspect there was a problem with the installation of some desktop packages.

Link to comment
Share on other sites

Thanks for your reply.

 

Although I was running my own custom kernel, I had already tested it with the stock kernel as well. The situation did not differ.

 

Anyway, as you said I wrote the stock image to a new microSD and started over. The hang/freeze or the aw, snap error was present.

 

armbianmonitor output:
https://drive.google.com/file/d/1UwBDMZ2D8G6q6QdGHGar9pHX50GjTv66/view?usp=sharing

 

Some more log appeared on the serial console at the freeze event:

https://dpaste.com/2J847U2EN

 

The end has three lines from dmesg which was the only thing it was showing when the the system froze while trying to stream a video in chromium.

 

Link to comment
Share on other sites

10 hours ago, Kete said:

Some more log

I can see some reference to x11vnc in the log, is that so? If you are trying to play a streamed video through vnc, it will cause all kind of problems, even more on such a weak CPU.

Link to comment
Share on other sites

On 1/17/2021 at 2:06 AM, JMCC said:

I can see some reference to x11vnc in the log, is that so? If you are trying to play a streamed video through vnc, it will cause all kind of problems, even more on such a weak CPU.

Of course not. Directly the performance is not perfect let alone through VNC.
The problem is definitely related to Chromium. I can play a high-profile x264 local file using the players for hours with no issues, but in the browser it always crashes or hangs. I am experimenting with some options to further troubleshoot the issue and to see what exactly can trigger the problem.

I will let you know once I have done my testing.

 

Link to comment
Share on other sites

I just installed Armbian_20.11.6_Tinkerboard_buster_legacy_4.4.213_desktop.img.xz, update and install Legacy Multimedia Framework on my asus tinkerboard rk3288 with:
 

Quote

 

sudo apt update && sudo apt upgrade

sudo apt install media-buster-legacy-tinkerboard --install-recommends

 

 

 

 

Then after few hours of internet surfing with chromium I was listening youtube in one tab and read some page. Than I got huge freeze: sound became choppy and mouse was moving very slow. After few minutes chromium was killed.
I'm not sure what was that, but I was getting same bug with mainline kernel on ubuntu focal. May be it's old kernel bug or wrong patch for devie tree? Can somebody check my dmesg after freeze (before reboot)?  And here is my armbianmonitor -uhttp://ix.io/2MCE

dmesg.txt

Link to comment
Share on other sites

9 hours ago, q4a said:

I was getting same bug with mainline kernel on ubuntu focal

Then it is not related to the buster multimedia framework, bit something else.

 

Your dmesg shows a USB webcam and cheese. Try without that device.

Link to comment
Share on other sites

OK. After doing much testing, I can say that there is something wrong with Chromium. The situation is totally random and I reproduced the issue in many conditions. It is not related to anything but the browser itself.

 

This is really sad. Everything works very well (I even play youtube through mpv/ytdl) but this hardware accelerated chromium is totally unstable. There was not even one time when it did not crash on me, which is a shame because for those websites that don't have a streaming implementation in kodi/youtube-dl, the browser is the only way to access the media and with Rock64 and the current chromium it is unusable.

 

Q1. Is there anything that could be done to increase the stability in Chromium? (Like some options in the browser)

Q2. Will there be any other hardware-accelerated browser?

 

 

Edited by Kete
Link to comment
Share on other sites

Hello,

 

I have a Rock64 and i would like to install Kodi on Armbian Buster Legacy 4.4.213 Desktop.

I flashed it with Etcher, it seems OK.

Then i did :

sudo apt remove command-not-found
sudo apt update && sudo apt upgrade
sudo apt install media-buster-legacy-rk3328 --install-recommends

 

The app command-not-found was preventing me from updating with apt. I got an error. After the reboot, when I select Kodi-GBM in the menu and log-in with my main user account, i got Kodi Leia fullscreen and nothing else happens. I'm stucked here.

 

Am i making a mistake ? Have you any idea of what is happening ? Where should i see some relevant logs about Kodi's launching ?

Link to comment
Share on other sites

3 hours ago, Krapadur said:

The app command-not-found was preventing me from updating with apt. I got an error.

Strange. Reinstall from scratch and post the error.

 

3 hours ago, Krapadur said:

Where should i see some relevant logs about Kodi's launching ?

~/.kodi/temp/kodi.log

 

 

Link to comment
Share on other sites

Hi,

Thank you for your help :-)

Reinstall from scratch is getting better : i guess i had encoding problems choosing locales according to my location France. 

I said "Yes" and now i just say "No" and i don't have error with "sudo apt update".

 

About Kodi, i launched it once from login screen, choosing Kodi-GBM with my main account user/password. I got menu screen but impossible to interact : keyboard/mouse not working anymore. 

After reboot, i'm now stucked at the Kodi splash screen. No menu.

A sudo reboot from Putty console took a moment to effectively reboot the Rock64, and no more Kodi menus appearing...

2021-02-09 21:47:44.903 T:547990247008   ERROR: DBus error: org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
[...]

2021-02-09 21:47:48.920 T:547865369984   ERROR: SQL: [Epg12.db] SQLite error SQLITE_ERROR (no such table: version)
                                            Query: SELECT idVersion FROM version
2021-02-09 21:47:48.957 T:547865369984   ERROR: Process error processing job
 

So i had a look at ~/.kodi/userdata/Database/ and renamed Epg12.db to  Epg12.db.old

 

Now, lauchning Kodi, i got a Dbus error in log https://postit.ilinux.fr/?02830bec8bcc36d9#2QAW5vaRzKjxNjPgxXGGfuWsr8TrjEnpE3AFobo4mQjb

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines