forked from nwgat/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnwgatdaalaenc.sh
34 lines (27 loc) · 954 Bytes
/
nwgatdaalaenc.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
#!/bin/bash
clear
echo ""
echo "### nwgat.ninja simple daala encoder ###"
echo ""
echo "File to encode (use tab to select)"
read -e file
echo "Number of Frames to skip (blank blank if none)"
read skip
echo "Number of frames to encode (leave blank if none)"
read limit
echo "Video Quality (0-511, where 0 is best quality)"
read vq
echo "Video Complexity (0-10, where 10 is best quality)"
read vz
read -p "Do you want a uncompressed video, png frame, a png frame of source video file? (y/n)? " dump
if [ "$dump" = "y" ]; then
echo ""
./encoder_example -S $skip -l $limit -v $vq -z $vz $file -o $file.v$vq.z$vz.ogv
./dump_video $file.v$vq.z$vz.ogv -o $file.v$vq.z$vz.ogv.y4m
ffmpeg -i $file.v$vq.z$vz.ogv.y4m -f image2 -t 0.001 -vframes 1 $file.v$vq.z$vz.ogv.y4m.png
ffmpeg -i $file -f image2 -vf select="gte(n\, $skip)" -vframes 1 $file.src.png
else
echo ""
./encoder_example -S $skip -l $limit -v $vq -z $vz $file -o $file.v$vq.z$vz.ogv
fi
echo ""