0
나는 폴더에서 모든 비디오를 재생하는 프로젝트 작업을하고 있습니다. 잘 작동하지만 CRON으로 주기적으로 변경되는 입력을 기반으로 변경하려면 비디오 경로가 필요합니다. 입력 변경과 동시에 비디오 영상을 변경하지만 현재 비디오가 끝날 때까지는 아니지만 현재 비디오 피트에서 나머지 비디오는 재생하지 않고 변경합니다.Raspbery Pi - 루핑 비디오 omxplayer
다음은 폴더에있는 모든 비디오를 재생하는 코드입니다 :
좋은 답변이 많이 이해할 수있을 것이다#!/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"
for entry in $VIDEOPATH/*
do
clear
$SERVICE $entry > /dev/null
while ps ax | grep -v grep | grep $SERVICE > /dev/null
do
sleep 5;
done
done
, 감사합니다!