Posts by CSylvain

    Hello everyone,

    Some of you, I think I followed for several months my research on the creation of a LibreELEC SmartTV with includes a web browser.

    VDR Skin in FrameBuffer - Without X11 ?

    Need your feedback on ARM hardware and framebuffer.

    Thanks to chewitt for this valuable information.


    During these months, I learned a lot, especially the maturity of graphics library and video accelerator to work on a Wayland environment with AMLogic (Kernel V4L2 M2M / mesa-lima), not to mention Chrome which requires a lot of CPU, "WPE / backend-fdo" has been retained, since its opening to QT.


    So I fell back on Raspberry Pi 3 to see that MESA/VC4 (maintained by Broadcom), and very stable, and works perfectly in DRM/KMS under Wayland / Weston.

    However, I have 2 problems, no sound under Kodi, and no video acceleration under Kodi/FFMPEG, the link "/dev/video0" was not found.


    For the problem of sound, many informs that it is necessary to activate the audio like this in the file "config.txt" :

    Code
    # Enable audio (loads snd_bcm2835)
    dtparam=audio=on


    It loads well, but Pulseaudio does not work, even the command :

    Code
    aplay -l


    Stay freeze, and I can not enter another command, or even CTRL + C or CTRL + Z.


    Someone among you has already tried to activate V4L2 M2M under Raspberry Pi 3, with a Kernel 4.19.17 ?


    Thanks in advance !

    I understand your message, but I must take the direction of "WPE" for my project, and it works on a Wayland medium.

    But I think I can adapt to your future changes.

    I otherwise managed to launch it, it was the mali driver that was a problem, and which was to remain in version "r5p1".

    I am now in "r7p0", and it works very well, as well as the animation of the windows :

    20180811074739.png20180811074739.png


    I also launch Kodi, and it starts well, now I have to get the Wayland backend running, so that I can use it in API (flip windows!), Because it puts me a error :

    Code
    Error: Failed to connect to parent Wayland compositor: No such file or directory
    display option: (none), WAYLAND_DISPLAY=wayland-0


    I think that is not looking at the right place : "/run/0-runtime-dir/wayland-0"

    But it starts well with the fbdev backend !


    EDIT :

    I have my answer here : 90562 – failed to create display when use "weston --backend=wayland-backend.so"

    Everything is perfect, I must leave it in "fbdev", as the very well done Amlogic in their buildroot :

    Code
    WAYLAND_DISPLAY=wayland-0 /usr/bin/weston --config=/storage/prj-lo
    cal/etc/aml-weston.ini --backend=fbdev-backend.so --tty=1 --device=/dev/fb0 --
    idle-time=0


    I go now to Kodi, because it runs basic "fbdev" for Amlogic, so I have to change some directives, or even attack some source code.


    To be continued !


    EDIT 2 :

    AMLogic, is the worst e-motional lift ! :


    Can not find this define EGL_PLATFORM_WAYLAND_EXT. ||

    The result is unsatisfactory on the stability of the CPU, Qt WebEngine can not be stable on ARM boxes, I saw on forums, that the result is identical Raspberry Pi.

    Many are turning to a promising project called WPE (WPEWebKit), I'm looking at it, and currently testing the possibilities of making it work with Wayland, and especially Weston in OpenGL.

    Reflecting, I no longer need to patch Kodi (to switch the management of LinuxInputDevices), especially the Kernel, because it is Weston who will manage both windows with the support of opacity, and will guarantee complete compatibility with even PC processors.

    Looking at the buildroot 20180706, you need the driver version MALI r7p0, I tested it with Wetek Play 2 GXB_P200 in fb version, but it does not support it, even Kodi send me this error:

    Code
    ERROR in Mali driver:
    * Device driver API mismatch
    * Device driver API version: 800
    * User space API version: 900
    ERROR: Unable to create GUI. Exiting
    corrupted size vs. prev_size
    Aborted (core dumped)


    I think this is related to the Kernel.


    In short, I stop the support of Wetek Play 2, because I think that its processor will never be compatible with Wayland.

    I have a Raspberry Pi 3, so I will resume testing on it.


    EDIT :

    I found this patch, which makes me discover that I have not updated the GPU driver, maybe the error comes from there : GPU AML - mali update to r7p0 - Subtitles fix - improve AML rendering by wrxtasy · Pull Request #1 · CoreELEC/CoreELEC · GitHub

    I test you this tomorrow !

    Just trust in the folder which are new packages : packages/mediawebtv

    The package/addons/addon-depends, is only version updates, and the renaming of the .install_pkg folder for which it can not be installed in the image.

    The rest is only fixes for compilation under Ubuntu 18.04 LTS, so you can ignore. ;)

    It was faster with otter-browser !

    Here are some screenshots under LibreELEC 8.2.5 Wetek Play 2 (Framebuffer OpenGL /dev/fb0) :

    20180802115551.png


    20180802120909.png


    Side deposit, I'm old school, I do not yet use offset "GIT", but a first share under "ZIP" : MEGA


    I'll share something cleaner by the end of the month, and in a new topic on the forum.

    For those who want to test, I prepare this in the week.

    I see to integrate a full web browser, then I put online a test version.

    I will then follow the recommendations of CvH, to work on an environment V9.xx and to put especially the version 11 of Qt WebEngine, I do not think that I will need to modify my patches with each Alpha output of Kodi.

    I spent several hours putting Falkon, formerly QupZilla, and it's a horror, now you have to install a lot of modules of the KDE Framework, given the amount of lib that will load, it will saturate the boxes under ARM, so I start immediately the integration of otter-browser, the project looks promising, the developers are very active, to do something light, and looking like a web browser Opera.

    Screenshots : Otter Browser

    Yes I have seen, but I work on your Release stable, there is nothing planned for a future version 8.2.6 ? :)

    This will avoid me to redo a patch of Kodi 18, to add in its API, disabling the "CLinuxInputDevices", and other patches for compatibility with the /dev/fb1, I prefer to do when Kodi 18 will be in Stable.

    I just finished successfully setting up QtWebEngine, everything is now functional, even the audio that was missing, I found where the problem came from, and resolved by disabling the support of pulseaudio, Alsa does work very well !

    However, I could not use the latest version, because it includes a chromium recent, which requires at least FFMPEG 3.4 for the support of codec AV1.


    Does anyone have release dates, concerning LibreELEC version with at least one FFMPEG 3.4 ?


    I currently use QtWebEngine 5.10.1, which requires a FFMPEG 3.3, but the compilation works with version 3.1 of Kodi.

    I have under YouTube an overrun of CPU that goes to 150%, but apparently, this is solved under the Falkon browser (I currently use my qtwebtvservice for web applications).


    Thank you for your feedback. ;)

    Yes, but I advise you to empty the function in the file "vnsi.c" like this :

    Code
    int cVnsiDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
    {
    int ret = Length;
    return ret;
    }



    For the tests, it's a bit more complicated, you have to stop "Kodi" and "VDR" :

    Code
    systemctl stop kodi
    systemctl stop service.multimedia.vdr-addon


    Then run manually to read debugging (see my VDR patch VDR Skin in FrameBuffer - Without X11 ? ) :

    Code
    /storage/.kodi/addons/service.multimedia.vdr-addon/bin/vdr.start


    Kodi side, you must use it on another box or computer, it will sometimes insist on the choice of the channel, because at times, the "Stream" changes, but "VDR" does not use the functions of playback audio/video.

    If you wish, I can make a video of the result...


    As you see, there is still work, and I planned to plan the month of July on, and August for the part "WebTV", we will see if it will be interesting to resume this part, when the project of addon will come out.

    A summary of my many days of research and development.

    I have finalized the modification of the plugin vdr-plugin-vnsiserver, and the result is very satisfactory for the loading of the video, the zap it is much faster (like Android) !

    However, at the time of doing the audio part, I had the unpleasant surprise that AMlogic, does not propose Audio acceleration for example of the AC3, that explains why Kodi uses FFMPEG for the Audio part , I unfortunately discovered too late, and prefer to stop this development.

    For the curious, and nothing but the curious, it is here : MEGA


    So I made a comparison between Tvheadend and VDR, it turns out that on a Wetek Play 2 in DVB-T2, it is VDR which is the fastest to receive the request, change the demuxer, and send the stream to Kodi.

    So I will stay on this choice, and finally move on to the next step, which is the integration of a WebTV under Qt WebEngine.


    So I open a topic, without a first version Beta will be released !


    I take this message, to share VDR patch : VDR patches

    I advise you to put them in LibreELEC because they add very useful functions, for example LCN (Logical Channel Numbering).

    It is included since version 2.2.0, but this patch has the advantage of putting this value in the channels.conf file, an example for channel 10: ":A10******" with a French TNT scan :



    There is a little bug of separation (:A10:********), which I will correct in the next days, but the numbers of the channel are correct !

    One could imagine a python script, which modifies the file by putting the channels in the right order, and will display them in Kodi.

    It is also planned on my side, but under a script PHP, because I intend to make a wizard in web application, to scan channels DVB-T2/C/S2. ;)

    For the moment it is in neutral, I explore the possibilities to develop a compatible solution on several hardwares.

    I just opened a topic on the forum of Kodi, concerning the support of the True Color OSD on the plugin "VNSIServer", if such a solution is possible, it will open us nice prospects to integrate the OSD of VDR in Kodi with an animated Skin VDR.


    If nothing is possible, I still have a second solution, which is to use OpenVG, just like the plugin VDR Raspberry Pi HD Device.

    However, Amlogic does not provide support on these GPU Mali, I can not find any file VG/openvg.h and VG/vgu.h, while in the documents, it specifies the support of OpenVG 1.1 : Graphics and Multimedia Processors | Mali-450 GPU – Arm Developer


    I continue my research, waiting for answers at Kodi, see even here !

    what is actually the problem ? doesn't it build ?

    Everything is going very well on this part, I was actually making a comparison with what has already done "AlexELEC". ;)


    I'm starting to understand how "vdr-plugin-vnsiserver" works, it's "Kodi" that connects to it, and gets everything in Socket, including the OSD.

    It remains to be seen if this method can adapt to skins with animations, because I fear that it is frames that are transmitted by Socket command.


    I have otherwise made a small patch in "VDR", for whom I get all the logs ! :

    File : tools.c

    GDB was very useful to me, I was able to locate the problem, and put some "printf" debugging, because the errors with the dsyslog function do not work.

    I quickly knew where the crash comes from, it occurs when the skin does not initialize properly, it will then put the default skin that is "LCARS", and that's where the crash comes.

    So I looked for the reason for this switch to the default skin, and it is this variable that is negative :

    Code
    if (!trueColorAvailable) {
    newSkin->ActivateBackupSkin();
    }


    So I commented "newSkin->ActivateBackupSkin();", and I now have a load without crash, however, I have a black screen, but I see scrolling commands.

    I think I can cope, now that I have many more elements !

    Thank you in any case for your support very fast !


    moham_96 : We must compare the Kernel 3.10 and 3.14, I think the functions are still present, but in another file.

    I'm no longer dealing with OpenATV, I will not have time to import support for this module.