Video looper and Waveshare-DSI-LCD

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.

I am sorry for being pain in the ass. Its very important for me to make it work. :cry::cry::cry:

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…

@Jappe and @Joulinar

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
1 Like

Maybe this way Contribute to DietPi

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.