summaryrefslogtreecommitdiffstats
path: root/skripti/videonadzor.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-06-03 18:54:14 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-06-03 18:54:14 +0200
commit3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb (patch)
treedc51ea1b9dc4429546c50dd54d232e81dd0538fd /skripti/videonadzor.sh
parentds2teor (diff)
parentrazne stvari iz b (diff)
downloadr-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.tar
r-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.tar.gz
r-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.tar.bz2
r-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.tar.lz
r-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.tar.xz
r-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.tar.zst
r-3a239dd1b3bc6536ea663ab12567f7a9b71dfbeb.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