Created
December 24, 2024 11:31
-
-
Save des1roer/efa759d963a0e69e8a5ec782b754bd86 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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