Until now I used this script to reencode my rips for my box (tv decoder):
^_^ ( ~ ) -> cat ~/++/src/convert.sh
#! /bin/bash
name=$(path -r "$1") # it gives the file name without the extension
[ "$1" = *.mp4 ] && ffmpeg -i "$name".mp4 -vcodec copy -acodec copy "$name".mkv
x264 --preset veryfast --tune animation --crf 18 --vf resize:720,576,16:15 -o "$name".tmp.mkv "$name".mkv
mkvmerge -o "$name [freeplayer sd]".mkv "$name".tmp.mkv --no-video "$1"
rm -rf "$name".tmp.mkv
[ "$1" = *.mp4 ] && rm -rf "$name".mkv
exit 0
#EOF
It works on my ubuntu and archlinux laptops. But it doesn’t on my desktop witch runs fedora. Google says that the x264 package shiped by rpmfusion doesn,t support lavf and ffms2. And I cannot unistall it because smplayer (witch i like) needs it.
Ok, so I have to compile it. Google then says "you have to build ffmpeg, ffms2 tnen x264 ensuring that the flags are correctly refered." Well, didn’t work (ffms2 cannot find LIBAV - even when I am telling where - and x264 does’t configure with lavf...)
My question is: can I use ffmpeg alone to do what my script does. I have ffmpeg version 0.8.11, x264 0.116.2048 59cb2eb and gcc: 4.6.1 20110804 (Red Hat 4.6.1-7)
EDIT: Ok, I found that: ffmpeg -i input file -acodec copy -vcodec libx264 -preset veryfast -tune animation [that part I don’t have] output