Last active
February 15, 2023 01:54
-
-
Save othercat/3cbf957b5f9f93479ebdfb8c5babd90c to your computer and use it in GitHub Desktop.
Convert AC3 MKV to AAC MP4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
pathname=$1 | |
filename=$(basename $pathname .mkv) | |
dirname=$(dirname $pathname) | |
h264videopath="$dirname/../h264video/$filename.h264" | |
aacaudiopath="$dirname/../aacaudio/$filename.m4a" | |
aacvideopath="$dirname/../aacvideo/$filename.mp4" | |
ac3videopath="$dirname/../ac3video/$filename.mp4" | |
/usr/local/bin/avconv -i $1 -c:v copy -c:a copy $ac3videopath | |
/usr/bin/avconvert --preset PresetAppleM4A --source $ac3videopath --output $aacaudiopath -ot videoTrack | |
/usr/local/bin/ffmpeg -i $ac3videopath -c:v copy $h264videopath | |
#/usr/local/bin/avconv -i $ac3videopath -c:v copy $h264videopath | |
#/usr/local/bin/SublerCLI -dest $aacvideopath -source $h264videopath | |
/usr/local/bin/mp4box -add $h264videopath -add $aacaudiopath $aacvideopath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment