Skip to content

Instantly share code, notes, and snippets.

@mfilej
Created December 28, 2011 10:22
Show Gist options
  • Save mfilej/1527475 to your computer and use it in GitHub Desktop.
Save mfilej/1527475 to your computer and use it in GitHub Desktop.
mkv to m4v
# demux
mkvextract tracks ${BASE}.mkv 1:${BASE}.ac3 2:${BASE}.264
# convert audio
ffmpeg -i ${BASE}.ac3 -acodec libfaac -ab 576k ${BASE}.aac
# or
ffmpeg -i ${BASE}.ac3 -vn -r 30000/1001 -acodec libfaac -ac 6 -ar 48000 -ab 448k ${BASE}.aac
# mux
MP4Box -add ${BASE}.264:fps=23.976 -add ${BASE}.aac ${BASE}.m4v
# see also:
# http://tekman.livejournal.com/88545.html
# https://gist.github.com/502844
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment