Passed
Push — develop ( c4488a...0835a7 )
by Andrew
04:33
created
src/config.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -32,27 +32,27 @@  discard block
 block discarded – undo
32 32
     'ffprobePath' => '/usr/bin/ffprobe',
33 33
 
34 34
     // The options to use for ffprobe
35
-	'ffprobeOptions' => '-v quiet -print_format json -show_format -show_streams',
35
+    'ffprobeOptions' => '-v quiet -print_format json -show_format -show_streams',
36 36
 
37 37
     // The path where the transcoded videos are stored; must have a trailing /
38 38
     // Yii2 aliases are supported here    
39
-	'transcoderPaths' => [
40
-		'default' 	=> '@webroot/transcoder/',
41
-		'video' 	=> '@webroot/transcoder/video/',
42
-		'audio' 	=> '@webroot/transcoder/audio/',
43
-		'thumbnail' => '@webroot/transcoder/thumbnail/',
44
-		'gif'		=> '@webroot/transcoder/gif/'
45
-	],
39
+    'transcoderPaths' => [
40
+        'default' 	=> '@webroot/transcoder/',
41
+        'video' 	=> '@webroot/transcoder/video/',
42
+        'audio' 	=> '@webroot/transcoder/audio/',
43
+        'thumbnail' => '@webroot/transcoder/thumbnail/',
44
+        'gif'		=> '@webroot/transcoder/gif/'
45
+    ],
46 46
 	
47 47
     // The URL where the transcoded videos are stored; must have a trailing /
48 48
     // Yii2 aliases are supported here
49
-	'transcoderUrls' => [
50
-		'default' 	=> '@web/transcoder/',
51
-		'video' 	=> '@web/transcoder/video/',
52
-		'audio' 	=> '@web/transcoder/audio/',
53
-		'thumbnail' => '@web/transcoder/thumbnail/',
54
-		'gif'		=> '@web/transcoder/gif/'
55
-	],
49
+    'transcoderUrls' => [
50
+        'default' 	=> '@web/transcoder/',
51
+        'video' 	=> '@web/transcoder/video/',
52
+        'audio' 	=> '@web/transcoder/audio/',
53
+        'thumbnail' => '@web/transcoder/thumbnail/',
54
+        'gif'		=> '@web/transcoder/gif/'
55
+    ],
56 56
 	
57 57
     // Use a md5 hash for the filenames instead of parameterized naming
58 58
     'useHashedNames' => false,
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
             'audioCodecOptions' => '-async 1000',
77 77
         ],
78 78
         'gif' => [
79
-	        'fileSuffix' => '.mp4',
80
-	        'fileFormat' => 'mp4',
81
-	        'videoCodec' => 'libx264',
82
-	        'videoCodecOptions' => '-pix_fmt yuv420p -movflags +faststart -filter:v crop=\'floor(in_w/2)*2:floor(in_h/2)*2\' ',
79
+            'fileSuffix' => '.mp4',
80
+            'fileFormat' => 'mp4',
81
+            'videoCodec' => 'libx264',
82
+            'videoCodecOptions' => '-pix_fmt yuv420p -movflags +faststart -filter:v crop=\'floor(in_w/2)*2:floor(in_h/2)*2\' ',
83 83
         ]        
84 84
     ],
85 85
 
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
         'audioChannels' => '2',
146 146
     ],
147 147
 
148
-	// Default options for Gif encoding
149
-	'defaultGifOptions' => [
150
-		'videoEncoder'    	=> 'gif',
151
-		'fileSuffix'        => '.mp4',
152
-		'fileFormat'        => 'gif',
153
-		'videoCodec'        => 'libx264',
154
-		'videoCodecOptions' => '-pix_fmt yuv420p -movflags +faststart -filter:v crop=\'floor(in_w/2)*2:floor(in_h/2)*2\' ',
155
-	],
148
+    // Default options for Gif encoding
149
+    'defaultGifOptions' => [
150
+        'videoEncoder'    	=> 'gif',
151
+        'fileSuffix'        => '.mp4',
152
+        'fileFormat'        => 'gif',
153
+        'videoCodec'        => 'libx264',
154
+        'videoCodecOptions' => '-pix_fmt yuv420p -movflags +faststart -filter:v crop=\'floor(in_w/2)*2:floor(in_h/2)*2\' ',
155
+    ],
156 156
 ];
Please login to merge, or discard this patch.
src/services/Transcode.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             } else {
187 187
 
188 188
                 // Kick off the transcoding
189
-				$pid = $this->executeShellCommand($ffmpegCmd);
189
+                $pid = $this->executeShellCommand($ffmpegCmd);
190 190
                 Craft::info($ffmpegCmd . "\nffmpeg PID: " . $pid, __METHOD__);
191 191
 
192 192
                 // Create a lockfile in tmp
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 
756 756
         if (!empty($filePath)) {
757 757
 
758
-			// Dest path
758
+            // Dest path
759 759
             $destVideoPath = Craft::getAlias($settings['transcoderPaths']['gif']);
760 760
                         
761 761
             // Options
@@ -768,13 +768,13 @@  discard block
 block discarded – undo
768 768
 
769 769
             // Build the basic command for ffmpeg
770 770
             $ffmpegCmd = $settings['ffmpegPath']
771
-            	. ' -f gif' 
771
+                . ' -f gif' 
772 772
                 . ' -i ' . escapeshellarg($filePath)
773 773
                 . ' -vcodec ' . $thisEncoder['videoCodec']
774 774
                 . ' ' . $thisEncoder['videoCodecOptions'];
775 775
 
776 776
 
777
-             // Create the directory if it isn't there already
777
+                // Create the directory if it isn't there already
778 778
             if (!file_exists($destVideoPath)) {
779 779
                 mkdir($destVideoPath);
780 780
             }
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
             } else {
810 810
 
811 811
                 // Kick off the transcoding
812
-				$pid = $this->executeShellCommand($ffmpegCmd);
812
+                $pid = $this->executeShellCommand($ffmpegCmd);
813 813
                 Craft::info($ffmpegCmd . "\nffmpeg PID: " . $pid, __METHOD__);
814 814
 
815 815
                 // Create a lockfile in tmp
Please login to merge, or discard this patch.
src/models/Settings.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @var string
53 53
      */
54
-	 public $transcoderPaths = [];
54
+        public $transcoderPaths = [];
55 55
 	 
56 56
     /**
57 57
      * The URL where the transcoded videos are stored; must have a trailing /
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
             'audioCodecOptions' => '-async 1000',
92 92
         ],
93 93
         'gif' => [
94
-	        'fileSuffix' => '.mp4',
95
-	        'fileFormat' => 'mp4',
96
-	        'videoCodec' => 'libx264',
97
-	        'videoCodecOptions' => '-pix_fmt yuv420p -movflags +faststart -filter:v crop=\'floor(in_w/2)*2:floor(in_h/2)*2\' ',
94
+            'fileSuffix' => '.mp4',
95
+            'fileFormat' => 'mp4',
96
+            'videoCodec' => 'libx264',
97
+            'videoCodecOptions' => '-pix_fmt yuv420p -movflags +faststart -filter:v crop=\'floor(in_w/2)*2:floor(in_h/2)*2\' ',
98 98
         ]           
99 99
     ];
100 100
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      * @var array
183 183
      */
184 184
     public $defaultGifOptions = [
185
-		'videoEncoder'    	=> 'gif',
185
+        'videoEncoder'    	=> 'gif',
186 186
         'fileSuffix'        => '',
187 187
         'fileFormat'        => '',
188 188
         'videoCodec'        => '',
Please login to merge, or discard this patch.