Skip to content

Instantly share code, notes, and snippets.

@des1roer
Created December 24, 2024 11:31
Show Gist options
  • Save des1roer/efa759d963a0e69e8a5ec782b754bd86 to your computer and use it in GitHub Desktop.
Save des1roer/efa759d963a0e69e8a5ec782b754bd86 to your computer and use it in GitHub Desktop.
private function removeExifFromVideo(string $path): void
{
$newFilename = 'tmp_' . basename($path);
$newPath = dirname($path) . '/' . $newFilename;
$command = 'ffmpeg -y -i '
. escapeshellarg($path)
. ' -map_metadata -1 -c:v copy -c:a copy '
. escapeshellarg($newPath);
exec($command);
rename($newPath, $path);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment