Skip to content

Commit 97f526a

Browse files
committed
option to strip metadata
1 parent 4dede13 commit 97f526a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/models/Settings.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ class Settings extends Model
199199
'audioBitRate' => '128k',
200200
'audioSampleRate' => '44100',
201201
'audioChannels' => '2',
202-
'synchronous' => false
202+
'synchronous' => false,
203+
'stripMetadata' => false
203204
];
204205
/**
205206
* Default options for encoded GIF

src/services/Transcode.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ public function getAudioUrl($filePath, $audioOptions): string
387387

388388
// Assemble the destination path and final ffmpeg command
389389
$destAudioPath .= $destAudioFile;
390+
391+
if ($audioOptions['stripMetadata']) {
392+
$ffmpegCmd .= ' -map_metadata -1 ';
393+
}
394+
390395
$ffmpegCmd .= ' -f '
391396
.$thisEncoder['fileFormat']
392397
.' -y '.escapeshellarg($destAudioPath);

0 commit comments

Comments
 (0)