Jump to content
  • 0

RK3399 Legacy Multimedia Framework


JMCC

Question

IT'S FINALLY HERE...

background-business-design-star-internet-concept-1626698-pxhere_com.jpg.719bd6b4d02c30003ba20713d391aede.jpg

THE OFFICIAL ROCKCHIP-LEGACY MULTIMEDIA INTEGRATION

 

After two years of using a separate script to enable the multimedia features in RK3399 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-rk3399 --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-HDRUse 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: 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: 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 LightDM menu as your user account: 
    kodi-gbm-info.jpg.271beb6d036378968e74faa1f841dcbd.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

Recommended Posts

  • 0
2 hours ago, tony013 said:

top menu is outside of my screen

Sorry, I didn't notice this. Can't you set up your monitor to disable overscan and show the full screen? If you want to use the desktop, you will miss the top panel and/or window bars anyway.

 

If you cannot change your monitor overscan setting, the easiest solution is to create a custom LightDM configuration, with a menu in some place that you can see. You can find instructions for that via Google.

 

Otherwise, you need to stop lightdm and launch Kodi manually from console.

Link to comment
Share on other sites

Donate your old hardware to community. Start a giveaway Raffle!

  • 0
vor 8 Stunden schrieb JMCC:

If you want to use the desktop, you will miss the top panel and/or window bars anyway

Yes, but I found a way around that.

I use the second bar with iconsize of 100 and changed conky to have all informations, I otherwise want in top bar ...

With twister I could start cody from desktop without changing lightdm session. That was beautiful :)

But as I can't use twister any longer, I have to live with your solution

 

vor 11 Stunden schrieb JMCC:

Please see post #1 of this thread

Sorry, I was unprecise.

Of cause I tried the hints from #1 to disable lightdm, but I don't know, how to recover desktop. So I had to reinstall armbian from sdcard.

 

vor 8 Stunden schrieb JMCC:

is to create a custom LightDM configuration, with a menu in some place that you can see. You can find instructions for that via Google.

Ok, I'll try that. Thank you

Link to comment
Share on other sites

  • 0
3 hours ago, tony013 said:

With twister I could start cody from desktop

That's because it does not have VPU acceleration. You can probably also do that in Armbian, simply by installing the regular Debian Kodi packages (never tried it myself), but performance will be terrible. If you want fullacceleration on this chip, you need to disable X server for GBM KMS to take exclusive control of the display block.

Link to comment
Share on other sites

  • 0
vor 7 Stunden schrieb JMCC:

That's because it does not have VPU acceleration.

I'm not convinced, that it is true.

TwisterOS has same kodi-version like armbian legacy and movie playback gives the same impression like armbian legacy - smooth video and fresh sound.

Firefox-implementation of armbian pushed me towards twisteros.

... and I'm already completely angry about firefox experience on armbian. Really, that sort of spam turns me into a spree killer :(

 

vor 7 Stunden schrieb JMCC:

You can probably also do that in Armbian, simply by installing the regular Debian Kodi packages (never tried it myself)

Well, I tried it. Very disappointing experience. Kodi on armbian current is 3 generations back and has no hardware support for video and audio is the same very poor.

 

vor 7 Stunden schrieb JMCC:

If you want fullacceleration on this chip, you need to disable X server for GBM KMS to take exclusive control of the display block.

I guess, you should give twisteros a try. They use current kernel (same version like armbian current and LE) and have hardware acceleration for video and desktop - and best of all, switch between desktop and kodi in a wink.

Don't know, if that propaganda is true, but from twisterOS you can read:

  • Latest PanfrostGPU drivers with desktop hardware acceleration
  • Kodi and MPV media players with built-in hardware acceleration support

 

Link to comment
Share on other sites

  • 0

I finally was able to kill armbian-spammer, so don't need to search for other os any more :)

 

vor 9 Stunden schrieb JMCC:

Did you try 4k?

No, I'm not interested in 4k. Don't have equipment for 4k.

I'm happy with 2k and the equipment that I own.

But I do have movies, that none of rockpi images is able to play (like inception). Some movies have wrong colors on playback or you see jpg-artifacts or the like ...

But I couldn't detect any difference between armbian legacy and twisteros.

 

Anyway - as I can't use twisteros any more, armbian legacy is the only desktop os with acceptable movie playback.

 

Am 6.6.2021 um 19:24 schrieb JMCC:

create a custom LightDM configuration, with a menu in some place that you can see.

I found the settings for login top bar and changed fontsize to 100 or so, now I can use the menu.

