summaryrefslogtreecommitdiffstats
path: root/skripti/videonadzor.sh
diff options
context:
space:
mode:
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