?

Log in

No account? Create an account
Ryan's Journal -- Day [entries|friends|calendar]
Ryan

[ userinfo | livejournal userinfo ]
[ calendar | livejournal calendar ]

Convert 720p/ac3 mkv to 720p/aac iPad-compatible mp4/m4v on Mac OS X Snow Leopard [29 Jul 2010|11:47pm]
# Video is not transcoded, just demuxed/muxed
# Audio is downmixed to stereo with DRC 
#
# You need these tools:
# * mkvextract (to demux the Matroska file)
#   * http://www.bunkus.org/videotools/mkvtoolnix/
#   * Just install through MacPorts, it doesn't pull in anything annoying
# * a52dec (to decompress and downmix the ac3)
#   * http://liba52.sourceforge.net/
#   * Compile from source
# * faac (to recompress the audio to mp4a/aac)
#   * http://www.audiocoding.com/
#   * Compile from source
# * MP4Box (to remux into MPEG-4 container) 
#   * http://kurtnoise.free.fr/mp4tools/
#   * Pre-compiled standalone OS X executable

mkvextract tracks ${BASE}.mkv 1:${BASE}.ac3 2:${BASE}.264
a52dec -o wav ${BASE}.ac3 > ${BASE}.wav
faac -b 96 --mpeg-vers 4 -o ${BASE}.aac ${BASE}.wav
MP4Box -add ${BASE}.264:fps=23.976 -add ${BASE}.aac ${BASE}.m4v
rm ${BASE}.{264,ac3,wav,aac}
Update: Here's a gist of an mkv2m4v script that automates the process: http://gist.github.com/502844
7 comments|post comment

navigation
[ viewing | July 29th, 2010 ]
[ go | previous day ]