Skip to content

Instantly share code, notes, and snippets.

@brlodi
Last active February 2, 2021 19:25
Show Gist options
  • Save brlodi/e7d3b575e3a7e9601ed1553f3c1cb153 to your computer and use it in GitHub Desktop.
Save brlodi/e7d3b575e3a7e9601ed1553f3c1cb153 to your computer and use it in GitHub Desktop.
macOS and iOS have native support for HEVC video, but only with hvc1 tagging instead of hev1 tagging. This snippet "fixes" it "in place" without reencoding anything, so it's almost instant. I use it to make direct-to-disk recordings from my CCTV cameras playable in browser/QuickTime/QuickLook without needing VLC.
#!/bin/sh
ffmpeg -i "$1" -codec copy -tag:v hvc1 -f mp4 "$1.tmp" && mv -f "$1.tmp" "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment