<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/transcode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/transcode.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1605087787424" duration="33487000" />
<workItem from="1605261347643" duration="1199000" />
<workItem from="1605342171398" duration="4613000" />
- <workItem from="1605355486465" duration="15362000" />
- </task>
- <task id="LOCAL-00346" summary=".">
- <created>1602501505304</created>
- <option name="number" value="00346" />
- <option name="presentableId" value="LOCAL-00346" />
- <option name="project" value="LOCAL" />
- <updated>1602501505304</updated>
+ <workItem from="1605355486465" duration="15698000" />
</task>
<task id="LOCAL-00347" summary=".">
<created>1602863336459</created>
<option name="project" value="LOCAL" />
<updated>1605431702382</updated>
</task>
- <option name="localTasksCounter" value="395" />
+ <task id="LOCAL-00395" summary=".">
+ <created>1605431934015</created>
+ <option name="number" value="00395" />
+ <option name="presentableId" value="LOCAL-00395" />
+ <option name="project" value="LOCAL" />
+ <updated>1605431934015</updated>
+ </task>
+ <option name="localTasksCounter" value="396" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<screen x="0" y="0" width="1707" height="920" />
</state>
<state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
- <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605431699392">
+ <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605431931637">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1605188136787" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605431699392" />
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605431931637" />
<state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605104496549">
<screen x="0" y="0" width="2560" height="1040" />
</state>
$e = explode('.', $path);
$ext = array_pop($e);
array_push($e, 'x264');
+ if ($ext === 'avi') {
+ $ext = 'mkv';
+ }
array_push($e, $ext);
$x264path = implode('.', $e);
if ($forceReturn || file_exists($x264path)) {
foreach ($list as $item) {
+ $destext = $item->getExtension();
+ if ($destext === 'avi') {
+ $destext = 'mkv';
+ }
+
+
/** @var SplFileInfo $item */
$path = $item->getRealPath();
- $to = preg_replace('/\.' . $item->getExtension() . '$/', '.x264.' . $item->getExtension(), $path);
+ $to = preg_replace('/\.' . $item->getExtension() . '$/', '.x264.' . $destext, $path);
if (file_exists($to) && filesize($to) != 0 && videosHaveSameDuration($path, $to)) {
}
$resize = getVideoHeight($path) > 1080 ? ' 1' : ' 0';
- $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension() . ' ' . getVideoCodec($path) . $resize;
+ $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $destext . ' ' . getVideoCodec($path) . $resize;
print_r(sshCommand($cmd, 'avion'));
return;
}
$iterator = new RecursiveIteratorIterator($filtered, RecursiveIteratorIterator::CHILD_FIRST);
$toTranscode = ['hevc', 'vc1', 'xvid'];
+ $extToTranscode = ['avi'];
foreach ($iterator as $f) {
/** @var $f SplFileInfo */
$codec = getVideoCodec($path);
- if (!in_array($codec, $toTranscode)) {
+ if (!in_array($codec, $toTranscode) && !in_array($f->getExtension(), $extToTranscode)) {
continue;
}
if (preg_match('/[\&\[\]\|]/', $f->getFilename(), $matches)) {