Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8005

Troubleshooting • Bash script to launch vlc

$
0
0
This should be simple.... but I am banging my head against a wall!!

I have a Pi 4 with a fresh install of bookworm.

I have a video launched via autostart:

Code:

[Desktop Entry]Type=ApplicationExec=vlc --fullscreen --no-video-title-show --mouse-hide-timeout 5 --loop file:///var/www/html/commands/vid1.mp4
This works fine.

I want to be able to change what video is playing via a bash script, so I have the following:

Code:

#!/bin/bashsudo killall vlcsleep .5vlc --fullscreen --no-video-title-show --mouse-hide-timeout 5 --loop file:///var/www/html/commands/vid2.mp4
This, however does not work. when I run the script I get the following:

Code:

VLC media player 3.0.21 Vetinari (revision 3.0.21-0-gdd8bfdbabe8)[000000556fdc6a90] main interface error: no suitable interface module[000000556fcdd560] main libvlc error: interface "globalhotkeys,none" initialization failed[000000556fcdd560] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.qt.qpa.xcb: could not connect to displayqt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb./var/www/html/commands/advrt.sh: line 7: 10747 Aborted                 vlc --fullscreen --no-video-title-show --mouse-hide-timeout 5 --loop file:///var/www/html/commands/vid2.mp4
I have searched far and wide and tried various suggestions but I can't for the life of me get it working.

Can anyone help?

Statistics: Posted by salawinder — Thu May 22, 2025 9:51 pm



Viewing all articles
Browse latest Browse all 8005

Trending Articles