<component name="ChangeListManager">
<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/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.php" 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/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1581498312758" duration="1364000" />
<workItem from="1581536987017" duration="2548000" />
<workItem from="1581869390232" duration="1823000" />
- <workItem from="1581934013298" duration="383000" />
- </task>
- <task id="LOCAL-00250" summary=".">
- <created>1575617712737</created>
- <option name="number" value="00250" />
- <option name="presentableId" value="LOCAL-00250" />
- <option name="project" value="LOCAL" />
- <updated>1575617712738</updated>
+ <workItem from="1581934013298" duration="465000" />
+ <workItem from="1581949971467" duration="933000" />
</task>
<task id="LOCAL-00251" summary=".">
<created>1575647196441</created>
<option name="project" value="LOCAL" />
<updated>1581499773377</updated>
</task>
- <option name="localTasksCounter" value="299" />
+ <task id="LOCAL-00299" summary=".">
+ <created>1581934414894</created>
+ <option name="number" value="00299" />
+ <option name="presentableId" value="LOCAL-00299" />
+ <option name="project" value="LOCAL" />
+ <updated>1581934414894</updated>
+ </task>
+ <option name="localTasksCounter" value="300" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
</state>
<state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
<state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1580459136096" />
- <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1581499753412">
+ <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1581934408178">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
<state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1581445251228" />
- <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1581499753412" />
+ <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1581934408178" />
<state x="92" y="92" width="2376" height="856" key="DiffContextDialog" timestamp="1580377344165">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1580377827629" />
- <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1581934020071">
- <screen x="0" y="0" width="2560" height="1040" />
+ <state x="732" y="383" key="com.intellij.ide.util.TipDialog" timestamp="1581949979290">
+ <screen x="0" y="0" width="1920" height="1160" />
</state>
<state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
- <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1581444247619" />
+ <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1581949979290" />
<state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1581934020071" />
<state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1581412193715">
<screen x="0" y="0" width="2560" height="1040" />
sleep(15);
}
- $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension() . ' ' . getVideoCodec($path);
+ $resize = getVideoHeight($path) > 1080 ? ' 1' : ' 0';
+ $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension() . ' ' . getVideoCodec($path) . $resize;
print_r(sshCommand($cmd, 'avion'));
return;
}
setState($cacheKey, $res);
}
return $res;
+}
+
+function getVideoHeight($path)
+{
+ $cacheKey = 'height_2_' . md5($path . '-' . filemtime($path));
+ $res = getState($cacheKey, null);
+ if (null === $res) {
+ $res = `ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=nw=1:nk=1 $path`;
+ $res = trim($res);
+ setState($cacheKey, $res);
+ }
+ return (int)$res;
}
\ No newline at end of file