Skip to content

Commit 0a1f8fc

Browse files
Option to overwrite AAC codec
1 parent 4930eb2 commit 0a1f8fc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

FfmpegVideoTranscoding.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
public static $ffmpeg_binary = NULL;
1515
public static $ffprobe_binary = NULL;
16+
public static $aac_encoder = NULL;
1617

1718
/* Returns target file name
1819
*
@@ -154,7 +155,7 @@ public static function transcode($source, $options) {
154155
$video->addFilter(new DurationFilter($options["duration"]));
155156
if (@$options["format"]) {
156157
if ($options["format"] == "mp4") {
157-
$format = new X264Baseline();
158+
$format = @static::$aac_encoder ? new X264Baseline(static::$aac_encoder) : new X264Baseline();
158159
$format->setKiloBitrate($bitSize);
159160
$format->setAudioKiloBitrate($audioBitrate);
160161
} elseif ($options["format"] == "flv") {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name" : "ziggeo/php-ffmpeg-toolkit",
33
"description" : "A php library for running ffmpeg.",
4-
"version" : "0.0.15",
4+
"version" : "0.0.16",
55
"license" : "Apache-2.0",
66
"require" : {
77
"php" : ">=5.3.0",

0 commit comments

Comments
 (0)