Skip to content

Instantly share code, notes, and snippets.

View tdolega's full-sized avatar
🏃‍♂️
acceleration, yesssss

Tymoteusz Dolega tdolega

🏃‍♂️
acceleration, yesssss
  • Katowice, Poland
  • 15:08 (UTC +02:00)
  • LinkedIn in/tdolega
View GitHub Profile
@tdolega
tdolega / remuxDji120Fps
Created June 22, 2022 21:46
Convert DJI slow motion 120FPS video, to real time 120FPS and merge sound. All without reencoding anything.
#!/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