-
Notifications
You must be signed in to change notification settings - Fork 0
/
dumpdata
58 lines (49 loc) · 1.75 KB
/
dumpdata
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
rm -R data
mkdir data
mkdir data/XG
mkdir data/XN
mkdir data/XV
mkdir data/XT
mkdir data/XS
for f in *.nmv; do
./pff.py $f nav;
done
ffmpeg -framerate 1 -i nav-%1d.jpg -r 25 -y -c:v libx264 -crf 22 -pix_fmt yuv420p data/nav.mp4
for f in XG/*.xmv; do
ffmpeg -i $f -c:v libx264 -crf 22 -pix_fmt yuv420p data/${f%%.*}.mp4;
done
for f in XN/*.xmv; do
ffmpeg -i $f -c:v libx264 -crf 22 -pix_fmt yuv420p data/${f%%.*}.mp4;
done
for f in XV/*.xmv; do
ffmpeg -i $f -c:v libx264 -crf 22 -pix_fmt yuv420p data/${f%%.*}.mp4;
done
for f in XS/*.amv; do
ffmpeg -i $f -c:a aac data/${f%%.*}.m4a;
done
for f in XS/*.dmv; do
ffmpeg -i $f -c:a aac data/${f%%.*}.m4a;
done
for f in XS/*.mus; do
ffmpeg -i $f -c:a aac data/${f%%.*}.m4a;
done
for f in XV/*.xmv; do
ffprobe -show_entries stream=index,codec_type:stream_tags=language -of compact $f 2>&1 | { while read line; do if $(echo "$line" | grep -q -i "stream #"); then echo "$line"; fi; done; while read -d $'\x0D' line; do if $(echo "$line" | grep -q "time="); then echo "$line" | awk '{ printf "%s\r", $8 }'; fi; done; } | grep Subtitle | cut -c 11-11 | { while read s; do ffmpeg -i ${f} -map 0:s:1 data/${f%%.*}_1.srt; ffmpeg -i ${f} -map 0:s:2 data/${f%%.*}.srt; done; }
done
./srt-vtt -r data/XV
for f in XG/*.pff; do
mkdir data/XG/${f%%.*};
./pff.py $f data/XG/${f%%.*}/${f%%.*};
ffmpeg -framerate 1 -i data/XG/${f%%.*}/${f%%.*}-%1d.jpg -r 25 -y -c:v libx264 -crf 22 -pix_fmt yuv420p data/XG/${f%%.*}/${f%%.*}.mp4
done
for f in *.pff; do
mkdir data/${f%%.*};
./pff.py $f data/${f%%.*}/${f%%.*};
ffmpeg -framerate 1 -i data/${f%%.*}/${f%%.*}-%1d.jpg -r 25 -y -c:v libx264 -crf 22 -pix_fmt yuv420p data/${f%%.*}/${f%%.*}.mp4
done
for f in XV/*.hot; do
cp $f data/$f;
done
for f in XT/*.*; do
cp $f data/$f;
done