Skip to content

Instantly share code, notes, and snippets.

@47ronin
Last active May 29, 2023 00:05
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 47ronin/4b9ae57798bfc8b25453af2f80c08210 to your computer and use it in GitHub Desktop.
Save 47ronin/4b9ae57798bfc8b25453af2f80c08210 to your computer and use it in GitHub Desktop.
Batch fix HEVC MP4 screen captures from OBS so they are usable on macOS (QuickTime and Final Cut Pro). Preserves modification date.
#!/bin/bash
for i in *.mp4
do \
ffmpeg -i "$i" -map_metadata 0 -c:v copy -c:a copy -tag:v hvc1 "$HOME/PATH/${i%.*}.mp4"
touch -r "$i" "$HOME/PATH/${i%.*}.mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment