This file contains 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 | |
set -e | |
ffmpeg -i $1.MP4 -c:v copy -c:a copy -f matroska - | ffmpeg -i pipe: -map 0:v -c:v copy -bsf:v hevc_mp4toannexb -f hevc - | ffmpeg -fflags +genpts -r 120 -i pipe: -c:v copy /tmp/_tmp.mp4 | |
ffmpeg -i /tmp/_tmp.mp4 -i $1.aac -c copy $1_remux.mp4 | |
rm /tmp/_tmp.mp4 $1.MP4 $1.aac | |
# pass file name without extension as parameter, for example: DJI_0020 for DJI_0020.MP4 and DJI_0020.aac pair |