Controlling VLC

I'm trying to create a flow to play videos on a Raspberry Pi using VLC. However, I'm having trouble even starting VLC with Node Red. Simply using an exec node to run "vlc" does not work.

Here are some of the things I've tried, these were all fed into the exec node:

  • simply calling "vlc " returns an endless stream of errors with code b2314f30, "mmal_codec filter error"
  • "export DISPLAY=:0", this allowed me to start VLC through an SSH terminal but does not seem to help when I run it in node red. Running this command returns an error code of -2.
  • "DISPLAY=:0 vlc", same behavior as above

Would anyone be able to point me in the right direction? Just getting VLC to start would be a big step.

Try calling cvlc instead?

1 Like

"cvlc" seems to have the same behavior as "vlc". Works fine from my SSH terminal, returns the same "mmal_codec filter error" when I run it through Node Red.

Can you post an example failing flow?

What if you run the command with the flags -vv --logfile=/home/pi/temp/vlclog.txt after it? What is the output of the log file?

I hope I'm formatting this correctly...

@Colin

Here is an example flow:

[
    {
        "id": "f2bcc0b64ed87080",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "788bfcaf2568089c",
        "type": "debug",
        "z": "f2bcc0b64ed87080",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": true,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 140,
        "wires": []
    },
    {
        "id": "bda4b032f8bafcdc",
        "type": "exec",
        "z": "f2bcc0b64ed87080",
        "command": "",
        "addpay": "payload",
        "append": "",
        "useSpawn": "true",
        "timer": "",
        "winHide": false,
        "oldrc": false,
        "name": "",
        "x": 450,
        "y": 180,
        "wires": [
            [
                "788bfcaf2568089c"
            ],
            [
                "52d1681823e0de46"
            ],
            [
                "a5101ca670bc7487"
            ]
        ]
    },
    {
        "id": "52d1681823e0de46",
        "type": "debug",
        "z": "f2bcc0b64ed87080",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": true,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 180,
        "wires": []
    },
    {
        "id": "a5101ca670bc7487",
        "type": "debug",
        "z": "f2bcc0b64ed87080",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": true,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 220,
        "wires": []
    },
    {
        "id": "ebac652b0732894b",
        "type": "inject",
        "z": "f2bcc0b64ed87080",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "vlc /home/pi/Desktop/Squirrel.mp4",
        "payloadType": "str",
        "x": 310,
        "y": 180,
        "wires": [
            [
                "bda4b032f8bafcdc"
            ]
        ]
    },
    {
        "id": "19b5bf46199322a6",
        "type": "inject",
        "z": "f2bcc0b64ed87080",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "vlc",
        "payloadType": "str",
        "x": 310,
        "y": 140,
        "wires": [
            [
                "bda4b032f8bafcdc"
            ]
        ]
    },
    {
        "id": "0bc4bf6a40458f7f",
        "type": "inject",
        "z": "f2bcc0b64ed87080",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "vlc -vv --logfile=/home/pi/temp/vlclog.txt",
        "payloadType": "str",
        "x": 310,
        "y": 220,
        "wires": [
            [
                "bda4b032f8bafcdc"
            ]
        ]
    }
]

Here is the output of "vlc" by itself:

