J has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63418


Change subject: (bug 46650) increase memory limit for frame extraction
......................................................................

(bug 46650) increase memory limit for frame extraction

1080p Ogg Theora uploads need more memory to extract frames.

Bug: 46650
Change-Id: I7333c9c6ec24eec4e08e6072c66af74e537161b1
---
M TimedMediaThumbnail.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/18/63418/1

diff --git a/TimedMediaThumbnail.php b/TimedMediaThumbnail.php
index a082dbc..5f9ffdd 100644
--- a/TimedMediaThumbnail.php
+++ b/TimedMediaThumbnail.php
@@ -91,6 +91,9 @@
                if( !$wgFFmpegLocation || !is_file( $wgFFmpegLocation ) ){
                        return false;
                }
+               $env = array();
+               //decoding 1080p Ogg Theora can require lots of ram
+               $limits = array( 'memory' => 1536000 );
 
                $cmd = wfEscapeShellArg( $wgFFmpegLocation ) . ' -threads 1 ';
 
@@ -133,7 +136,7 @@
                        wfEscapeShellArg( $options['dstPath'] ) . ' 2>&1';
 
                $retval = 0;
-               $returnText = wfShellExec( $cmd, $retval );
+               $returnText = wfShellExec( $cmd, $retval, $env, $limits );
                // Check if it was successful
                if ( !$options['file']->getHandler()->removeBadFile( 
$options['dstPath'], $retval ) ) {
                        return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/63418
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7333c9c6ec24eec4e08e6072c66af74e537161b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to