i n d e x
<--back
notes
categories: arctic | art | biology | book | compile | crypto | cryptoart | debian | email | entropy |
ffmpeg | funk | game | ghostradio | hades | informationtheorie | internet | laser | linux | linuxaudio |
logic | machinelearning | math | mikrotik | movie | neuralnetworks | noise | nonhuman | notes | particlephysics |
physics | radio | radioactive | raspi | raspi5 | renameseq | rng | softwaredefinedradio | sound | stockexchange |
tools | underinfluence | videolooper | vlc | vlf | xterm |

search:


init.d4vlc:

https://github.com/bertrandmartel/vlc-boot Start a init.d VLC script at boot on your Raspberry PI for example in this case to loop videos in a specific folder. In this example, VLC is executed as the pi user since the root user is denied using VLC, see vlc_boot.sh start_vlc.sh: #!/bin/bash /usr/bin/cvlc -L /media/usb1/ vlc_boot: #!/bin/bash case "$1" in start) echo "Starting vlc_boot service..." COMMAND_TO_RUN=`start-stop-daemon -S -b -m -p $PID_FILE -x $VLC_START_SCRIPT& :` setsid sh -c $COMMAND_TO_RUN> /dev/null 2>&1 < /dev/null echo -e "\E[31;33m[ OK ]\E[0m" ;; stop) echo "Stopping vlc_boot service..." start-stop-daemon -K -q -p $PID_FILE echo -e "\E[31;33m[ OK ]\E[0m" ;; restart|reload) "$0" stop "$0" start ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $? vlc_boot.sh: ++this is where the user is defined (pi, change when otherwise) #!/bin/bash export DISPLAY=:0 su pi -c start_vlc.sh& echo $! > /tmp/vlc_boot.pid install cp vlc_boot.sh /bin/ cp start_vlc.sh /bin/ cp vlc_boot /etc/init.d/ update-rc.d vlc_boot defaults systemctl enable vlc_boot ##videolooper ##raspi ##linux

last edited:September 19, 2024




automountusbandplayvideo:

config doku for raspi5 https://raspberrypi.stackexchange.com/questions/66169/auto-mount-usb-stick-on-plug-in-without-uuid Requirements Install pmount if not installed sudo apt-get install pmount This script mounts drives to /media/usb*, so make sure those folders aren't occupied. If you want a cleaner look, don't create any folders. Udev rule Create file /etc/udev/rules.d/usbstick.rules Insert: ACTION=="add", KERNEL=="sd[a-z][0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="usbstick-handler@%k" Save and close Systemd service Create file /lib/systemd/system/usbstick-handler@.service Insert: [Unit] Description=Mount USB sticks BindsTo=dev-%i.device After=dev-%i.device [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/cpmount /dev/%I ExecStop=/usr/bin/pumount /dev/%I Save and close Mount script Create file /usr/local/bin/cpmount Insert: #!/bin/bash if mountpoint -q /media/usb1 then if mountpoint -q /media/usb2 then if mountpoint -q /media/usb3 then if mountpoint -q /media/usb4 then echo "No mountpoints available!" #You can add more if you need else /usr/bin/pmount --umask 000 --noatime -w --sync $1 usb4 fi else /usr/bin/pmount --umask 000 --noatime -w --sync $1 usb3 fi else /usr/bin/pmount --umask 000 --noatime -w --sync $1 usb2 fi else /usr/bin/pmount --umask 000 --noatime -w --sync $1 usb1 fi Give execute permission to the (root) user: chmod u+x /usr/local/bin/cpmount Save and close Play Video mkdir ~/.config/autostart create a file > vlcstart.desktop [Desktop Entry] Type=Application Name=VLCAutostart Comment=VLC Autostart Exec=/usr/bin/vlc -f -L --no-video-title-show /media/usb1/ Terminal=false Reboot your RPi and test. ##videolooper ##raspi5 ##linux

last edited:September 19, 2024