-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtranscode.sh
More file actions
48 lines (39 loc) · 1.04 KB
/
transcode.sh
File metadata and controls
48 lines (39 loc) · 1.04 KB
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
#!/bin/sh
. lib/utility.func
rm -rf media
mkdir media
cd media
DIR=`pwd`
LIST="720 576 480 360"
for res in `echo $LIST`
do
case $res in
"720")
mkdir $res
transcode $1 /tmp/out_${res}.mp4 2400 $res
fragment 5000 /tmp/out_${res}.mp4 /tmp/out_${res}_fragmented.mp4
;;
"576")
mkdir $res
transcode $1 /tmp/out_${res}.mp4 1200 $res
fragment 5000 /tmp/out_${res}.mp4 /tmp/out_${res}_fragmented.mp4
;;
"480")
mkdir $res
transcode $1 /tmp/out_${res}.mp4 1000 $res
fragment 5000 /tmp/out_${res}.mp4 /tmp/out_${res}_fragmented.mp4
;;
"360")
mkdir $res
transcode $1 /tmp/out_${res}.mp4 800 $res
fragment 5000 /tmp/out_${res}.mp4 /tmp/out_${res}_fragmented.mp4
;;
*)
echo ""
echo " ....Nothing to do for resolution [$res]"
echo ""
exit 100
;;
esac
echo $res
done