Index: trunk/extensions/TimedMediaHandler/TimedMediaThumbnail.php |
— | — | @@ -18,17 +18,18 @@ |
19 | 19 | static function tryFfmpegThumb( $options ){ |
20 | 20 | global $wgFFmpegLocation; |
21 | 21 | |
22 | | - $cmd = wfEscapeShellArg( $wgFFmpegLocation ) . |
23 | | - ' -i ' . wfEscapeShellArg( $options['file']->getPath() ); |
| 22 | + $cmd = wfEscapeShellArg( $wgFFmpegLocation ); |
| 23 | + |
| 24 | + $cmd .= ' -ss ' . intval( self::getThumbTime( $options ) ); |
| 25 | + $cmd .= ' -i ' . wfEscapeShellArg( $options['file']->getPath() ); |
24 | 26 | // Set the output size if set in options: |
25 | 27 | if( isset( $options['width'] ) && isset( $options['height'] ) ){ |
26 | 28 | $cmd.= ' -s '. intval( $options['width'] ) . 'x' . intval( $options['height'] ); |
27 | 29 | } |
28 | 30 | |
29 | | - $cmd.=' -ss ' . intval( self::getThumbTime( $options ) ) . |
30 | 31 | # MJPEG, that's the same as JPEG except it's supported by the windows build of ffmpeg |
31 | 32 | # No audio, one frame |
32 | | - ' -f mjpeg -an -vframes 1 ' . |
| 33 | + $cmd .= ' -f mjpeg -an -vframes 1 ' . |
33 | 34 | wfEscapeShellArg( $options['dstPath'] ) . ' 2>&1'; |
34 | 35 | |
35 | 36 | $retval = 0; |