|
11 | 11 | /** |
12 | 12 | * Transcoder config.php |
13 | 13 | * |
14 | | - * Completely optional configuration settings for Transcoder if you want to |
15 | | - * customize some of its more esoteric behavior, or just want specific control |
16 | | - * over things. |
| 14 | + * This file exists only as a template for the Transcoder settings. |
| 15 | + * It does nothing on its own. |
17 | 16 | * |
18 | 17 | * Don't edit this file, instead copy it to 'craft/config' as 'transcoder.php' |
19 | | - * and make your changes there. |
| 18 | + * and make your changes there to override default settings. |
20 | 19 | * |
21 | 20 | * Once copied to 'craft/config', this file will be multi-environment aware as |
22 | 21 | * well, so you can have different settings groups for each environment, just as |
|
26 | 25 | return [ |
27 | 26 |
|
28 | 27 | // The path to the ffmpeg binary |
29 | | - "ffmpegPath" => "/usr/bin/ffmpeg", |
| 28 | + 'ffmpegPath' => '/usr/bin/ffmpeg', |
30 | 29 |
|
31 | 30 | // The path to the ffprobe binary |
32 | | - "ffprobePath" => "/usr/bin/ffprobe", |
| 31 | + 'ffprobePath' => '/usr/bin/ffprobe', |
33 | 32 |
|
34 | 33 | // The options to use for ffprobe |
35 | | - "ffprobeOptions" => "-v quiet -print_format json -show_format -show_streams", |
| 34 | + 'ffprobeOptions' => '-v quiet -print_format json -show_format -show_streams', |
36 | 35 |
|
37 | 36 | // The path where the transcoded videos are stored; must have a trailing / |
38 | | - "transcoderPath" => $_SERVER['DOCUMENT_ROOT'] . "/transcoder/", |
| 37 | + 'transcoderPath' => '{DOCUMENT_ROOT}/transcoder/', |
39 | 38 |
|
40 | 39 | // The URL where the transcoded videos are stored; must have a trailing / |
41 | | - "transcoderUrl" => "/transcoder/", |
| 40 | + 'transcoderUrl' => '/transcoder/', |
42 | 41 |
|
43 | 42 | // Use a md5 hash for the filenames instead of parameterized naming |
44 | | - "useHashedNames" => false, |
| 43 | + 'useHashedNames' => false, |
45 | 44 |
|
46 | 45 | // Preset video encoders |
47 | | - "videoEncoders" => [ |
48 | | - "h264" => [ |
49 | | - "fileSuffix" => ".mp4", |
50 | | - "fileFormat" => "mp4", |
51 | | - "videoCodec" => "libx264", |
52 | | - "videoCodecOptions" => "-vprofile high -preset slow -crf 22", |
53 | | - "audioCodec" => "libfdk_aac", |
54 | | - "audioCodecOptions" => "-async 1000", |
| 46 | + 'videoEncoders' => [ |
| 47 | + 'h264' => [ |
| 48 | + 'fileSuffix' => '.mp4', |
| 49 | + 'fileFormat' => 'mp4', |
| 50 | + 'videoCodec' => 'libx264', |
| 51 | + 'videoCodecOptions' => '-vprofile high -preset slow -crf 22', |
| 52 | + 'audioCodec' => 'libfdk_aac', |
| 53 | + 'audioCodecOptions' => '-async 1000', |
55 | 54 | ], |
56 | | - "webm" => [ |
57 | | - "fileSuffix" => ".webm", |
58 | | - "fileFormat" => "webm", |
59 | | - "videoCodec" => "libvpx", |
60 | | - "videoCodecOptions" => "-quality good -cpu-used 0", |
61 | | - "audioCodec" => "libvorbis", |
62 | | - "audioCodecOptions" => "-async 1000", |
| 55 | + 'webm' => [ |
| 56 | + 'fileSuffix' => '.webm', |
| 57 | + 'fileFormat' => 'webm', |
| 58 | + 'videoCodec' => 'libvpx', |
| 59 | + 'videoCodecOptions' => '-quality good -cpu-used 0', |
| 60 | + 'audioCodec' => 'libvorbis', |
| 61 | + 'audioCodecOptions' => '-async 1000', |
63 | 62 | ], |
64 | 63 | ], |
65 | 64 |
|
66 | 65 | // Preset audio encoders |
67 | | - "audioEncoders" => [ |
68 | | - "mp3" => [ |
69 | | - "fileSuffix" => ".mp3", |
70 | | - "fileFormat" => "mp3", |
71 | | - "audioCodec" => "libmp3lame", |
72 | | - "audioCodecOptions" => "", |
| 66 | + 'audioEncoders' => [ |
| 67 | + 'mp3' => [ |
| 68 | + 'fileSuffix' => '.mp3', |
| 69 | + 'fileFormat' => 'mp3', |
| 70 | + 'audioCodec' => 'libmp3lame', |
| 71 | + 'audioCodecOptions' => '', |
73 | 72 | ], |
74 | | - "aac" => [ |
75 | | - "fileSuffix" => ".m4a", |
76 | | - "fileFormat" => "aac", |
77 | | - "audioCodec" => "libfdk_aac", |
78 | | - "audioCodecOptions" => "", |
| 73 | + 'aac' => [ |
| 74 | + 'fileSuffix' => '.m4a', |
| 75 | + 'fileFormat' => 'aac', |
| 76 | + 'audioCodec' => 'libfdk_aac', |
| 77 | + 'audioCodecOptions' => '', |
79 | 78 |
|
80 | 79 | ], |
81 | | - "ogg" => [ |
82 | | - "fileSuffix" => ".ogg", |
83 | | - "fileFormat" => "ogg", |
84 | | - "audioCodec" => "libvorbis", |
85 | | - "audioCodecOptions" => "", |
| 80 | + 'ogg' => [ |
| 81 | + 'fileSuffix' => '.ogg', |
| 82 | + 'fileFormat' => 'ogg', |
| 83 | + 'audioCodec' => 'libvorbis', |
| 84 | + 'audioCodecOptions' => '', |
86 | 85 | ], |
87 | 86 | ], |
88 | 87 |
|
89 | 88 | // Default options for encoded videos |
90 | | - "defaultVideoOptions" => [ |
| 89 | + 'defaultVideoOptions' => [ |
91 | 90 | // Video settings |
92 | | - "videoEncoder" => "h264", |
93 | | - "videoBitRate" => "800k", |
94 | | - "videoFrameRate" => 15, |
| 91 | + 'videoEncoder' => 'h264', |
| 92 | + 'videoBitRate' => '800k', |
| 93 | + 'videoFrameRate' => 15, |
95 | 94 | // Audio settings |
96 | | - "audioBitRate" => "", |
97 | | - "audioSampleRate" => "", |
98 | | - "audioChannels" => "", |
| 95 | + 'audioBitRate' => '', |
| 96 | + 'audioSampleRate' => '', |
| 97 | + 'audioChannels' => '', |
99 | 98 | // Spatial settings |
100 | | - "width" => "", |
101 | | - "height" => "", |
102 | | - "sharpen" => true, |
103 | | - // Can be "none", "crop", or "letterbox" |
104 | | - "aspectRatio" => "letterbox", |
105 | | - "letterboxColor" => "", |
| 99 | + 'width' => '', |
| 100 | + 'height' => '', |
| 101 | + 'sharpen' => true, |
| 102 | + // Can be 'none', 'crop', or 'letterbox' |
| 103 | + 'aspectRatio' => 'letterbox', |
| 104 | + 'letterboxColor' => '', |
106 | 105 | ], |
107 | 106 |
|
108 | 107 | // Default options for video thumbnails |
109 | | - "defaultThumbnailOptions" => [ |
110 | | - "fileSuffix" => ".jpg", |
111 | | - "timeInSecs" => 10, |
112 | | - "width" => "", |
113 | | - "height" => "", |
114 | | - "sharpen" => true, |
115 | | - // Can be "none", "crop", or "letterbox" |
116 | | - "aspectRatio" => "letterbox", |
117 | | - "letterboxColor" => "", |
| 108 | + 'defaultThumbnailOptions' => [ |
| 109 | + 'fileSuffix' => '.jpg', |
| 110 | + 'timeInSecs' => 10, |
| 111 | + 'width' => '', |
| 112 | + 'height' => '', |
| 113 | + 'sharpen' => true, |
| 114 | + // Can be 'none', 'crop', or 'letterbox' |
| 115 | + 'aspectRatio' => 'letterbox', |
| 116 | + 'letterboxColor' => '', |
118 | 117 | ], |
119 | 118 |
|
120 | 119 | // Default options for encoded videos |
121 | | - "defaultAudioOptions" => [ |
122 | | - "audioEncoder" => "mp3", |
123 | | - "audioBitRate" => "128k", |
124 | | - "audioSampleRate" => "44100", |
125 | | - "audioChannels" => "2", |
| 120 | + 'defaultAudioOptions' => [ |
| 121 | + 'audioEncoder' => 'mp3', |
| 122 | + 'audioBitRate' => '128k', |
| 123 | + 'audioSampleRate' => '44100', |
| 124 | + 'audioChannels' => '2', |
126 | 125 | ], |
127 | 126 |
|
128 | 127 | ]; |
0 commit comments