• 0

RK3288/RK3328 Legacy Multimedia Framework


JMCC
 Share

7 7

Question

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 post
Share on other sites

Recommended Posts

  • 0
11 hours ago, Krapadur said:

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

 

SQL database errors, weird APT errors... It looks to me like a faulty storage media. Try with some new good quality SD card, like Sandisk Ultra.

 

[EDIT]: IIRC, Rock64 has many hardware problems, that is the reason why we don't support it anymore. That can be the cause for the storage failures, probably a faulty SD card reader.

Link to post
Share on other sites

Donate and support the project!

  • 0
57 minutes ago, balbes150 said:

@JMCCI am currently trying to install a media script on M1 (rk3328) and I get an error from the armbian-buster-desktop package. Is this my local problem or do you also observe such a problem ?

 

 

Last time I tried, it was working fine, but it was two weeks ago. Let me test when I get home.

Link to post
Share on other sites

  • 0
On 2/10/2021 at 10:17 AM, JMCC said:

 

SQL database errors, weird APT errors... It looks to me like a faulty storage media. Try with some new good quality SD card, like Sandisk Ultra.

 

[EDIT]: IIRC, Rock64 has many hardware problems, that is the reason why we don't support it anymore. That can be the cause for the storage failures, probably a faulty SD card reader.

Ok, I've been trying for 3 days with the native SanDisk Ultra 32Gb HC1 (maybe a bit tired ?) and another new Integral 128 Gb SD XC1 A1. The problems are the same so you're probably right. Is the SDXC enough good quality ?

 

I bought a Emmc 32Gb with the Rock64 but i didn't have the serial cable to flash it. I'm now looking for a way to flash the emmc from just a SD card. It seems nand-sata-install or arbian-config scripts should do the job ?

 

Link to post
Share on other sites

  • 0
1 hour ago, Krapadur said:

I'm now looking for a way to flash the emmc

The problem with the nand-sata-install is that, if your SD card or reader is failing, they will replicate the errors. In this particular case, I would recommend booting the board and then flashing the image on the fly from the web, like this:

wget https://redirect.armbian.com/rock64/Buster_legacy_desktop  -O - | xzcat | dd of=/dev/mmcblk0 bs=1M

Replacing /dev/mmcblk0 with the device node corresponding to your emmc.

Link to post
Share on other sites

  • 0
13 часов назад, JMCC сказал:

I just built a M1 buster-legacy-desktop image, burned to SD, installed media-buster-legacy-rk3328 and played a 160Mbps Jellyfin HEVC 4K sample. Everything went smooth and without errors here

Which branch of MASTER or DESKTOP did you create the image from ? I use creating an image from the DESKTOP branch with all package options enabled. Can you check the installation of the media script on M1 on the image from this directory ?

https://users.armbian.com/balbes150/firefly_station_m1/Armbian/

Link to post
Share on other sites

  • 0
On 2/10/2021 at 12:45 PM, JMCC said:

As I said above, there are some references to x11vnc on the logs you sent.  You simply denied it, but I invite you to read them, x11vnc is there. That is the first problem that needs to be cleared out.

I have tested many combinations, among which I tested without x11vnc and also many other possible suspects. It is directly related to chromium. I have gotten the same log when not running x11vnc.
I ended up writing a PHP script that connects to the streaming website and gets the media and redirects it to mpv.
Chromium needs more work at least on this board (I understand that it is unsupported).

Link to post
Share on other sites

  • 0

Hey there... I'm just a quiet co reader who burns to get into this. Be aware, I'm a linux-noob! 

Well I have a so called leelbox 4k 4gb / 64gb, Rk3328 (I just opened it and there's also a big "T9" on the sticker on the board) , 4 cores, arm v8a 64bit, stock Android 8.1 (so damn boring). Since a few days I browsed the net and found not a lot, but here a few and there a little bit. (surely don't mean the rock chips... 😴) For about 1 ½ days now I'm only here in the armbian forum, struggle a little with Linux language (as a lazy androidian) and I'm just wow blown away, by what these crazy freaks with God-like skills, jmcc, balbes & mates, promise to pimp this little box just by using its skills properly. Well it took me a good while to decide, which box to choose for downloading the buster desktop that's recommended for flashing. Because no box fits perfectly to mine. I struggled between M1, P1 and even Z28 pro, because it really does not really match to one of them. What's your opinion? (It would be a honor to me if I would be allowed to send some photos for better understanding). And perhaps you soon will have one more device in this 'list of pre-choice'. Well I just organized a sdcard and in a few hours we'll see if it's a Z28 or not, when I might have to make it naked again for short curcuiting😉. I love your enthusiasm and engagement in this, you "kerneling romaniacs". 

One more question please: if this will work for me, I have an clean Linux surface and optional kodi. And all the awesome kodi goodies pre-installed and ready to go. I hope I got this right. Now my question, as I mainly use this box for IPTV(using Android apps) and testing around Modded apps(also Android). I mean: is this Linux surface, that I soon will have, a good/acceptable/possible/not-too-bad base  for something like an android Rom (or let it be an emu, even better:change roms without fucking with the kernel...) 

Thanks for listening and for feedback! 

YOU ARE AWSOME, developers!!

All the best wishes from Germany ✌🏽👍🏼😎

Link to post
Share on other sites

  • 0
8 minutes ago, Daniel Will said:

M1, P1

Moin, :P

 

at least for those you should find a couple of threads in this forums since some of us were lucky enough to get them for free in a giveaway from StationGeekers. Both M1 and P1 should be pretty well supported. @balbes150did a tremendous job there.

 

Keep in mind though Armbian does not officially support any TV boxes. Most stuff out there is community driven.

Link to post
Share on other sites

  • 0
4 hours ago, Daniel Will said:

Hey there... I'm just a quiet co reader who burns to get into this. Be aware, I'm a linux-noob! 

Well I have a so called leelbox 4k 4gb / 64gb, Rk3328 (I just opened it and there's also a big "T9" on the sticker on the board) , 4 cores, arm v8a 64bit, stock Android 8.1 (so damn boring). Since a few days I browsed the net and found not a lot, but here a few and there a little bit. (surely don't mean the rock chips... 😴) For about 1 ½ days now I'm only here in the armbian forum, struggle a little with Linux language (as a lazy androidian) and I'm just wow blown away, by what these crazy freaks with God-like skills, jmcc, balbes & mates, promise to pimp this little box just by using its skills properly. Well it took me a good while to decide, which box to choose for downloading the buster desktop that's recommended for flashing. Because no box fits perfectly to mine. I struggled between M1, P1 and even Z28 pro, because it really does not really match to one of them. What's your opinion? (It would be a honor to me if I would be allowed to send some photos for better understanding). And perhaps you soon will have one more device in this 'list of pre-choice'. Well I just organized a sdcard and in a few hours we'll see if it's a Z28 or not, when I might have to make it naked again for short curcuiting😉. I love your enthusiasm and engagement in this, you "kerneling romaniacs". 

One more question please: if this will work for me, I have an clean Linux surface and optional kodi. And all the awesome kodi goodies pre-installed and ready to go. I hope I got this right. Now my question, as I mainly use this box for IPTV(using Android apps) and testing around Modded apps(also Android). I mean: is this Linux surface, that I soon will have, a good/acceptable/possible/not-too-bad base  for something like an android Rom (or let it be an emu, even better:change roms without fucking with the kernel...) 

Thanks for listening and for feedback! 

YOU ARE AWSOME, developers!!

All the best wishes from Germany ✌🏽👍🏼😎

 

I can't find any information about your board from the search engine from my country,if you could provide your SoC model,maybe it helps.But,I don't think such an unknown device can run Linux properly.

Link to post
Share on other sites

  • 0
On 3/17/2021 at 7:41 AM, Gustavo A. Díaz said:


Ok, I missed that one. Anyways, installing Buster of Focal with legacy Kernel makes my Rock64 (4GB) to kernel fault randomly and crash, even at start:

 

 

I have the same problem with my Rock64. I couldn't get it to boot.

 

  

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

[EDIT]: IIRC, Rock64 has many hardware problems, that is the reason why we don't support it anymore. That can be the cause for the storage failures, probably a faulty SD card reader.

 

Are there docs about the problems, anywhere?

 

Link to post
Share on other sites

  • 0
7 hours ago, CeeGO said:

Are there docs about the problems, anywhere?

Search the forums. Don't expect official documents: as we have stated several times, Rock64 is not supported by Armbian, and therefore we won't put resources into it. If you, or any other community member, wants to work on documenting the problems or fixing them, feel free to do it. I don't even own the board.

 

And please start a different thread on the "Peer-to-Peer Support" subforum. Any further post about the Rock64 problems will be deleted from this thread.

Link to post
Share on other sites

  • 0
1 hour ago, balbes150 said:

