FFmpeg Wrapper 0.0.5

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

FFmpeg Wrapper 0.0.5

#1 Post by abushcrafter »

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: Select all

#!/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[@]}"


On the subject of compatibility you might find this info useful: http://www.murga-linux.com/puppy/viewto ... 774#457774 and http://www.murga-linux.com/puppy/viewto ... 019#458019
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

Post Reply