This is the whole script, I replaced the variable SERVICE with
MPVPATH=which mpv
, that gives you the absolute path to mpv
.
And with that change, I will see the video in my DSI-1 LCD monitor?
I am away of the raspberry pi now and I canât test it, thats why I am asking.
Donât I have to write somewhere in the script the command ââdrm-connector=DSI-1â
Yes you are completly right, I forgot about that. I will correct the script above.
Is that error because I have removed the " " and changes the file with â* .*â?
Because I have 3 videos in that folder.
radar1.mp4
radar2.mp4
radar3.mp4
Error for this line.
Actually I donât know which syntax is supported by mpv, you can have a look here https://mpv.io/manual/ (quick search let to: /path/to/videos/*
to play all files from a folder.)
Yes, the line should be basically path/to/mpv --drm-connector=DSI-1 --fs --start=00:00:00 /path/to/videos/*
Can you try
#!/bin/bash
# DietPi-AutoStart custom script
# Location: /var/lib/dietpi/dietpi-autostart/custom.sh
MPVPATH=$(which mpv)
VIDEOPATH=/mnt/radarf1/*
while true; do
echo "Playing $VIDEOPATH"
$MPVPATH --drm-connector=DSI-1 --fs --start=00:00:00 $VIDEOPATH
done
exit
I actually tried it with ls
bc I have no mpv
installed nor a display to test with.
Ok then forget the stuff with the variables, for some reason it works with other commands but not with mpv.
Go into the terminal and execute
which mpv
The output shows the path to mpv. This needs to be in front of the line, the command should look like path/to/mpv --drm-connector=DSI-1 --fs --start=00:00:00 /path/to/videos/*
but with the right path to mpv and to the videos. If one of these options (the strings starting with --
donât work you need to look into the documentation of mpv. You gave this commands to me, I assumed they are right. If not please look here: https://mpv.io/manual/stable/
Better to remove that line and check for the executable manual. Once known, copy the correct path and try to avoid to many variables.
Well there you should try to get used to it yourself. Or at least to some basics. You canât expect from us to solve your problem. We donât have these software installed nor the display at hand. All we du is guessingâŚ
I want to say a HUGE THANK YOU!!!
Script is running perfect now, and videos are playing in the correct monitor.
I donât know how to thank you!
SCRIPT IS:
#!/bin/bash
# DietPi-AutoStart custom script
# Location: /var/lib/dietpi/dietpi-autostart/custom.sh
VIDEOPATH=/mnt/radarf1/*.mp4
SERVICE=mpv
while true; do
echo "Playing $VIDEOPATH"
$SERVICE --drm-connector=DSI-1 --fs --start=00:00:00 $VIDEOPATH
done
exit
Maybe this way Contribute to DietPi
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.