@JMCC Is everything ok with the download site ? I try to install a package media-buster-legacy-rk3328 and the system says there is no such package. Or is it just a problem on my side ?

I just tested it and it works for me as expected. Maybe some problem with the mirror sync?

Link to post
Share on other sites

  • 0

@JMCCCan you disable binding to a specific kernel ? This causes problems. Now the old version for M1 is in reps, which contains errors , but the package stubbornly puts this version and goes through the manual replacement of files. I also fixed the build of all versions (main kernel and 4.4) for Firefly-rk3328-roc-cc (Libre Renegade rk3328), and the binding prevents the package from being installed quickly. By the way, there is still a problem with KODI on Renegade, it causes the kernel to crash, but this is a problem with other kernel sources for 4.4. LE with the main core works fine on Firefly-rk3328-roc-cc, with remote control, analog sound and HW.

Link to post
Share on other sites

  • 0
On 4/5/2021 at 3:15 PM, balbes150 said:

@JMCCCan you disable binding to a specific kernel ? This causes problems. Now the old version for M1 is in reps, which contains errors , but the package stubbornly puts this version and goes through the manual replacement of files. I also fixed the build of all versions (main kernel and 4.4) for Firefly-rk3328-roc-cc (Libre Renegade rk3328), and the binding prevents the package from being installed quickly. By the way, there is still a problem with KODI on Renegade, it causes the kernel to crash, but this is a problem with other kernel sources for 4.4. LE with the main core works fine on Firefly-rk3328-roc-cc, with remote control, analog sound and HW.

Sorry, I was away. I'll try to fix it ASAP

Link to post
Share on other sites

  • 0

Package update in the repos. It reverts back the addition of station-m1 and station-p1 kernels, to the previous state, when everything worked fine. We are keeping the "Depends" relationship to the legacy kernel, since the package actually depends on the legacy kernel: it won't work with a different kernel, and even more it will break the system if installed.

Link to post
Share on other sites

  • 0

Your sure about video acceleration in chromium?

In chrome://gpu i see "Video Decode: Hardware"

But in chrome://media-internals/ i see "FFmpegVideoDecoder". And when i trying to play 1080p - all cpu cores have 100% load...

Link to post
Share on other sites

  • 0
5 minutes ago, Azq2 said:

Your sure about video acceleration in chromium?

In chrome://gpu i see "Video Decode: Hardware"

But in chrome://media-internals/ i see "FFmpegVideoDecoder". And when i trying to play 1080p - all cpu cores have 100% load...

Decoding is done in software, but the video is displayed in a HW accelerated EGL layer. Otherwise it would not be possible to have vsync and smooth 1080p@60

 

AFAIK Chromium has no HW decoding support in Linux. There was some work going on for using v4l2, I am not sure if it made it into the release already 

Link to post
Share on other sites

  • 0

Has anyone successfully played a 4K video on a RK3328 (eg a Rock64) using mpv and rkmpp?

 

I've been trying this build of mpv on my 4 GB Rock64 running buster legacy try to get it to play a 4K h264  but I've not had one play properly yet. What is the full mpv command to get fullscreen, 4K h264 playback to work with rkmpp, if possible? I've seen commands such as this suggested but it doesn't work for me:

 

 

 mpv --vo=gpu --gpu-api=opengl --gpu-context=drm --gpu-hwdec-interop=drmprime-drm --hwdec=rkmpp video.mkv

 

I've tried various combos of those options. With all the videos I've tried, I either see the first frame of the video then nothing else (I just have to quit mpv), I just get a black screen or it crashes.

Link to post
Share on other sites

  • 0
2 hours ago, Dan MacDonald said:

Has anyone successfully played a 4K video on a RK3328 (eg a Rock64) using mpv and rkmpp?

 

I've been trying this build of mpv on my 4 GB Rock64 running buster legacy try to get it to play a 4K h264  but I've not had one play properly yet. What is the full mpv command to get fullscreen, 4K h264 playback to work with rkmpp, if possible? I've seen commands such as this suggested but it doesn't work for me:

 

 

 mpv --vo=gpu --gpu-api=opengl --gpu-context=drm --gpu-hwdec-interop=drmprime-drm --hwdec=rkmpp video.mkv

 

I've tried various combos of those options. With all the videos I've tried, I either see the first frame of the video then nothing else (I just have to quit mpv), I just get a black screen or it crashes.

Does it work with Kodi or Gst player?

Link to post
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...
 Share

7 7