projects
/
video-handling.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bd0e6d
)
avoid transcode-all to overwrite existing files
author
p2p p2p-next-02
<p2p@p2p-next-02.grid.pub.ro>
Wed, 6 Apr 2011 08:35:21 +0000
(11:35 +0300)
committer
p2p p2p-next-02
<p2p@p2p-next-02.grid.pub.ro>
Wed, 6 Apr 2011 08:35:21 +0000
(11:35 +0300)
transcode-all
patch
|
blob
|
history
diff --git
a/transcode-all
b/transcode-all
index
66f6ca6
..
5a8c3b5
100755
(executable)
--- a/
transcode-all
+++ b/
transcode-all
@@
-39,6
+39,11
@@
for filename in $(find "$in_path" -name "*.$in_ext"); do
new_filename=$(dirname "$filename")/$(basename "$filename" ."$in_ext")"$out_suffix"."$out_format"
fi
+ if [ -e $new_filename ]; then
+ echo "$0: $new_filename already exists" >&2
+ continue
+ fi
+
case "$out_format" in
"avi" )
$FFMPEG -i "$filename" -f avi -acodec libmp3lame -ab $ABITRATE -ar 44100 -ac 2 -vcodec libx264 -vpre normal -b "$bitrate" -r 25 -s $resolution -threads 0 "$new_filename"