-
Notifications
You must be signed in to change notification settings - Fork 1
/
encodage_lq.sh
38 lines (28 loc) · 970 Bytes
/
encodage_lq.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
if [ ! -d "snaps" ]; then
mkdir snaps
fi
if [ ! -d "sub" ]; then
mkdir sub
fi
cd LQ
for fic in *.srt
do
echo "$fic"
ffmpeg -i "$fic" "$fic.vtt"
mv "$fic.vtt" ../sub
done
for fic in *.mp4 *.avi *.mkv *.webm
do
echo "$fic"
ffmpeg -y -ss 00:00:01 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
ffmpeg -y -ss 00:00:02 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
ffmpeg -y -ss 00:00:03 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
ffmpeg -y -ss 00:00:05 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
ffmpeg -y -ss 00:00:10 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
ffmpeg -y -ss 00:00:30 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
ffmpeg -y -ss 00:01:00 -i "${fic}" -vframes 1 -filter:v scale="320:180" "../snaps/$fic.png"
done
cd ..
rm encodage_lq.sh
pwd