-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert
executable file
·92 lines (72 loc) · 1.71 KB
/
convert
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Music converting ---------------------------------------------------------------{{{
# ogg in flac with sox {{{
fctcvoggtoflac ()
{
for i in *.ogg; do sox "$i" "${i}.flac"; done
}
# }}}
# midi with timidity {{{
fctcvmidi ()
{
for i in *; do timidity -Ov $i; done
}
# }}}
# ape in wave format with `mac` {{{
fctcvapetowav ()
{
for i in *.ape; do mac "$i" "${i#}.wav" -d; done
}
# }}}
# wav into flac {{{
fctcvwavtoflac ()
{
for i in *.wav; do sox "$i" "${i}.flac"; done
}
# }}}
# --------------------------------------------------------------------------------}}}
# Video converting ---------------------------------------------------------------{{{
# ogv video into flv format with `ffmpeg` {{{
fctcvogvtoflv ()
{
ffmpeg -i input_file.ogv output_file.flv
}
# }}}
# --------------------------------------------------------------------------------}}}
# Image converting ---------------------------------------------------------------{{{
# convert all pngs into jpgs with `convert` {{{
fctcvjpg ()
{
for i in *.png; do convert "$i" "${i%.png}.jpg"; done
}
# }}}
# convert png in eps with `convert` {{{
fctcveps ()
{
for i in *.png; do convert "$i" "${i%.png}.eps"; done
}
# }}}
# replace JGP through jpg (suffix) {{{
fctrJPGtojpg ()
{
for i in *.JPG; do mv "$i" "${i%JPG}jpg"; done
}
# }}}
# replace MOVE through move (suffix) {{{
fctrMOVtomov ()
{
for i in *.MOV; do mv "$i" "${i%MOV}mov"; done
}
# }}}
# replace MP3 through mp3 (suffix) {{{
fctrMP3tomp3 ()
{
for i in *.MP3; do mv "$i" "${i%MP3}mp3"; done
}
# }}}
# replace MP4 through mp4 (suffix) {{{
fctrMP4tomp4 ()
{
for i in *.MP4; do mv "$i" "${i%MP4}mp4"; done
}
# }}}
# --------------------------------------------------------------------------------}}}