Video looper and Waveshare-DSI-LCD

Hello people,

I would like to apologize if I write something wrong. I am new to all this. Begginer.

Recently I bought a 4 inch

Waveshare DSI-LCD display. I want to use it with a video looper.
I have a problem and the screen is black eveytime i install video looper. Before that, screen is working perfect. I have installed LCD drivers like waveshare says in their wiki and instructions.

Link of the waveshare wiki:
[https://www.waveshare.com/wiki/4inch_DSI_LCD_(C)]

After a long time, I have found a solution to use the mpv player. Problem is that I want to run it automatically without typing the command, and also play in loop some videos I have in a USB flash drive folder that I have mount.

How can I make run the command “mpv --drm-connector=DSI-1 /mnt/radarf1/radar1.mp4” and the other files without using my keyboard.

I am trying and searching for weeks without any solution.

Thank you!

you could have a look to dietpi-autostart option #17. This might be a way to start your command on reboot.

Sorry for asking, but where can I find dietpi-autostart? I just type that in root?

Thank you very much.

yes it’s a script like all other DietPi support tools DietPi Launcher - DietPi.com Docs

OK, perfect. I’ll rut this and check option 17. Thank you very much. I’ll come back as soon I have something with that. Thank you.

Well i got an error…

And this is the script I found and wrote.

“#!/bin/bash
VIDEOPATH=”/home/pi/Desktop/my-movie.mkv"
SERVICE=“mpv”

while true; do
echo "playing “+$VIDEOPATH
$SERVICE --fs --start=00:00:00 $VIDEOPATH
done”

Somewhere i should type the command i used to write and videos where playing.

mpv drm-connector=DSI-1 /mnt/radarf1/radar1.mp4

The error message indicates that there is a " to much in you script or you maybe mixed straight quotes with curly ones " vs
Can you post the full script, exactly how it is written in the file, you can get the output with:
cat /var/lib/dietpi/dietpi-autostart/custom.sh

You also don’t need to write variables in quotes (but sometimes you need e.g. when you have spaces in the path or file name), and the concat is also wrong, here a output of corrected version:

#!/bin/bash

VIDEOPATH="/home/pi/Desktop/my-movie.mkv"
SERVICE=mpv

echo "Playing $VIDEOPATH"
$SERVICE --fs --start=00:00:00 "$VIDEOPATH"

And in bash scritps is always a better idea to use absolute paths, so instead of mpv you use the path you get back with: which echo

cat /var/lib/dietpi/dietpi-autostart/custom.sh
No such file or directory ← that was the message i got.

#!/bin/bash
VIDEOPATH="/home/pi/Desktop/my-movie.mkv"
SERVICE="mpv"


while true; do 
  echo "playing "+$VIDEOPATH
  $SERVICE --fs --start=00:00:00 $VIDEOPATH
done

This is how I’ve found the script… :frowning:

I have just copied and written it as I have seen it.

The command that I was typing manually every time was
mpv drm-connector=DSI-1 /mnt/radarf1/radar1.mp4
and the video was playing.

I want to make a script to auto start, run the mpv player and run some videos I have in the /mnt/radarf1 folder.
After those videos are done, I want to replay all of them like a loop.

I am beginner and I don’t understand much or how to do them all.

Thank you.

There is no /home/pi directory existing on DietPi.

Can you share the script how it is locking actually? Can you share follwoing

ls -la /var/lib/dietpi/dietpi-autostart

there is a typo on the cat command. You are missing the first forward slash. At least according to your screen print. It is

cat /var/lib/dietpi/dietpi-autostart/custom.sh

Try to connect via SSH. There you simply could copy/past everything between SSH terminal and forum. No need to manually type or do screen prints.

And how do I connect via SSH?

on Windows use a SSH client like Putty

root@DietPi:~# cat /var/lib/dietpi/dietpi-autostart/custom.sh
#!/bin/bash
# DietPi-AutoStart custom script
# Location: /var/lib/dietpi/dietpi-autostart/custom.sh
VIDEOPATH="--drm-connector=DSI-1 /mnt/radarf1/*.*
SERVICE="mpv"


while true; do
  echo "playing "+$VIDEOPATH
  $SERVICE --fs --start=00:00:00 $VIDEOPATH
done
exit 
root@DietPi:~#

Don’t know how to run or install SSH client. I have logged in to raspberry dietpi desktop and using Chromium for the forum.

You have a window desktop computer I guess? Just download Putty, run it. Should be quiet simple. But it is up to you how you do it

done but…
login as: root
root@192.168.1.25’s password:
Access denied

what login name and password i use?

Same as you login locally

thats what I type but Access denied

probably your local console has a different keyboard layout? By default we use English keyboard locally if not changed. This might have an effect for some character you used on your password.