Having that bar moveable like it is possible for the second bar would be wonderful. I'll keep searching.

Link to comment
Share on other sites

  • 0

@JMCCNow I tested the latest versions of Station-legacy P1\M1 with the installation of the media package. I get the same error - hard binding of the package to the rockchip64-legacy kernel. This creates a lot of problems. Back to the question, maybe you should remove the hard binding to the kernel ?

Link to comment
Share on other sites

  • 0
11 minutes ago, balbes150 said:

@JMCCNow I tested the latest versions of Station-legacy P1\M1 with the installation of the media package. I get the same error - hard binding of the package to the rockchip64-legacy kernel. This creates a lot of problems. Back to the question, maybe you should remove the hard binding to the kernel ?

Well, my position is the same as before. I can summarize it in two points:

  • I don't like the idea of adding a new kernel to the already oversaturated mess of RK BSP. We had two (RK3399 and rockchip64), and we were trying to find ways to merge them. It has been a long issue with @piter75, @TonyMac32, @chwe, myself and others trying to find ways of getting rid of this duality, which we haven't gotten yet. But introducing a third one makes the issue even worse.
  • The dependency is necessary for a proper debian packaging. If a package requires another package in order to work (as it is the case), then it must be reflected in the Debian dependencies.

The problem with any additional kernel that you may use either in standard Armbian or Armbian-TV, can be easily solved just by adding a field "Provides: linux-rockchip64-legacy" to your custom kernel package.

Link to comment
Share on other sites

  • 0
3 minutes ago, balbes150 said:

to add separate versions of kernels

But, if the package is giving an error when installing, then it means that the system does not have the rk3399 nor rockchip64 kernel package, but a different one. Am I understanding well?

Link to comment
Share on other sites

  • 0
21 minutes ago, balbes150 said:

The problem is that the system rigidly replaces the kernel, without giving the user the option to refuse to replace the kernel.

But then it means that the system has already installed some other kernel, other than rk3399 or rockchip64, am I understanding well?

Link to comment
Share on other sites

  • 0

Hi,

 

I did some more tests and it turned out, that there is little difference between LE and armbian legacy for x264 or avc movies - but I found no movieplayer, that worked half as good as armbian legacy with vc-1 movies.

Don't have that many movies with vc-1 but some much-loved like inception ...

 

I already wrote, that I use rockpi as movieplayer together with a beamer, so session selection of armbian legacy is suboptimal for me, as about 10-15% on top and bottom of the screen are invisible (outside of screen). Lightdm/xfce is so dumb, that icons in topbar will not be scaled to bar height, which works fine for second bar ...

Sadly I didn't find any other greeter, that runs on armbian and is more attractive like lightdm-gtk-greeter.

So I started to build my own, which took lot more of time than expected ...

 

any way - I finally have a working sample:

Screenshot_preview.jpg.7017ce320e67489aca034c434457872b.jpg

 

is uses gtk too, so it works with armbian.

 

I check the available sessions and if there's no session definition for kody-gbm, the kodi-button will be disabled (as in the screenshot taken from my desktop computer).

Font- and button-size have been increased for a screen distance of 3m approximately.

 

Last login will be cached, so user will be prefilled and hitting ENTER in the password field will login to the last session. Left most button starts kody and right most button the desktop.

 

Link to comment
Share on other sites

  • 0
3 minutes ago, tony013 said:

So I started to build my own, which took lot more of time than expected ...

 

any way - I finally have a working sample:

Screenshot_preview.jpg.7017ce320e67489aca034c434457872b.jpg

 

is uses gtk too, so it works with armbian.

 

I check the available sessions and if there's no session definition for kody-gbm, the kodi-button will be disabled (as in the screenshot taken from my desktop computer).

Font- and button-size have been increased for a screen distance of 3m approximately.

 

Last login will be cached, so user will be prefilled and hitting ENTER in the password field will login to the last session. Left most button starts kody and right most button the desktop.

 

Hey, that looks very good!

Link to comment
Share on other sites

  • 0

hello)

Im really need to use on my rock pi 4c simple OS with simple DE like XFCE + Kodi.

After a lot of time of googling I've found this topic and seems this is what I want.

I installed 

https://armbian.hosthatch.com/dl/rockpi-4c/archive/Armbian_21.05.1_Rockpi-4c_buster_legacy_4.4.213_xfce_desktop.img.xz

and run these commands:

sudo apt update && sudo apt upgrade sudo apt install media-buster-legacy-rk3399 --install-recommends

 

