summaryrefslogtreecommitdiffstats
path: root/skripti/videonadzor.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-06-01 23:00:49 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-06-01 23:00:49 +0200
commit178253be0ada30420f39720e7e0fa4ee4058bce0 (patch)
treedb6d574d5945c468fccb0d39250762c41b53c7f0 /skripti/videonadzor.sh
parentearhorn_m3u (diff)
downloadr-178253be0ada30420f39720e7e0fa4ee4058bce0.tar
r-178253be0ada30420f39720e7e0fa4ee4058bce0.tar.gz
r-178253be0ada30420f39720e7e0fa4ee4058bce0.tar.bz2
r-178253be0ada30420f39720e7e0fa4ee4058bce0.tar.lz
r-178253be0ada30420f39720e7e0fa4ee4058bce0.tar.xz
r-178253be0ada30420f39720e7e0fa4ee4058bce0.tar.zst
r-178253be0ada30420f39720e7e0fa4ee4058bce0.zip
Diffstat (limited to 'skripti/videonadzor.sh')
-rwxr-xr-xskripti/videonadzor.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/skripti/videonadzor.sh b/skripti/videonadzor.sh
index 3e6fa51..e097c58 100755
--- a/skripti/videonadzor.sh
+++ b/skripti/videonadzor.sh
@@ -22,7 +22,7 @@ do
do
if [ $prev = devica ]
then
- first=$i
+ first=`rev <<<"$i" | cut -d. -f2- | rev`
prev=$i
continue
fi
@@ -36,7 +36,7 @@ do
prev=$i
done
{
- ffmpeg -f concat -safe 0 -i concat.txt -fps_mode vfr file:$first.mkv
+ ffmpeg -f concat -safe 0 -i concat.txt -vsync vfr file:$first.mkv
if [ -s $first.mkv ]
then
while read line
@@ -44,8 +44,8 @@ do
grep ^file <<<$line > /dev/null && rm `cut -d: -f2- <<<$line | cut -d\' -f1`
done < concat.txt
fi
- oldstart=`ls --sort=time | grep mkv$ | tail -f1 | cut -d: -f1`
- if [ ! $oldstart = `cut -d: -f1` <<<"$t" ]
+ oldstart=`ls --sort=time | grep mkv$ | tail -n1 | cut -d: -f1`
+ if [ ! $oldstart = `cut -d: -f1 <<<"$t"` ]
then
echo "ffconcat version 1.0" > concat.txt
prev=devica
@@ -63,7 +63,7 @@ do
fi
prev=$i
done
- ffmpeg -f concat -safe 0 -i concat.txt -fps_mode vfr file:$oldstart.mp4
+ ffmpeg -f concat -safe 0 -i concat.txt -vsync vfr file:$oldstart.mp4
if [ -s $oldstart.mp4 ]
then
while read line