RK3399 Legacy Multimedia Framework


JMCC

Recommended Posts

Donate and support the project!

14 часов назад, NicoD сказал:

Why? I don't know...

There are two DTB files on the site, try the second file (not a plus). Now I checked this file on a Renegade Elite with NVMe connected and my image Buster-legacy , all the basic elements work (NVMe LAN HDMI sound). I can't test P1 + NVMe yet, I don't have a hat for P1, and moving the hat from Elite to P1 takes a lot of time (having time is critical for me).

Link to post
Share on other sites
2 hours ago, balbes150 said:

I can't test P1 + NVMe yet, I don't have a hat for P1,

To reproduce this issue you don't need the hat. Just install Buster legacy on the P1 and copy the .dtb file. Then install the media script and video will be 2x the speed. Also the same when installing the media script first. Then the script works as expected.
Then copy the dtb file and it doesn't work anymore.
I'll try the other file. I only tried the plus. Cheers

Link to post
Share on other sites
18 минут назад, NicoD сказал:

To reproduce this issue you don't need the hat. Just install Buster legacy on the P1 and copy the .dtb file. Then install the media script and video will be 2x the speed. Also the same when installing the media script first. Then the script works as expected.

Now I checked on P1 without NVMe), with the "plus" file-video and sound are accelerated by 2 times, with the non-plus file, video and sound are normal. (DTB files from the site).

NVMe operation has not been verified.

Link to post
Share on other sites
18 часов назад, NicoD сказал:

I found the cause of the problem. 
It's the dtb file for NVMe that's causing it. 

Ha-ha. I checked it again and as I already wrote to you, with the correct configuration of the device for audio output, everything works without problems with the correct audio and video speed (to DTB plus). This is elementary to do through the GUI, in the upper right corner there is a speaker icon, in it you need to correctly select the device for the output of sound by default (the last line is HDMI, the penultimate line is analog sound). You can even open the settings (Volume) and turn off the first device on the last tabs and leave only the HDMI and analog output (by the way, for the analog output, the default is 14% volume and for normal volume, you need to move the slider to 100% in the settings).  :)

Link to post
Share on other sites
1 hour ago, balbes150 said:

Ha-ha. I checked it again and as I already wrote to you, with the correct configuration of the device for audio output, everything works without problems with the correct audio and video speed (to DTB plus). This is elementary to do through the GUI, in the upper right corner there is a speaker icon, in it you need to correctly select the device for the output of sound by default (the last line is HDMI, the penultimate line is analog sound). You can even open the settings (Volume) and turn off the first device on the last tabs and leave only the HDMI and analog output (by the way, for the analog output, the default is 14% volume and for normal volume, you need to move the slider to 100% in the settings).  :)

I'll try that again, I did disable the unused audio devices as you describe. Audio was on but everything was 2x too fast. 

I now tried the non-plus dtb file. With that there's no on-board wifi. USB3 doesn't work. But NVMe does work with it. 
Video playback is at normal speed. But Chromium doesn't seem to be set up well.
 

Spoiler

Graphics Feature Status
Canvas: Software only. Hardware acceleration disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Disabled
Out-of-process Rasterization: Disabled
OpenGL: Disabled
Hardware Protected Video Decode: Disabled
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Disabled
WebGL2: Disabled
Problems Detected
GPU process was unable to boot: GPU access is disabled due to frequent crashes.
Disabled Features: all
Gpu compositing has been disabled, either via blocklist, about:flags or the command line. The browser will fall back to software compositing and hardware acceleration will be unavailable.
Disabled Features: gpu_compositing
Accelerated video decode has been disabled, either via blocklist, about:flags or the command line.
Disabled Features: video_decode
Accelerated rasterization has been disabled, either via blocklist, about:flags or the command line.
Disabled Features: rasterization

 

I'll try again with the plus file.

Link to post
Share on other sites
8 минут назад, NicoD сказал:

I'll try that again, I did disable the unused audio devices as you describe. Audio was on but everything was 2x too fast. 