2 Aug 11:04:29 - [info] [debug:debug 2]
[01636918] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
2 Aug 11:04:29 - [info] [debug:debug 2]
[01671c40] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[01671c40] main interface error: no suitable interface module
[015b7b98] main libvlc error:
2 Aug 11:04:29 - [info] [debug:debug 2]
interface "dbus,none" initialization failed
[0165c100] lua interface error: password not configured
[0165c100] lua interface: Please specify the password in the preferences.
[0165c100] main interface error: no suitable interface module
2 Aug 11:04:29 - [info] [debug:debug 2]
[015b7b98] main libvlc error: interface "telnet,none" initialization failed
2 Aug 11:04:29 - [info] [debug:debug 2]
[01671c40] [http] lua interface: Lua HTTP interface
[01621210] main interface error: no suitable interface module
[015b7b98] main libvlc error: interface "globalhotkeys,none" initialization failed
[015b7b98] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
2 Aug 11:04:29 - [info] [debug:debug 2]
[01671c40] [http] main interface error: socket bind error: Address already in use
[01671c40] [http] main interface error: socket bind error: Address already in use
[01671c40] [http] main interface error: cannot create socket(s) for HTTP host
[01671c40] [http] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/http.luac: lua/intf/http.lua:338: Failed to create HTTP host
2 Aug 11:04:30 - [info] [debug:debug 2]
error: XDG_RUNTIME_DIR not set in the environment.
2 Aug 11:04:30 - [info] [debug:debug 2] [01621210]
2 Aug 11:04:30 - [info] [debug:debug 2] skins2 interface error:
2 Aug 11:04:30 - [info] [debug:debug 2] cannot initialize OSFactory
2 Aug 11:04:30 - [info] [debug:debug 2]
2 Aug 11:04:30 - [info] [debug:debug 2]
[016357c0] main playlist: playlist is empty
2 Aug 11:04:30 - [info] [debug:debug 2]
[01621210] [cli] lua interface: Listening on host "*console".
2 Aug 11:04:30 - [info] [debug:debug 1]
VLC media player 3.0.17.4 Vetinari
Command Line Interface initialized. Type `help' for help.

And this is what I get when I try to play a local video file, this error message loops over and over:

2 Aug 11:08:16 - [info] [debug:debug 2]
[b0e49770] mmal_codec filter error: Failed to alloc CMA buf: fmt=Z420, size=3133440

@HaroldPetersInskipp

The directory "/home/pi/temp" does not exist for me, I could not find an actual log file.

This is the output of "vlc -vv --logfile=/home/pi/temp/vlclog.txt" when I run it with the exec node.

2 Aug 11:10:15 - [info] [debug:debug 2]
[01477b98] main libvlc debug: VLC media player - 3.0.17.4 Vetinari
[01477b98] main libvlc debug: Copyright © 1996-2022 the VideoLAN team
[01477b98] main libvlc debug: revision 3.0.13-8-g41878ff4f2
[01477b98] main libvlc debug: configured with ./configure  '--build=arm-linux-gnueabihf' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/arm-linux-gnueabihf' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-debug' '--config-cache' '--disable-update-check' '--enable-fast-install' '--docdir=/usr/share/doc/vlc' '--with-binary-version=3.0.17.4-0+deb11u1+rpi1+rpt1' '--enable-a52' '--enable-aa' '--enable-aribsub' '--enable-avahi' '--enable-bluray' '--enable-caca' '--enable-chromaprint' '--enable-chromecast' '--enable-dav1d' '--enable-dbus' '--enable-dca' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gles2' '--enable-gnutls' '--enable-harfbuzz' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-matroska' '--enable-mod' '--enable-mpc' '--enable-mpg123' '--enable-mtp' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-sdl-image' '--enable-sftp' '--enable-shine' '--enable-shout' '--enable-skins2' '--enable-sndio' '--enable-soxr' '--enable-spatialaudio' '--enable-speex' '--enable-srt' '--enable-svg' '--enable-svgdec' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/solid/actions/' '--disable-aom' '--disable-crystalhd' '--disable-d3d11va' '--disable-decklink' '--disable-directx' '--disable-dsm' '--disable-dxva2' '--disable-fdkaac' '--disable-fluidlite' '--disable-freerdp' '--disable-goom' '--disable-gst-decode' '--disable-libtar' '--disable-macosx' '--disable-macosx-avfoundation' '--disable-macosx-qtkit' '--disable-mfx' '--disable-microdns' '--disable-opencv' '--disable-projectm' '--disable-schroedinger' '--disable-sparkle' '--disable-telx' '--disable-vpx' '--disable-vsxu' '--disable-wasapi' '--disable-mmal-avcodec' '--enable-alsa' '--enable-dc1394' '--enable-dv1394' '--enable-libplacebo' '--enable-linsys' '--enable-nfs' '--enable-udev' '--enable-v4l2' '--enable-wayland' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--disable-mmx' '--disable-sse' '--enable-neon' '--enable-mmal' '--disable-vdpau' '--disable-libva' '--disable-altivec' '--enable-omxil' '--enable-omxil-vout' '--enable-rpi-omxil' 'build_alias=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-8AnYdi/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-8AnYdi/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-8AnYdi/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security'
[01477b98] main libvlc debug: searching plug-in modules
[01477b98] main libvlc debug: loading plugins cache file /usr/lib/arm-linux-gnueabihf/vlc/plugins/plugins.dat
[01477b98] main libvlc debug: recursively browsing `/usr/lib/arm-linux-gnueabihf/vlc/plugins'
[01477b98] main libvlc debug: plug-ins loaded: 518 modules
[01477b98] main libvlc debug: opening config file (/home/pi/.config/vlc/vlcrc)
[01477db8] main logger debug: looking for logger module matching "any": 4 candidates
[01477db8] main logger debug: using logger module "console"
2 Aug 11:10:15 - [info] [debug:debug 2]
[01477b98] main libvlc debug: translation test: code is "C"
[01479dc0] main keystore debug: looking for keystore module matching "memory": 4 candidates
[01479dc0] main keystore debug: using keystore module "memory"
[01477b98] main libvlc debug: CPU has capabilities ARM_NEON FPU
[014d6ef8] main input debug: Creating an input for 'Media Library'
[014d6ef8] main input debug: Input is a meta file: disabling unneeded options
[014d6ef8] main input debug: using timeshift granularity of 50 MiB
[014d6ef8] main input debug: using default timeshift path
[014d6ef8] main input debug: `file/directory:///home/pi/.local/share/vlc/ml.xspf' gives access `file' demux `directory' path `/home/pi/.local/share/vlc/ml.xspf'
[014da918] main input source debug: creating demux: access='file' demux='directory' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[014e20b8] main demux debug: looking for access_demux module matching "file": 19 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014e20b8] main demux debug: no access_demux modules matched
[014ecf58] main stream debug: creating access: file:///home/pi/.local/share/vlc/ml.xspf
[014ecf58] main stream debug:  (path: /home/pi/.local/share/vlc/ml.xspf)
[014ecf58] main stream debug: looking for access module matching "file": 30 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014ecf58] main stream debug: using access module "filesystem"
[014ed930] main stream debug: looking for stream_filter module matching "prefetch,cache_read": 26 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014ed930] cache_read stream debug: Using stream method for AStream*
[014ed930] cache_read stream debug: starting pre-buffering
[014ed930] cache_read stream debug: received first data after 0 ms
[014ed930] cache_read stream debug: pre-buffering done 296 bytes in 0s - 3803 KiB/s
[014ed930] main stream debug: using stream_filter module "cache_read"
[014ee290] main stream debug: looking for stream_filter module matching "any": 26 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014ee290] playlist stream debug: using XSPF playlist reader
[014ee290] main stream debug: using stream_filter module "playlist"
[014ee290] main stream debug: stream filter added to 0x14ed930
[014f0588] main stream debug: looking for stream_filter module matching "any": 26 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f0588] main stream debug: no stream_filter modules matched
[014eedc0] main stream_directory debug: looking for stream_directory module matching "any": 1 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014eedc0] main stream_directory debug: no stream_directory modules matched
[014da918] main input source debug: attachment of directory-extractor failed for file:///home/pi/.local/share/vlc/ml.xspf
[014f0588] main stream debug: looking for stream_filter module matching "record": 26 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f0588] main stream debug: using stream_filter module "record"
[014da918] main input source debug: creating demux: access='file' demux='directory' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[014e20b8] main demux debug: looking for demux module matching "directory": 55 candidates
[014e20b8] main demux debug: using demux module "directory"
[014f2a48] main demux meta debug: looking for meta reader module matching "any": 2 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f2a48] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader
[014f2a48] lua demux meta debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f2a48] lua demux meta debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader/filename.luac
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f2a48] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[014f2a48] main demux meta debug: no meta reader modules matched
[014d6ef8] main input debug: `file/directory:///home/pi/.local/share/vlc/ml.xspf' successfully opened
[0147a060] main xml reader debug: looking for xml reader module matching "any": 1 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[0147a060] main xml reader debug: using xml reader module "xml"
[014d6ef8] main input debug: EOF reached
[014e20b8] main demux debug: removing module "directory"
[014f0588] main stream debug: removing module "record"
[014ee290] main stream debug: removing module "playlist"
[014ed930] main stream debug: removing module "cache_read"
[014ecf58] main stream debug: removing module "filesystem"
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f58d0] main playlist debug: creating audio output
[014f69e8] main audio output debug: looking for audio output module matching "any": 6 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f69e8] vlcpulse audio output debug: using library version 14.2.0
[014f69e8] vlcpulse audio output debug:  (compiled with version 14.2.0, protocol 34)
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f69e8] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f69e8] alsa audio output debug: Available ALSA PCM devices:
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f69e8] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null)
[014f69e8] alsa audio output debug: Rate Converter Plugin Using Libav/FFmpeg Library (lavrate)
[014f69e8] alsa audio output debug: Rate Converter Plugin Using Samplerate Library (samplerate)
[014f69e8] alsa audio output debug: Rate Converter Plugin Using Speex Resampler (speexrate)
[014f69e8] alsa audio output debug: JACK Audio Connection Kit (jack)
[014f69e8] alsa audio output debug: Open Sound System (oss)
[014f69e8] alsa audio output debug: PulseAudio Sound Server (pulse)
[014f69e8]
2 Aug 11:10:15 - [info] [debug:debug 2]
alsa audio output debug: Plugin for channel upmix (4,6,8) (upmix)
[014f69e8] alsa audio output debug: Plugin for channel downmix (stereo) with a simple spacialization (vdownmix)
[014f69e8] alsa audio output debug: bcm2835 Headphones, bcm2835 Headphones Direct hardware device without any conversions (hw:CARD=Headphones,DEV=0)
[014f69e8] alsa audio output debug: bcm2835 Headphones, bcm2835 Headphones Hardware device with all software conversions (plughw:CARD=Headphones,DEV=0)
[014f69e8] alsa audio output debug: bcm2835 Headphones, bcm2835 Headphones Default Audio Device (default:CARD=Headphones)
[014f69e8] alsa audio output debug: bcm2835 Headphones, bcm2835 Headphones Default Audio Device (sysdefault:CARD=Headphones)
[014f69e8] alsa audio output debug: bcm2835 Headphones, bcm2835 Headphones Direct sample mixing device (dmix:CARD=Headphones,DEV=0)
[014f69e8] alsa audio output debug: bcm2835 Headphones USB Stream Output (usbstream:CARD=Headphones)
[014f69e8] alsa audio output debug: vc4-hdmi-0, MAI PCM i2s-hifi-0 Direct hardware device without any conversions (hw:CARD=vc4hdmi0,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-0, MAI PCM i2s-hifi-0 Hardware device with all software conversions (plughw:CARD=vc4hdmi0,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-0, MAI PCM i2s-hifi-0 Default Audio Device (default:CARD=vc4hdmi0)
[014f69e8] alsa audio output debug: vc4-hdmi-0, MAI PCM i2s-hifi-0 Default Audio Device (sysdefault:CARD=vc4hdmi0)
[014f69e8] alsa audio output debug: vc4-hdmi-0, MAI PCM i2s-hifi-0 HDMI Audio Output (hdmi:CARD=vc4hdmi0,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-0, MAI PCM i2s-hifi-0 Direct sample mixing device (dmix:CARD=vc4hdmi0,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-0 USB Stream Output (usbstream:CARD=vc4hdmi0)
[014f69e8] alsa audio output debug: vc4-hdmi-1, MAI PCM i2s-hifi-0 Direct hardware device without any conversions (hw:CARD=vc4hdmi1,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-1, MAI PCM i2s-hifi-0 Hardware device with all software conversions (plughw:CARD=vc4hdmi1,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-1, MAI PCM i2s-hifi-0 Default Audio Device (default:CARD=vc4hdmi1)
[014f69e8] alsa audio output debug: vc4-hdmi-1, MAI PCM i2s-hifi-0 Default Audio Device (sysdefault:CARD=vc4hdmi1)
[014f69e8] alsa audio output debug: vc4-hdmi-1, MAI PCM i2s-hifi-0 HDMI Audio Output (hdmi:CARD=vc4hdmi1,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-1, MAI PCM i2s-hifi-0 Direct sample mixing device (dmix:CARD=vc4hdmi1,DEV=0)
[014f69e8] alsa audio output debug: vc4-hdmi-1 USB Stream Output (usbstream:CARD=vc4hdmi1)
[014f69e8] main audio output debug: using audio output module "alsa"
2 Aug 11:10:15 - [info] [debug:debug 2]
[014f58d0] main playlist debug: keeping audio output
[0151bdf0] main interface debug: looking for interface module matching "dbus,none": 19 candidates
[0151bdf0] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0151bdf0] main interface debug: no interface modules matched
2 Aug 11:10:15 - [info] [debug:debug 2]
[0151bdf0] main interface error: no suitable interface module
[01477b98] main libvlc error: interface "dbus,none" initialization failed
[0151bdf0] main interface debug: looking for interface module matching "http,none": 19 candidates
[0151bdf0] [http] lua interface debug: Found lua interface script: /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/http.luac
[0151bdf0] [http]
2 Aug 11:10:15 - [info] [debug:debug 2]
lua interface debug: Setting config variable: config={http={no_index=false}}
[0151bdf0] [http] main interface debug: using interface module "lua"
[0151c4d8] main interface debug: looking for interface module matching "telnet,none": 19 candidates
[0151c4d8] lua interface error: password not configured
[0151c4d8] lua interface: Please specify the password in the preferences.
[0151c4d8] main interface debug: no interface modules matched
[0151c4d8] main interface error: no suitable interface module
[01477b98] main libvlc error: interface "telnet,none" initialization failed
[0151c4d8] main interface debug: looking for interface module matching "hotkeys,none": 19 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[0151c4d8] main interface debug: using interface module "hotkeys"
[01539f28] main interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates
[0151bdf0] [http] lua interface: Lua HTTP interface
2 Aug 11:10:15 - [info] [debug:debug 2]
[0151bdf0] [http] main interface debug: creating VLM
[01539f28] main interface debug: no interface modules matched
[01539f28] main interface error: no suitable interface module
[01477b98] main libvlc error: interface "globalhotkeys,none" initialization failed
[0151bdf0] [http] lua interface debug: Loaded /usr/share/vlc/lua/http/custom.lua
[01477b98] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0151bdf0] [http] main interface debug: net: listening to * port 8080
[01539f28] main interface debug: looking for interface module matching "any": 19 candidates
2 Aug 11:10:15 - [info] [debug:debug 2]
[0151bdf0] [http] main interface error: socket bind error: Address already in use
[0151bdf0] [http] main interface error: socket bind error: Address already in use
[0151bdf0] [http] main interface error: cannot create socket(s) for HTTP host
[0151bdf0] [http] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/http.luac: lua/intf/http.lua:338: Failed to create HTTP host
2 Aug 11:10:15 - [info] [debug:debug 2]
error: XDG_RUNTIME_DIR not set in the environment.
2 Aug 11:10:15 - [info] [debug:debug 2]
[01539f28] skins2 interface debug: Cannot open X display
[01539f28]
2 Aug 11:10:15 - [info] [debug:debug 2]
skins2 interface error: cannot initialize OSFactory
[01539f28] [cli] lua interface debug: Found lua interface script: /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/cli.luac
2 Aug 11:10:15 - [info] [debug:debug 2]
[01539f28] [cli] main interface debug: using interface module "lua"
[014f58d0] main playlist: playlist is empty
[014f58d0] main playlist debug: nothing to play
2 Aug 11:10:15 - [info] [debug:debug 2]
[01539f28] [cli] lua interface: Listening on host "*console".
2 Aug 11:10:15 - [info] [debug:debug 1]
VLC media player 3.0.17.4 Vetinari
Command Line Interface initialized. Type `help' for help.

And this is the output when I run the same command from my terminal:

VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[00884b98] main libvlc debug: VLC media player - 3.0.17.4 Vetinari
[00884b98] main libvlc debug: Copyright © 1996-2022 the VideoLAN team
[00884b98] main libvlc debug: revision 3.0.13-8-g41878ff4f2
[00884b98] main libvlc debug: configured with ./configure  '--build=arm-linux-gnueabihf' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/arm-linux-gnueabihf' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-debug' '--config-cache' '--disable-update-check' '--enable-fast-install' '--docdir=/usr/share/doc/vlc' '--with-binary-version=3.0.17.4-0+deb11u1+rpi1+rpt1' '--enable-a52' '--enable-aa' '--enable-aribsub' '--enable-avahi' '--enable-bluray' '--enable-caca' '--enable-chromaprint' '--enable-chromecast' '--enable-dav1d' '--enable-dbus' '--enable-dca' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gles2' '--enable-gnutls' '--enable-harfbuzz' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-matroska' '--enable-mod' '--enable-mpc' '--enable-mpg123' '--enable-mtp' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-sdl-image' '--enable-sftp' '--enable-shine' '--enable-shout' '--enable-skins2' '--enable-sndio' '--enable-soxr' '--enable-spatialaudio' '--enable-speex' '--enable-srt' '--enable-svg' '--enable-svgdec' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/solid/actions/' '--disable-aom' '--disable-crystalhd' '--disable-d3d11va' '--disable-decklink' '--disable-directx' '--disable-dsm' '--disable-dxva2' '--disable-fdkaac' '--disable-fluidlite' '--disable-freerdp' '--disable-goom' '--disable-gst-decode' '--disable-libtar' '--disable-macosx' '--disable-macosx-avfoundation' '--disable-macosx-qtkit' '--disable-mfx' '--disable-microdns' '--disable-opencv' '--disable-projectm' '--disable-schroedinger' '--disable-sparkle' '--disable-telx' '--disable-vpx' '--disable-vsxu' '--disable-wasapi' '--disable-mmal-avcodec' '--enable-alsa' '--enable-dc1394' '--enable-dv1394' '--enable-libplacebo' '--enable-linsys' '--enable-nfs' '--enable-udev' '--enable-v4l2' '--enable-wayland' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--disable-mmx' '--disable-sse' '--enable-neon' '--enable-mmal' '--disable-vdpau' '--disable-libva' '--disable-altivec' '--enable-omxil' '--enable-omxil-vout' '--enable-rpi-omxil' 'build_alias=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-8AnYdi/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-8AnYdi/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-8AnYdi/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security'
[00884b98] main libvlc debug: searching plug-in modules
[00884b98] main libvlc debug: loading plugins cache file /usr/lib/arm-linux-gnueabihf/vlc/plugins/plugins.dat
[00884b98] main libvlc debug: recursively browsing `/usr/lib/arm-linux-gnueabihf/vlc/plugins'
[00884b98] main libvlc debug: plug-ins loaded: 518 modules
[00884b98] main libvlc debug: opening config file (/home/pi/.config/vlc/vlcrc)
[00884db8] main logger debug: looking for logger module matching "any": 4 candidates
[00884db8] main logger debug: using logger module "console"
[00884b98] main libvlc debug: translation test: code is "C"
[00886dc0] main keystore debug: looking for keystore module matching "memory": 4 candidates
[00886dc0] main keystore debug: using keystore module "memory"
[00884b98] main libvlc debug: CPU has capabilities ARM_NEON FPU 
[008e3ef8] main input debug: Creating an input for 'Media Library'
[008e3ef8] main input debug: Input is a meta file: disabling unneeded options
[008e3ef8] main input debug: using timeshift granularity of 50 MiB
[008e3ef8] main input debug: using default timeshift path
[008e3ef8] main input debug: `file/directory:///home/pi/.local/share/vlc/ml.xspf' gives access `file' demux `directory' path `/home/pi/.local/share/vlc/ml.xspf'
[008e7918] main input source debug: creating demux: access='file' demux='directory' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[008ef0b8] main demux debug: looking for access_demux module matching "file": 19 candidates
[008ef0b8] main demux debug: no access_demux modules matched
[008f9f58] main stream debug: creating access: file:///home/pi/.local/share/vlc/ml.xspf
[008f9f58] main stream debug:  (path: /home/pi/.local/share/vlc/ml.xspf)
[008f9f58] main stream debug: looking for access module matching "file": 30 candidates
[008f9f58] main stream debug: using access module "filesystem"
[008fa930] main stream debug: looking for stream_filter module matching "prefetch,cache_read": 26 candidates
[008fa930] cache_read stream debug: Using stream method for AStream*
[008fa930] cache_read stream debug: starting pre-buffering
[008fa930] cache_read stream debug: received first data after 0 ms
[008fa930] cache_read stream debug: pre-buffering done 296 bytes in 0s - 1864 KiB/s
[008fa930] main stream debug: using stream_filter module "cache_read"
[008fb290] main stream debug: looking for stream_filter module matching "any": 26 candidates
[008fb290] playlist stream debug: using XSPF playlist reader
[008fb290] main stream debug: using stream_filter module "playlist"
[008fb290] main stream debug: stream filter added to 0x8fa930
[008fd588] main stream debug: looking for stream_filter module matching "any": 26 candidates
[008fd588] main stream debug: no stream_filter modules matched
[008fbdc0] main stream_directory debug: looking for stream_directory module matching "any": 1 candidates
[008fbdc0] main stream_directory debug: no stream_directory modules matched
[008e7918] main input source debug: attachment of directory-extractor failed for file:///home/pi/.local/share/vlc/ml.xspf
[008fd588] main stream debug: looking for stream_filter module matching "record": 26 candidates
[008fd588] main stream debug: using stream_filter module "record"
[008e7918] main input source debug: creating demux: access='file' demux='directory' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[008ef0b8] main demux debug: looking for demux module matching "directory": 55 candidates
[008ef0b8] main demux debug: using demux module "directory"
[008ffa48] main demux meta debug: looking for meta reader module matching "any": 2 candidates
[008ffa48] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader
[008ffa48] lua demux meta debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader
[008ffa48] lua demux meta debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader/filename.luac
[008ffa48] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[008ffa48] main demux meta debug: no meta reader modules matched
[008e3ef8] main input debug: `file/directory:///home/pi/.local/share/vlc/ml.xspf' successfully opened
[00887060] main xml reader debug: looking for xml reader module matching "any": 1 candidates
[00887060] main xml reader debug: using xml reader module "xml"
[008e3ef8] main input debug: EOF reached
[008ef0b8] main demux debug: removing module "directory"
[008fd588] main stream debug: removing module "record"
[008fb290] main stream debug: removing module "playlist"
[008fa930] main stream debug: removing module "cache_read"
[008f9f58] main stream debug: removing module "filesystem"
[009028d0] main playlist debug: creating audio output
[009039e8] main audio output debug: looking for audio output module matching "any": 6 candidates
[009039e8] vlcpulse audio output debug: using library version 14.2.0
[009039e8] vlcpulse audio output debug:  (compiled with version 14.2.0, protocol 34)
[009039e8] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #19
[009039e8] vlcpulse audio output debug: using protocol 34, server protocol 34
[009039e8] pulse audio output debug: adding sink 0: alsa_output.platform-bcm2835_audio.analog-stereo (Built-in Audio Analog Stereo)
[009039e8] main audio output debug: using audio output module "pulse"
[009028d0] main playlist debug: keeping audio output
[008ffa48] main interface debug: looking for interface module matching "dbus,none": 19 candidates
[008ffa48] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc
[008ffa48] main interface debug: using interface module "dbus"
[009105b8] main interface debug: looking for interface module matching "http,none": 19 candidates
[009105b8] [http] lua interface debug: Found lua interface script: /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/http.luac
[009105b8] [http] lua interface debug: Setting config variable: config={http={no_index=false}}
[009105b8] [http] main interface debug: using interface module "lua"
[00917688] main interface debug: looking for interface module matching "telnet,none": 19 candidates
[00917688] lua interface error: password not configured
[00917688] lua interface: Please specify the password in the preferences.
[00917688] main interface debug: no interface modules matched
[00917688] main interface error: no suitable interface module
[00884b98] main libvlc error: interface "telnet,none" initialization failed
[00917688] main interface debug: looking for interface module matching "hotkeys,none": 19 candidates
[00917688] main interface debug: using interface module "hotkeys"
[00917e60] main interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates
[009105b8] [http] lua interface: Lua HTTP interface
[00917e60] main interface debug: using interface module "xcb_hotkeys"
[009105b8] [http] main interface debug: creating VLM
[00884b98] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00914c80] main interface debug: looking for interface module matching "any": 19 candidates
[009105b8] [http] lua interface debug: Loaded /usr/share/vlc/lua/http/custom.lua
[009105b8] [http] main interface debug: net: listening to * port 8080
[009105b8] [http] main interface error: socket bind error: Address already in use
[009105b8] [http] main interface error: socket bind error: Address already in use
[009105b8] [http] main interface error: cannot create socket(s) for HTTP host
[009105b8] [http] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/http.luac: lua/intf/http.lua:338: Failed to create HTTP host
[b3646cb0] main generic debug: looking for extension module matching "any": 1 candidates
[b3646cb0] lua generic debug: Opening Lua Extension module
[b3646cb0] lua generic debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/extensions
[b3646cb0] lua generic debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/extensions
[b3646cb0] lua generic debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/extensions/VLSub.luac
[b3646cb0] lua generic debug: Scanning Lua script /usr/lib/arm-linux-gnueabihf/vlc/lua/extensions/VLSub.luac
[b3646cb0] lua generic debug: Script /usr/lib/arm-linux-gnueabihf/vlc/lua/extensions/VLSub.luac has the following capability flags: 0x5
[b3646cb0] lua generic debug: Trying Lua scripts in /usr/share/vlc/lua/extensions
[b3646cb0] main generic debug: using extension module "lua"
[00914c80] main interface debug: using interface module "qt"
[009028d0] main playlist: playlist is empty
[009028d0] main playlist debug: nothing to play

Sorry I didn't realize it wouldn't create the directory first. Try -vv --logfile=/tmp/vlclog.txt instead.

"vlc -vv --logfile=/tmp/vlclog.txt" still does not create a log file. I added a blank text file but the command did not seem to do anything to it (file is still blank). I tried running it on the Pi terminal, SSH terminal, exec node, with and without a video file.

Sorry, It looks like it's actually -vv 2>&1 > /full/path/to/logfile.txt

You can place the logfile.txt wherever you like.

"vlc -vv 2>&1 > /tmp/logfile.txt /home/pi/Desktop/Squirrel.mp4" now creates a text file, but nothing gets written to it. The behavior is the same as before, running it from the Pi or SSH terminals will actually open a VLC window with the video, but the exec node does not open anything.

I should add that I tried swapping VLC for mplayer, and I got the same result. Mplayer works fine from the Pi and SSH terminals, but does not work through Node Red. I am also unable to open the Chromium browser through Node Red. It seems like I'm unable to open any sort of program using the exec node, although simple commands like "ifconfig" work fine.

About a year and a half ago I did actually manage to get this working, I had a flow that could open a video file using VLC and control the playback, and I don't remember having this much trouble just getting VLC to open. Unfortunately the project got lost somewhere so I'm trying to rewrite everything from memory.

Do all gui applications fail when run from a Node-RED exec node?

I've tried VLC, Mplayer, Chromium, and Geany. I can't open any of them from the exec node.

I just tried a different Raspberry Pi with a fresh install of Raspbian, I'm having the same problem. I can open applications from the terminal but not with the exec node.

Both Pis are running Node Red v3.0.1 with the following OS:

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Just a thought

Are you running NodeRed in a headless / non desktop system?

If so, you'll need to start the application in an Xinit session

Try a commands like

sudo xinit /usr/bin/vlc --fullscreen

Or

sudo startx /usr/bin/vlc -I http

( -I http starts the web interface for VLC)

Use whereis vlc to find out what the exact path to VLC is.

I think I'm doing what you are aiming for with Chromium or Vivaldi.

But I run videos in the browser using Websockets to set the filename and start/ stop the video, with an adjustable fade in / out time

(Because I also use text outlays etc)

What's your use case?

Are you planning on manipulating the web interface of VLC to define playlists and files?

1 Like

@MDAR

I'm running Node Red from a Raspberry Pi 4B with a desktop configuration, with a display connected. The goal is to use the Pi as a multimedia display that can be controlled remotely using something like TCP or MQTT. At the moment I just want to get video working but eventually I may want to control other applications like a web browser. My flow already includes some TCP commands that work if I start VLC through a terminal, but I'd like my flow to handle the startup/shutdown as well.

sudo xinit /usr/bin/vlc --fullscreen returns the following:

(EE)
Fatal server error:
(EE) Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE)

sudo startx /usr/bin/vlc -I http returns the following:

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Raspbian
Current Operating System: Linux raspberrypi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l
Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:39:FE:25 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=c09eafd8-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
Build Date: 04 January 2022  10:24:42AM
xorg-server 2:1.20.11-1+rpt1+deb11u1 (https://www.debian.org/support)
Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Wed Aug  3 10:44:00 2022
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use /usr/bin/vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.

The display connected to the Pi turns off and on during this command.

VLC is not started during either command, the behavior and responses are the same when the commands are run through an SSH terminal and through Node Red.

Arrr

I see.

So here's your issue

Server is already active for display 0

If this server is no longer running, remove /tmp/.X0-lock and start again.

Your desktop manager is already using the "display 0* output and your command line is trying to push the new application to the same display.
(Linux isn't Windows, it's a bit more literal)

If...

You shutdown the desktop manager

systemctl stop lightdm

Or only boot to a command line, then your NodeRed Exec command will work perfectly.

In effect, running a headless pi and NodeRed starting applications and using the Display.

How you start an app within your desktop manager is a totally different subject, that I have no idea about.

I think I understand what you're end game is and I know how I'd do it.
(This is the journey I took a few years ago to get to the solution I use)

How do you want to proceed?

1 Like

I just rebooted the Pi and did the following:

  • SSHed into the Pi
  • systemctl stop lightdm, from the SSH terminal. This turns off the display.
pi@raspberrypi:~ $ systemctl stop lightdm
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to stop 'lightdm.service'.
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
  • Started VLC with the exec node: vlc, with the following output:
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[97]
"[0111a918] vlcpulse audio output error: PulseAudio server connection failure: Connection refused↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[234]
"[0115e570] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11↵[0115e570] main interface error: no suitable interface module↵[0109bb98] main libvlc error: "
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[44]
"interface "dbus,none" initialization failed↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[268]
"[01155c50] lua interface error: password not configured↵[01155c50] lua interface: Please specify the password in the preferences.↵[01155c50] main interface error: no suitable interface module↵[0109bb98] main libvlc error: interface "telnet,none" initialization failed↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[52]
"[0115e570] [http] lua interface: Lua HTTP interface↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[145]
"[011400d8] main interface error: no suitable interface module↵[0109bb98] main libvlc error: interface "globalhotkeys,none" initialization failed↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[306]
"[0109bb98] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.↵[0115e570] [http] lua interface error: Password unset, insecure web interface disabled↵[0115e570] [http] lua interface: Set --http-password on the command line if you want to enable the web interface.↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[51]
"error: XDG_RUNTIME_DIR not set in the environment.↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[63]
"[011400d8] skins2 interface error: cannot initialize OSFactory↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[44]
"[011197c0] main playlist: playlist is empty↵"
8/3/2022, 11:52:10 AMnode: debug 3
msg.payload : string[62]
"[011400d8] [cli] lua interface: Listening on host "*console".↵"
8/3/2022, 11:52:10 AMnode: debug 2
msg.payload : string[96]
"VLC media player 3.0.17.4 Vetinari↵Command Line Interface initialized. Type `help' for help.↵> "
  • Started VLC with a TCP interface from Node Red: vlc --extraintf rc --rc-host localhost:8080
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[97]
"[01fba9c0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[278]
"[01ffe138] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11↵[01ffe138] main interface error: no suitable interface module↵[01f3bb98] main libvlc error: interface "dbus,none" initialization failed↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[250]
"[01ffe2d0] main interface error: no suitable interface module↵[01f3bb98] main libvlc error: interface "globalhotkeys,none" initialization failed↵[01f3bb98] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[68]
"[01ffe138] [cli] lua interface: Listening on host "localhost:8080".↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[51]
"error: XDG_RUNTIME_DIR not set in the environment.↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[336]
"[01ffe138] [cli] main interface error: socket bind error: Address already in use↵[01ffe138] [cli] main interface error: socket bind error: Address already in use↵[01ffe138] [cli] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/cli.luac: lua/intf/modules/host.lua:228: Cannot listen on localhost:8080↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[63]
"[01ffe2d0] skins2 interface error: cannot initialize OSFactory↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[44]
"[01fb9858] main playlist: playlist is empty↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[68]
"[01ffe2d0] [cli] lua interface: Listening on host "localhost:8080".↵"
8/3/2022, 11:53:15 AMnode: debug 3
msg.payload : string[336]
"[01ffe2d0] [cli] main interface error: socket bind error: Address already in use↵[01ffe2d0] [cli] main interface error: socket bind error: Address already in use↵[01ffe2d0] [cli] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/cli.luac: lua/intf/modules/host.lua:228: Cannot listen on localhost:8080↵"
  • Tried adding a video from Node Red using a TCP command, nothing happened
  • Rebooted the Pi again, opened an SSH terminal and turned off the desktop manager
  • Ran vlc --extraintf rc --rc-host localhost:8080 from the SSH terminal, display does not respond
  • Added a video from Node Red with a TCP command, this time the video plays

With the desktop manager turned off, Node Red is still unable to start VLC.

In any case I would like to keep the desktop active for the time being. Is there any way for Node Red to start an application without disabling the desktop?

If I get time tomorrow, I'll have a play.

But as I said early, I have no idea how to start an application within a desktop from NodeRed.

Have you seen this article?

I'm fairly sure (if not totally sure) that you need to start VLC within an X-Server

Have you tried

xinit vlc --extraintf rc --rc-host localhost:8080

From a command line, without the desktop running?

Did you notice this in the error ?