projects
/
hvutilities.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add reindent-allman.sh
[hvutilities.git]
/
scripts
/
avi2mp4
diff --git
a/scripts/avi2mp4
b/scripts/avi2mp4
index
c9c3042
..
cf69f8b
100755
(executable)
--- a/
scripts/avi2mp4
+++ b/
scripts/avi2mp4
@@
-6,7
+6,7
@@
VIDEO_OPTS="-c:v libx264 -preset veryslow -crf 15"
print_usage()
{
print_usage()
{
- echo "${PROG_NAME} -- Conversion
AVI à
MP4 (x264)"
+ echo "${PROG_NAME} -- Conversion MP4 (x264)"
echo "Usage: ${PROG_NAME} [OPTIONS...] FICHIER"
echo
echo "Options:"
echo "Usage: ${PROG_NAME} [OPTIONS...] FICHIER"
echo
echo "Options:"
@@
-68,6
+68,8
@@
if [ ! -f $1 ]; then
exit 1
fi
exit 1
fi
-dest=`echo "${src}" | sed s/\.avi$/.mp4/g`
+# Cut everything after the last dot using sed:
+dest=`echo "${src}" | sed s/\.[^.]*$//`
+dest="${dest}.mp4"
ffmpeg -i "${src}" ${VIDEO_OPTS} ${audio_opts} "${dest}"
ffmpeg -i "${src}" ${VIDEO_OPTS} ${audio_opts} "${dest}"