Created
June 22, 2022 21:46
-
-
Save tdolega/792f0a89418b2450af1ef2b763021eab to your computer and use it in GitHub Desktop.
Convert DJI slow motion 120FPS video, to real time 120FPS and merge sound. All without reencoding anything.
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment