Some time ago, I found this really cool command made by someone. I don't even remember where I found it. I tried it and it converts mkv files and mp4 files very reliably to xvid-mp3 avi files that to my eyes, rival the originals in quality and are WAY SMALLER, and they play on my standalone divx player! SO COOL! See here:
Code:
mencoder -mc 0 -noskip -vf expand=:::::16/9,scale=720:480,hqdn3d,harddup -ovc xvid -oac mp3lame -xvidencopts fixed_quant=3.8:me_quality=6:noqpel:nogmc:trellis:chroma_me:chroma_opt:hq_ac:vhq=4:lumi_mask:max_key_interval=300:quant_type=mpeg:max_bframes=2:closed_gop:nopacked:profile=asp5:autoaspect:bvhq=1 -lameopts vbr=2:q=6:aq=2 -o "NEW_FILENAME" "FILE_TO_CONVERT"
Just replace FILE_TO_CONVERT with the actual filename of the file you want to convert. Replace NEW_FILENAME with the new filename you want. Put .avi at the end of the filename, of course. I like to add "xvid.mp3" like this - Robin_Hood.xvid.mp3.avi
I want to share that command that works so well for me on my Ubuntu 12.04 installation. Note that I do have a few extras installed, such as ffmpeg, lame, and, I think, ubuntu-restricted-extras among others.
QUESTION:
Can you guys help me write a script that will simply do this to all *mkv or *.mp4 files in a directory? This will help me learn how to make my own bash scripts, a skill I have been lacking, but always wanted to learn!
Technically I suppose there's another subforum for this question, but I wanted to share the command itself here, and I know that this is a very trivial type of task which any skilled admin ought to be able to do, so . . .
Bookmarks