Posts by Cfan

    This has been failing to build on the nightlies for a few days. It looks like this version may have been removed.

    If there is a better place to report this or not report failures like this, please let me know.

    Here is my build command

    cd ~

    rm -r LibreELEC.tv

    git clone https://github.com/LibreELEC/LibreELEC.tv.git

    cd LibreELEC.tv

    PROJECT=RPi ARCH=aarch64 DEVICE=RPi4 make image


    GET procps-ng (archive)

    --2023-03-28 01:35:00-- https://gitlab.com/procps-ng/proc…v3.3.17.tar.bz2

    Resolving gitlab.com (gitlab.com)... 2606:4700:90:0:f22e:fbec:5bed:a9b9, 172.65.251.78

    Connecting to gitlab.com (gitlab.com)|2606:4700:90:0:f22e:fbec:5bed:a9b9|:443... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: unspecified [application/octet-stream]

    Saving to: '/home/dietpi/http://LibreELEC.tv/sources/procps-ng/procps-ng-3.3.17.tar.bz2'


    /home/die [<=> ] 0 --.-KB/s

    /home/diet [ <=> ] 458.68K 2.02MB/s

    /home/dietpi/LibreE [ <=> ] 932.65K 2.99MB/s in 0.3s

    2023-03-28 01:35:00 (2.99 MB/s) - '/home/dietpi/http://LibreELEC.tv/sources/procps-ng/procps-ng-3.3.17.tar.bz2' saved [955031]

    WARNING Incorrect checksum calculated on downloaded file: got 463f3dc84d5147bb949a8ec56a1bb59cf0449aa1a12be45ddfffc c2fc432571c wanted 8374d281f91e5fc9bb9ea8dc991b25331e3a2b0299b46f22c633f7fb6bcb0764

    --2023-03-28 01:35:00-- http://sources.libreelec.tv/mirror/procps-…-3.3.17.tar.bz2

    Resolving sources.libreelec.tv (sources.libreelec.tv)... 138.68.75.163

    Connecting to sources.libreelec.tv (sources.libreelec.tv)|138.68.75.163|:80... connected.

    HTTP request sent, awaiting response... 301 Moved Permanently

    Location: https://sources.libreelec.tv/mirror/procps-…-3.3.17.tar.bz2 [following]

    --2023-03-28 01:35:01-- https://sources.libreelec.tv/mirror/procps-…-3.3.17.tar.bz2

    Connecting to sources.libreelec.tv (sources.libreelec.tv)|138.68.75.163|:443... connected.

    HTTP request sent, awaiting response... 404 Not Found

    2023-03-28 01:35:01 ERROR 404: Not Found.

    --2023-03-28 01:35:01-- https://gitlab.com/procps-ng/proc…v3.3.17.tar.bz2

    Resolving gitlab.com (gitlab.com)... 2606:4700:90:0:f22e:fbec:5bed:a9b9, 172.65.251.78

    Connecting to gitlab.com (gitlab.com)|2606:4700:90:0:f22e:fbec:5bed:a9b9|:443... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: unspecified [application/octet-stream]

    Saving to: '/home/dietpi/http://LibreELEC.tv/sources/procps-ng/procps-ng-3.3.17.tar.bz2'


    /home/die [<=> ] 0 --.-KB/s

    /home/diet [ <=> ] 298.49K 1.17MB/s

    /home/dietp [ <=> ] 554.37K 1.18MB/s

    /home/dietpi/LibreE [ <=> ] 932.65K 1.61MB/s in 0.6s

    2023-03-28 01:35:02 (1.61 MB/s) - '/home/dietpi/http://LibreELEC.tv/sources/procps-ng/procps-ng-3.3.17.tar.bz2' saved [955031]

    WARNING Incorrect checksum calculated on downloaded file: got 463f3dc84d5147bb949a8ec56a1bb59cf0449aa1a12be45ddfffc c2fc432571c wanted 8374d281f91e5fc9bb9ea8dc991b25331e3a2b0299b46f22c633f7fb6bcb0764

    --2023-03-28 01:35:02-- http://sources.libreelec.tv/mirror/procps-…-3.3.17.tar.bz2

    Resolving sources.libreelec.tv (sources.libreelec.tv)... 138.68.75.163

    Connecting to sources.libreelec.tv (sources.libreelec.tv)|138.68.75.163|:80... connected.

    HTTP request sent, awaiting response... 301 Moved Permanently

    Location: https://sources.libreelec.tv/mirror/procps-…-3.3.17.tar.bz2 [following]

    --2023-03-28 01:35:02-- https://sources.libreelec.tv/mirror/procps-…-3.3.17.tar.bz2

    Connecting to sources.libreelec.tv (sources.libreelec.tv)|138.68.75.163|:443... connected.

    HTTP request sent, awaiting response... 404 Not Found

    2023-03-28 01:35:03 ERROR 404: Not Found.


    Cannot get procps-ng sources : https://gitlab.com/procps-ng/proc…v3.3.17.tar.bz2

    Try later!

    *********** FAILED COMMAND ***********

    . "${get_handler}"

    **************************************

    *********** FAILED COMMAND ***********

    ${SCRIPTS}/get "${PKG_NAME}"

    **************************************

    *********** FAILED COMMAND ***********

    ${SCRIPTS}/unpack "${PKG_NAME}" "${PARENT_PKG}"

    I have resolved this issue. There were two issues preventing this from working. One was the container was configured to run as a non-root user in start.sh. The second is specifying the correct device name as the default would not work. There apparently is no hardware mixer or I could not find the correct configuration.

    #!/bin/sh

    #start.sh

    set -e

    rm -rf /var/run/dbus.pid

    #mkdir -p /var/run/dbus

    dbus-uuidgen --ensure

    dbus-daemon --system

    avahi-daemon --daemonize --no-chroot

    #su-exec shairport-sync shairport-sync $@ --Does not work

    #su-exec root shairport-sync $@ -- Works

    shairport-sync $@ # Works

    shairport-sync.conf:

    ...

    // Back End Settings

    // These are parameters for the "alsa" audio back end.

    // For this section to be operative, Shairport Sync must be built with the following configuration flag:

    // --with-alsa

    alsa =

    {

    output_device = "hdmi:CARD=HDMI,DEV=0"; // the name of the alsa output device. Use "shairport-sync -h" to discover the names of ALSA hardware devices. Use "alsamix>

    // mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software.

    // mixer_device = "HDMI,DEV=0"; //

    ...

    Thanks to all who replied.

    Now I know that speaker-test works from Docker on Libreelec, I was hoping to get some help getting the shairport-sync-docker container running. I can run it just fine on Debian so I know it works.

    I have been working with the author trying get his container to run on Libreelec but have not had any success and just get these errors in the container log. Many combinations have been tried. I think it comes down to linux security and device access.

    If anybody has any suggestions things to try differently in the Dockerfile or the Entrypoint start.sh, it would be greatly appreciated.

    LibreELECWyse:~ # aplay -l

    **** List of PLAYBACK Hardware Devices ****

    card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]

    Subdevices: 1/1

    Subdevice #0: subdevice #0

    card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]

    Subdevices: 1/1

    Subdevice #0: subdevice #0

    card 1: Generic [HD-Audio Generic], device 0: ALC231 Analog [ALC231 Analog]

    Subdevices: 1/1

    Subdevice #0: subdevice #0

    docker run -d --rm --restart unless-stopped --privileged --net host --device /dev/snd mikebrady/shairport-sync -a DenSystem -- -d hw:0

    docker run -d --rm --restart unless-stopped --privileged --net host --device /dev/snd mikebrady/shairport-sync -a DenSystem -- -d hw:0,3


    ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card,

    ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card,


    From GitHub - mikebrady/shairport-sync-docker: Docker setup for Shairport Sync

    Dockerfile for shairport-sync

    FROM alpine:3.12 AS builder-base

    # General Build System:

    RUN apk -U add \

    git \

    build-base \

    autoconf \

    automake \

    libtool \

    dbus \

    su-exec \

    alsa-lib-dev \

    libdaemon-dev \

    popt-dev \

    mbedtls-dev \

    soxr-dev \

    avahi-dev \

    libconfig-dev \

    libsndfile-dev \

    mosquitto-dev \

    xmltoman

    # ALAC Build System:

    FROM builder-base AS builder-alac

    RUN git clone GitHub - mikebrady/alac: Apple Lossless Codec and Utility with Autotools

    WORKDIR alac

    RUN autoreconf -fi

    RUN ./configure

    RUN make

    RUN make install

    # Shairport Sync Build System:

    FROM builder-base AS builder-sps

    # This may be modified by the Github Action Workflow.

    ARG SHAIRPORT_SYNC_BRANCH=master

    COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/

    COPY --from=builder-alac /usr/local/lib/pkgconfig/alac.pc /usr/local/lib/pkgconfig/alac.pc

    COPY --from=builder-alac /usr/local/include /usr/local/include

    RUN git clone GitHub - mikebrady/shairport-sync: AirPlay audio player. Shairport Sync adds multi-room capability with Audio Synchronisation

    WORKDIR shairport-sync

    RUN git checkout "$SHAIRPORT_SYNC_BRANCH"

    RUN autoreconf -fi

    RUN ./configure \

    --with-alsa \

    --with-dummy \

    --with-pipe \

    --with-stdout \

    --with-avahi \

    --with-ssl=mbedtls \

    --with-soxr \

    --sysconfdir=/etc \

    --with-dbus-interface \

    --with-mpris-interface \

    --with-mqtt-client \

    --with-apple-alac \

    --with-convolution

    RUN make -j $(nproc)

    RUN make install

    # Shairport Sync Runtime System:

    FROM alpine:3.12

    RUN apk -U add \

    alsa-lib \

    dbus \

    popt \

    glib \

    mbedtls \

    soxr \

    avahi \

    libconfig \

    libsndfile \

    mosquitto-libs \

    su-exec \

    libgcc \

    libgc++

    RUN rm -rf /lib/apk/db/*

    COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/

    COPY --from=builder-sps /etc/shairport-sync* /etc/

    COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-dbus.conf /etc/dbus-1/system.d/

    COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/

    COPY --from=builder-sps /usr/local/bin/shairport-sync /usr/local/bin/shairport-sync

    # Create non-root user for running the container -- running as the user 'shairport-sync' also allows

    # Shairport Sync to provide the D-Bus and MPRIS interfaces within the container

    RUN addgroup shairport-sync

    RUN adduser -D shairport-sync -G shairport-sync

    # Add the shairport-sync user to the pre-existing audio group, which has ID 29, for access to the ALSA stuff

    RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio

    COPY start.sh /

    ENTRYPOINT [ "/start.sh" ]

    /start.sh code listing:

    Go back to studying the documentation about docker, the --privileged parameter allows access to the hardware and therefore the audio output

    Thank you for the reply.

    The rest of this post basically answers my original question since today I was able to have success with speaker-test in a container and could hear it from the receiver.

    I had found --privileged and used it in prior attempts. It does permit the listing of /proc/asound, but I could not get beyond that.

    ls -al /proc/asound

    LibreELECWyse:~ # aplay -L

    null

    Discard all samples (playback) or generate zero samples (capture)

    hdmi:CARD=HDMI,DEV=0

    HDA ATI HDMI, HDMI 0

    HDMI Audio Output

    hdmi:CARD=HDMI,DEV=1

    HDA ATI HDMI, HDMI 1

    HDMI Audio Output

    sysdefault:CARD=Generic

    HD-Audio Generic, ALC231 Analog

    Default Audio Device

    front:CARD=Generic,DEV=0

    HD-Audio Generic, ALC231 Analog

    Front output / input

    surround21:CARD=Generic,DEV=0

    HD-Audio Generic, ALC231 Analog

    2.1 Surround output to Front and Subwoofer speakers

    surround40:CARD=Generic,DEV=0

    HD-Audio Generic, ALC231 Analog

    4.0 Surround output to Front and Rear speakers

    surround41:CARD=Generic,DEV=0

    I made a docker container to run speaker-test and did get sound output. Dockerfile:

    FROM alpine:3.12

    RUN apk --no-cache add alsa-utils

    CMD [ "sh" ]

    LibreELECWyse:~ # docker run --rm --privileged --device /dev/snd aucdb speaker-test -D hdmi:CARD=HDMI,DEV=0 -c 2 -b544000

    speaker-test 1.2.2

    Playback device is hdmi:CARD=HDMI,DEV=0

    Stream parameters are 48000Hz, S16_LE, 2 channels

    Using 16 octaves of pink noise

    Rate set to 48000Hz (requested 48000Hz)

    Buffer size range from 64 to 8544000

    Period size range from 32 to 4272000

    Requested buffer time 544000 us

    Periods = 4

    was set period_size = 6528

    was set buffer_size = 26112

    0 - Front Left

    1 - Front Right

    Time per period = 5.453585

    0 - Front Left

    ...

    Thanks to all.

    Is it possible for Docker containers to output audio to alsa on Libreelec? I have done a lot of searching and have not seen this question answered directly, but indirectly I see indications that yes it can and no it can't.

    If it can is there some kind of reference container that shows the proof of concept?

    Is there a work around using pulse audio or some other means?

    Thanks all.

    Solved

    The TV was in Stretch view mode. Chrome works perfectly now.

    -----------------

    Thanks for getting Chrome up and running in LE 10.

    I am having one issue with it in that it overscans so that the top right minimize/restore/full screen buttons are not visible and the left side back arrow is not visible. The mouse can still get to the buttons, but it takes some guessing and practice.

    I tried various settings for the addon and tried underscanning Kodi, but nothing worked. I did not see any advanced setting in Chrome that might help.

    Running on generic x64 with an Nvidia 1030 card. Would posting logs help or do you have any another suggestions for a fix? Thanks.

    Likely DOS line endings. Try dos2unix /storage/.kodi/userdata/keymaps/AVMD0.py

    Edit:

    Thanks mglae, that worked. I'll stick with nano and notepad++ now.

    I have it working as it should now. I changed the xml file from remote.xml instead of keyboard.xml. I am not sure it made the difference, but is correct in this case.

    In addition to the tv View Mode that was toggling, I was getting some kind of kodi context windows up most of the time, especially on successive key process.

    I changed the key from f12 to alt-f12 and it made no difference, but I am sticking with that.

    I then changed the MCE remote key from Visualizations to Aspect and it fixed the problem. The visualizations key must be sending some kind of multiple codes that flirc didn't process with the key map.

    Thanks again to all who chimed in here and to all the libreelec and kodi contributors!

    Thanks for your reply lrusak. I tried that and the f12 key press is still recognized, but nothing happens which is somewhat of an improvement. Does it matter that python script does not work at the command line unless the interpreter is specified?

    LibreELECMacPro:~ # /storage/.kodi/userdata/keymaps/AVMD0.py

    ': No such file or directory

    LibreELECMacPro:~ # python3 /storage/.kodi/userdata/keymaps/AVMD0.py

    LibreELECMacPro:~ #

    #!/usr/bin/env python3

    import sys

    import socket

    tcpsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    tcpsocket.connect( ('192.168.1.206', 10002) )tcpsocket.sendall(b'\rAVMD0 \r')

    data = tcpsocket.recv(1024)

    tcpsocket.close()

    #print('Received', repr(data))

    exit

    <?xml version="1.0" encoding="UTF-8"?>

    <keymap>

    <global>

    <keyboard>

    <f12>System.Exec(/storage/.kodi/userdata/keymaps/AVMD0.py)</f12>

    </keyboard>

    </global>

    </keymap>

    Using Libreelec 10 beta 2, I am trying to map a keyboard f12 key to this System.Exec() call in order to toggle the AV mode over a tcp socket from my keyboard or remote.

    It seems to do something because if I press f12 twice it resets Kodi, so something is wrong and I could use some help or suggestions for a better way to accomplish the same thing. It does not toggle the AV mode like the command does in an ssh window.

    I tried to use log file uploader, but it crashed. I send a one of the log files and try again with the log file uploader if needed.

    Per the log, I can see that the keymap is applied when f12 is pressed and it tries to run python3 /storage/.kodi/userdata/keymaps/AVMD0.py. The command python3 /storage/.kodi/userdata/keymaps/AVMD0.py or /usr/bin/python3 /storage/.kodi/userdata/keymaps/AVMD0.py runs perfectly from an ssh command line.

    keymap.xml:

    <?xml version="1.0" encoding="UTF-8"?>

    <keymap>

    <global>

    <keyboard>

    <f12>System.Exec(/usr/bin/python3 /storage/.kodi/userdata/keymaps/AVMD0.py)</f12>

    </keyboard>

    </global>

    </keymap>

    AVMD0.py:

    import sys

    import socket

    tcpsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    tcpsocket.connect( ('192.168.1.206', 10002) )

    tcpsocket.sendall(b'\rAVMD0 \r')

    data = tcpsocket.recv(1024)

    tcpsocket.close()

    #print('Received', repr(data))

    exit

    Two F12 key presses from the log:

    2021-05-11 11:20:23.544 T:1344 DEBUG <general>: Keyboard: scancode: 0x60, sym: 0x0125, unicode: 0x0000, modifier: 0x0

    2021-05-11 11:20:23.544 T:1344 DEBUG <general>: HandleKey: f12 (0xf09b) pressed, action is System.Exec(python3 /storage/.kodi/userdata/keymaps/AVMD0.py)

    2021-05-11 11:20:23.877 T:1344 DEBUG <general>: Keyboard: scancode: 0x60, sym: 0x0125, unicode: 0x0000, modifier: 0x0

    2021-05-11 11:20:25.691 T:1344 INFO <general>: Skipped 1 duplicate messages..

    2021-05-11 11:20:25.691 T:1344 DEBUG <general>: HandleKey: f12 (0xf09b) pressed, action is System.Exec(python3 /storage/.kodi/userdata/keymaps/AVMD0.py)


    Thanks in advance for any help with this!