but I wonder - is this the only last working variant for having Kodi and graphics hardware acceleration on rock pi 4с?

Or maybe there is also variant based on Mainline version of Armbian? but I can't find any info about it..

 

for example - the issue with this current variant - described here - 

Only one USB port is working and as far I understand - there no fix for this on Legacy armbian on which this current variant is based.

So - we have hardware acceleration but no additional USB?

 

 

Link to comment
Share on other sites

  • 0

ok

I've checked the previous suggested link and got there recommendation to return here)

So I supposed that only Legacy Buster currently the best variant of Armbian for rock pi 4c if you want use it as multimedia center (kodi etc)

 

But anyway - what to do with broken USB ports? I can connect only one device but want to connect more.

Also seems XRDP doesnt work..

Link to comment
Share on other sites

  • 0
8 minutes ago, JMCC said:

Are you sure? Maybe you should read again and follow the link

Yes, as far I understand, I am sure )

below the two answers that I received:

 

1 - 

Quote

 

 

 

 

2 - 

Quote

 

For the RockPi4C you just need the default armbian buster legacy. https://redirect.armbian.com/region/EU/rockpi-4b/Buster_legacy_xfce
from https://www.armbian.com/rock-pi-4/
To install kodi with addones :
 

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

https://forum.armbian.com/topic/16516-rk3399-legacy-multimedia-framework/

 

 

both answers are told about exactly this topic...

 

Link to comment
Share on other sites

  • 0
1 hour ago, JMCC said:

This one, and the link in the post

 

 

 

hmm.. seems the weather is getting hot in my town... 

I do not understand your answer at all - your link just opens topic on 1 page. What I need to get from there?

 

upd:

 

https://forum.armbian.com/topic/15693-board-bring-up-station-p1-rk3399-m1-rk3328/page/8/?tab=comments#comment-126668

 

found it) it is about only Kodi packages, right? 

 

upd2:

 

ok

as far I understand - I can install Debian Bulseye and your Kodi packages on my rock pi 4c.

but I wonder - if hardware acceleration and other stuff which discussed here will work on such configuration?

and there no Bullseye images yet..

https://armbian.hosthatch.com/dl/rockpi-4c/archive/

where I can download it for rockpi?

Link to comment
Share on other sites

  • 0
On 7/7/2021 at 5:06 PM, JMCC said:

This one, and the link in the post

 

 

 

sorry but can you explain in some more details - what can I do for my rockpi 4c with your kodi version for Bulseye?
I tried to follow these doc: https://github.com/armbian/build and build new image for 4c but it has configs only for ubuntu and buster not bulseye.
so I totally dont understand how can I use your advice..
seems there are a lot of blockers if you want to use rock pi like mediacenter - you restricted to legacy buster because only this image has HW acceleration but in legacy you face with USB and XRDP issue.
I dont know and cant find any info about images with current kernels which works good with video and has a modern version of kodi.

for example if you install kodi from default debian repo on armbian - you receive some modified version of kodi which has 18.4 ver(or 18.6) but remote web not working and I suppose HW also now working.

Link to comment
Share on other sites

  • 0

Just downloaded latest legacy buster image from download page of OPI4 few hours ago , then did sudo apt update and then sudo apt upgrade  .. Rebooted... After which started getting error " Failed to start Light Display Manager " Picture of same attached... on terminal after update/upgrade the OS version shown NOW is Armbian 21.05.6  with Linux 4.4.213-rk3399 . 

hardware is Orange Pi 4 

IMG_20210803_075611.jpg

Link to comment
Share on other sites

  • 0

UPDATE  : just checked inside armbian-config there "enable desktop environment" was disabled (don't know why this happened, before updating/upgrading this fresh installation desktop was all good and running)... So I just "enabled desktop environment" Again... Rebooted... And was back in DE... 

BUT one more observation/issue came up even before this update/upgrade....when I first installed this image I plugged in a "Dell" Wireless mouse/Keyboard pair (WIRELESS Kb/mouse receiver dongle inserted in USB2).. strange thing is happening now... It's all ok if I only use mouse BUT the moment I punch in few keys using the keyboard the system just suddenly halts.. I further investigated this by plugging in a USB/SERIAL cable.. I observed that the moment this keyboard activity/system halt happens the terminal throws up some messages which seems to be some "sleep" /PMIC  related and also some "exceptions" are reported.... Picture of those messages are attached. 

IMG_20210803_084612.jpg

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
Answer this question...

×   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...