Posted: Mon 18 Oct 2010, 11:24 Post subject:
FFmpeg Wrapper 0.0.5
Here is the FFmpeg Wrapper script. It corrects the acodec "vorbis" parameter to "libvorbis". This is because older versions of FFmpeg used "vorbis" as the acodec parameter and in new version it was changed to "libvorbis". It also corrects "-vcodec xvid" to "-vcodec libxvid". This way old pre-sets/scripts are still compatible with this version of FFmpeg.
To use, rename the "ffmpeg" binary to "fmpeg.bin" and save this script in "/usr/bin/" using the name "ffmpeg".
Code:
#!/bin/sh
#FFmpeg Wrapper
#Version=0.0.5
#Date (dd.mm.yyyy hh:mm:ss)=08.10.2010 22:42:38
#Thanks to the dad (SSR) of Alexander .S.T. Ross (abushcrafter) (Again :).)
#ChangeLog ----------------------------------------------------------------------
# 12.10.2010 Alexander .S.T. Ross (abushcrafter) Email: <http://www.google.com/recaptcha/mailhide/d?k=01uNeUuXxeNm9FA3Zciuoqzw==&c=nVfKeb7kjqZVVIQanqJwEC2DP5zrALkSERTopYvj_pU=>
# * 0.0.5: Now corrects "-vcodec xvid" to "-vcodec libxvid".
# Bash script to modify edit parameters in command line.
# Designed to cope with spaces in parameters .
prevparam="none"
count=1
args=("$@")
while [ $count -ne $# ] ; do
if [ "$prevparam" = "-acodec" ] ; then
args[$count]=$(echo ${args[$count]}| sed s/vorbis/libvorbis/g )
fi
if [ "$prevparam" = "-vcodec" ] ; then
args[$count]=$(echo ${args[$count]}| sed s/xvid/libxvid/g )
fi
prevparam=${args[$count]}
#echo $count " " ${args[$count]} #Debugging: Comment out in final code.
count=$((count+1))
done
ffmpeg.bin "${args[@]}"
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum