Skip to content

Commit e476e5b

Browse files
authored
Added trimming to audio transcoding
1 parent 139f196 commit e476e5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/Transcode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ public function getAudioUrl($filePath, $audioOptions): string
367367
}
368368
$ffmpegCmd .= ' '.$thisEncoder['audioCodecOptions'];
369369

370+
if (!empty($audioOptions['timeInSecs'])) {
371+
$ffmpegCmd .= ' -t '.$audioOptions['timeInSecs'];
372+
}
370373

371374
// Create the directory if it isn't there already
372375
if (!is_dir($destAudioPath)) {

0 commit comments

Comments
 (0)