I don't believe it.....:) So you're doing something wrong. :) I can change the audio output device on the fly (when playing a test video) and immediately see how the speed changes. if I select the" wrong " device (the first in the list), the sound and video are accelerated, if I change to HDMI or analog, the video and sound are normalized and works correctly. Please note that I do all the tests on my builds. Can you check the latest version from here ?

https://disk.yandex.ru/d/UCuJsFE_c7yWCA?w=1

Link to post
Share on other sites
1 hour ago, balbes150 said:

You can even open the settings (Volume) and turn off the first device on the last tabs and leave only the HDMI and analog output

It works. I had the 2nd and 3th disabled and had the 2x speed still coming out of my displays speakers.
I now disabled the first and 2nd and it plays at normal speed. Very weird behaviour.

Video doesn't seem hw acc. There is screen tearing. So one step forwards, 2 steps backwards... 
Something different between the original dtb file and the NVMe dtb file must be causing this I'd guess.
ps: check "chrome://gpu
Without the nvme dtb everything is on, with everything is turned off.

Link to post
Share on other sites

Okay, NanoPC-T4 can run now dual displays, and GPU 3D acceleration works flawlessly:

https://users.armbian.com/jmcc/misc/nanopct4-dual-screen.mp4

 

@TheGuv It seems like a problem specific to Helios64. @aprayoga Maybe you can shed some light on the problem? This is the post where the user reported failing GPU acceleration: https://forum.armbian.com/topic/16516-rk3399-legacy-multimedia-framework/?do=findComment&comment=116900

 

[EDIT]: And this is the fix that enabled NanoPC-T4 DP, in case it is helpful to debug the Helios64 problem: https://github.com/armbian/build/pull/2647

 

 

Link to post
Share on other sites

Great job!

I just test it in Orange Pi4,it runs great ,thanks a lot for your job.

And I'm so curious about the process of generating the package.

I found that there was a post about rk3399 media script before, but the download link has failed. I'm so sad.

Can you give me some advices about the script?

Link to post
Share on other sites
On 2/25/2021 at 11:30 AM, Gzzz said:

And I'm so curious about the process of generating the package

If you look at the first post, you have the information about the sources for all the packages, pointing at my GitHub repos. Most of them include instructions in the repo's README. If you have some doubt, you can ask and I will try to help.

 

On 2/25/2021 at 11:30 AM, Gzzz said:

Can you give me some advices about the script?

As you can see in the script's post, it is deprecated in favor of this integration. All the features are ported, and the sources info is more complete here, so there is no more use for the script.

Link to post
Share on other sites

Hi @JMCC  thanks for media script and integration. 

 

I just tested it on NanoPC T4 , installed Buster kernel 4.4 
(Linux version 4.4.213-rk3399 (root@hirsute) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) )

 

apt update & upgrade

installed your media package

 

but: 

1) mpv (use the command line switch "--gpu-context=drm") - if I run it, I can hear sound but no video.  I run it as mpv --gpu-context=drm Ford.V.Ferrari.2019.2160p.4K.BluRay.x265.10bit.AAC5.1-\[YTS.MX\].mkv

2) gstreamer  (with "gst-play-1.0 --videosink=kmssink") - by running "gst-play-1.0" in terminal "command not found: gst-play-1.0".  But the GUI version is installed

3) 4K videos - in past I used to use mpv-gdb (your old script) and run it from terminal and the 4K videos would run better than in mpv or from GUI - but this app is missing

4) KODI - after logout and login I got black screen. and after while my tv turn off. (then I have to edit .dmrc -> comment Session section and /etc/init.d/lightdm restart) to be able to get back login screen

 

 

Did I do something different or wrongly ? (I tried to re-install the package again but no difference with points above) 

 

thanks for any tip

 

marek

 

 

 

Link to post
Share on other sites
7 hours ago, majecek said:

Hi @JMCC  thanks for media script and integration. 

 

I just tested it on NanoPC T4 , installed Buster kernel 4.4 
(Linux version 4.4.213-rk3399 (root@hirsute) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) )

 

apt update & upgrade

installed your media package

 

but: 

1) mpv (use the command line switch "--gpu-context=drm") - if I run it, I can hear sound but no video.  I run it as mpv --gpu-context=drm Ford.V.Ferrari.2019.2160p.4K.BluRay.x265.10bit.AAC5.1-\[YTS.MX\].mkv

2) gstreamer  (with "gst-play-1.0 --videosink=kmssink") - by running "gst-play-1.0" in terminal "command not found: gst-play-1.0".  But the GUI version is installed

3) 4K videos - in past I used to use mpv-gdb (your old script) and run it from terminal and the 4K videos would run better than in mpv or from GUI - but this app is missing

4) KODI - after logout and login I got black screen. and after while my tv turn off. (then I have to edit .dmrc -> comment Session section and /etc/init.d/lightdm restart) to be able to get back login screen

 

 

Did I do something different or wrongly ? (I tried to re-install the package again but no difference with points above) 

 

thanks for any tip

 

marek

 

 

 

Please re-read the first post carefully, I think you may find the answer there.

 

Also, in order to get help, you need to provide some information, as indicated in the forum rules. Please provide that information if you still need help.

Link to post
Share on other sites
1 hour ago, JMCC said:

Please re-read the first post carefully, I think you may find the answer there.

 

Also, in order to get help, you need to provide some information, as indicated in the forum rules. Please provide that information if you still need help.

 

Hi,

I did steps from 1st post. There were no issue with installation. 

 

here is output of sudo armbianmonitor -u

http://ix.io/2U1G

Link to post
Share on other sites
6 hours ago, maj said:

 

Hi,

I did steps from 1st post. There were no issue with installation. 

 

here is output of sudo armbianmonitor -u

http://ix.io/2U1G

Okay. Since I saw the hostname is "hirsute", I thought you were using Hirsute instead of Buster. That is the reason why we ask for armbianmonitor -u  :)

 

Please post the console output of mpv and gst-play-1.0 (you may need to install 

gstreamer1.0-plugins-base-apps)

 

Link to post
Share on other sites
2 hours ago, JMCC said:

Okay. Since I saw the hostname is "hirsute", I thought you were using Hirsute instead of Buster. That is the reason why we ask for armbianmonitor -u  :)

 

Please post the console output of mpv and gst-play-1.0 (you may need to install 

gstreamer1.0-plugins-base-apps)

 

Hi JMCC,


mpv output: http://ix.io/2U3G


ok, missing gst-play is fixed by installing "gstreamer1.0-plugins-base-apps" (maybe it is good to put this in 1st comment)

gst-play output: http://ix.io/2U3K

 

strange thing happened after installing gstreamer1.0-plugins-base-apps 

gstream-gui (I had this one already) - is playing sound but not video :) (just black window, but lower there is "histogram" and I can see that it is moving and sound is coming out)

gst-play - plays video but not sound :) 

 

 

Link to post
Share on other sites
26 minutes ago, maj said:

Hi JMCC,


mpv output: http://ix.io/2U3G


ok, missing gst-play is fixed by installing "gstreamer1.0-plugins-base-apps" (maybe it is good to put this in 1st comment)

gst-play output: http://ix.io/2U3K

 

strange thing happened after installing gstreamer1.0-plugins-base-apps 

gstream-gui (I had this one already) - is playing sound but not video :) (just black window, but lower there is "histogram" and I can see that it is moving and sound is coming out)

gst-play - plays video but not sound :) 

 

 

Can you test with a different monitor and/or source files? Try to downgrade. For example, if you are using a 4k monitor, try a 1080p one. Or if you are using HDR 10-bit, try 8-bit color.

Link to post
Share on other sites
4 hours ago, JMCC said:

Can you test with a different monitor and/or source files? Try to downgrade. For example, if you are using a 4k monitor, try a 1080p one. Or if you are using HDR 10-bit, try 8-bit color.

 

I have some update. 

 

xfce has "monitor" app and I found that it shows me 2 monitors. Later on I noticed that e-DP and HDMI and both were turned on. 

I turned off the e-DP (I guess this one is through usb-c connector). 

 

This solved few things: 

* when running mpv in full screen it plays fine as well as in windowed  (there was slight difference and I guess I didn't mentioned it)

* gstream-gui - video start playing (I guess it was showing video on the "other monitor" 

 

measuring: 

* mpv -1080p movie - CPU aaround 50%

* mpv --gpu-context-drm - 4K movie - CPU around 20% (but not showing video only sound)

* gstream-gui - 4K movie - CPU around 20% video and sound fine

* gst-play-1.0 --videosink=kmssink - fails  - can't find videosink => http://ix.io/2U5I 

 

so right now only possible way to play 4K video is through gstream-gui. Hmm I still think that something is not right. 

 

 

Link to post
Share on other sites
7 hours ago, maj said:

I noticed that e-DP and HDMI and both were turned on. 

Yes, that was my guess. That will require a kernel fix.

 

7 hours ago, maj said:

(I guess this one is through usb-c connector)

No, it's the golden connector on the top right corner, next to the GPIO pins

Link to post
Share on other sites

Since scouring the internet/forums has turned up nothing relevant... I have a Orange Pi 4(RK3399), while using legacy-buster (4.4), and installed all suggested packages. Kodi-gbm works as expected (some performance hitching on some media and menu's, but cpu load is low in htop, so i can assume its not related to video decoding).

The problem is, it doesnt detect my 4k Televisions resolutions above 1080p@60hz, and i cannot for the life of me get 5.1 pcm over HDMI. It peaks out at 3.1, even if i select 5.1, rear channels just do not play at all. | beyond that everything works fine...

Is there no way to fix resolution list in kodi and 5.1 pcm over hdmi? (id love passthrough, but everything i read suggests its not possible)

 

im currently setting up a mainline-focal test sd, to see if it exibits the same issues on 5.10.xx(pinefrost)

Link to post
Share on other sites

In short, HW decoding on ARM boards is messy at this moment (check this summary). I'm not sure you'll get far with Kodi on Armbian. LibreELEC uses a lot of out-of-tree ffmpeg and kernel patches to achieve good Kodi overall performance (they are being gradually upstreamed, but that takes time), so I suggest you try that image first.

 

Note: Passthrough on RK3399 is possible - it uses similar peripherals and concept as Allwinner H6, for which I have experimental passthrough patches, even for HBR. But that also needs proper ALSA config, where I have issues...

 

EDIT: I'm talking about mainline kernels - passthrough on RK 4.4 kernel uses custom approach. Kodi would need adjustments to use it.

Link to post
Share on other sites
1 hour ago, jernej said:

I'm not sure you'll get far with Kodi on Armbian.

We've gotten quite far, after plenty of work. You can check it by yourself by installing the multimedia framework as described in the first post :)

Of course, LibreELEC is a multimedia-player-specific distro, and will always be the reference implementation on this field. But our multimedia framework is more than just video playing (which still does quite well, using several patches from LibreELEC and many from our own). Apart from that, it also includes HW encoding, ISP camera, OpenCL, 3D desktop acceleration, etc. Our intention is not to compete with LibreELEC, but to offer a more versatile option that maintains all the possibilities of a full-featured Linux desktop.

 

7 hours ago, EndlessEden said:

it doesnt detect my 4k Televisions resolutions

We cannot help you if you don't provide more information, like "armbianmonitor -u" and kodi logs.

Link to post
Share on other sites
vor 21 Stunden schrieb jernej:

Note: Passthrough on RK3399 is possible - ... But that also needs proper ALSA config, where I have issues...

Hm, I have a rockpi 4A connected to AVR via HDMI and video playback by beamer.

Using nightly LE works quite good (some audio dropouts regularly, but acceptable), but Armbian Legacy Multimedia does not give any sound at all.

I followed the advices in this thread (without self compiling).

 

With this multimedia setup I can't even select HDMI audio. There's only internal audio and I don't know, where that should be connected ...

 

What did I miss? How can I setup HDMI audio output in armbian?

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