I have this ffmpeg one-liner that's been good for generating video files for my Nexus One:
ffmpeg -i infile.mkv -acodec aac -s 572x238 -vcodec libx264 -vpre ipod640 -ab 128k -b 512k -f mp4 -strict experimental outfile.mp4
But it does this ignorant of the subtitles in infile.mkv
-- usually not a problem, unless I'm dealing with a non-english movie. In cases like this, I'd like to use the Japanese audio track, and the English subtitles.
The funny bit is that I can use mplayer
to play it using -alang
and -slang
, but don't know how to use mencoder
to make Nexus One friendly videos. I can use ffmpeg
to generate Nexus One friendly videos, but can't figure out how to get it to use a specific subtitle track.
If someone can solve one of these for me, I'll be a happy camper.
Well after a lot of googling and trial & error, here is what worked for me:
mencoder infile.mkv -o outfile.mp4 -vf dsize=512:352:2,scale=-8:-8,harddup -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=mp4 -ovc x264 -sws 9 -x264encopts nocabac:level_idc=30:bframes=0:bitrate=264:threads=auto:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh
It's not using ffmpeg, but it appears to be working.