Skip to content

Instantly share code, notes, and snippets.

@engineersamuel
Created June 22, 2015 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save engineersamuel/27cf395ad82ae4f4c761 to your computer and use it in GitHub Desktop.
Save engineersamuel/27cf395ad82ae4f4c761 to your computer and use it in GitHub Desktop.
Encode mp4 files for DLNA streaming, works with TVs, devices, and PS4
#!/bin/bash
# ffmpeg installed via: brew install ffmpeg --enable-libx264 --enable-libfaac --enable-libass --with-faac --with-ass --with-tools
# ln -s /Applications/mkv2mp4.sh /usr/bin/mkv2mp4
MKV=$1
echo "MKV: $MKV"
MP4=`echo $MKV | sed 's/\.mkv/\.mp4/'`
echo "MP4: $MP4"
CMD="ffmpeg -y -i $MKV -vcodec copy -acodec libfaac -tune film $MP4"
echo "Executing: $CMD"
`$CMD`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment