self::$stagingDir = @$opts['d'] ? @$opts['d'] : @$opts['staging-dir']; if (empty(self::$stagingDir)) { self::$stagingDir = self::DEFAULT_STAGING_DIR; } self::$debugArticleID = @$opts['f'] ? @$opts['f'] : @$opts['force']; $skipID = @$opts['e'] ? $opts['e'] : @$opts['exclude-article-id']; if ($skipID) { self::$excludeArticles[] = $skipID; } if ($_ENV['USER'] != 'apache') { self::e("script must be run as part of wikivisual-process-media.sh"); exit; } Misc::loginAsUser(self::MEDIA_USER); // if ($doBackup) { // $this->doS3Backup (); // } else if ($doCleanup) { $this->doS3Cleanup(); } else { $this->mp4Transcoder = new Mp4Transcoder(); $this->imageTranscoder = new ImageTranscoder(); $this->processTranscodingArticles(); //1st take care of articles which are under processing. $this->processS3Media(); } } } $wmt = new WikiVisualTranscoder(); $wmt->main();