Play on Raspberry Pi

1.omxplayer
2.SSH退出后保持播放
when I close the terminal window on the remote machine the video stops playing and I get a black screen.
Any thoughts?”
You have two options:
1. Add the script to /etc/rc.local and it will execute immediately after boot.
or
2. “sudo apt-det install screen -y” – this litthe program keeps the session open. Just launch it with “screen -q” from the ssh console and it will open a session-in-session, so after you close the remote connection the created session will still be there and the playing will not cease. To restore the session next time toy have to enter “screen -c” from the ssh console.
3.Playlist

#!/bin/sh
# get rid of the cursor so we don't see it when videos are running
setterm -cursor off
# set here the path to the directory containing your videos
VIDEOPATH="/mnt/storage/videos"
# you can normally leave this alone
SERVICE="omxplayer"
# now for our infinite loop!
while true; do
        if ps ax | grep -v grep | grep $SERVICE > /dev/null
        then
        sleep 1;
else
        for entry in $VIDEOPATH/*
        do
                clear
                omxplayer -o local “$entry” > /dev/null
        done
fi
done