{"id":317103,"date":"2021-01-28T15:01:39","date_gmt":"2021-01-28T15:01:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317103"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317103","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u044e\u0437\u0430\u0431\u0435\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0434\u043b\u044f FFMPEG \u043d\u0430 Powershell"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ag\/tp\/0l\/agtp0l58br2jr7f0nqvycip2uuo.png\"><br \/>  <i><font color=\"#999999\">\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0434\u043b\u044f ffmpeg<\/font><\/i><\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0432\u044b, \u043a\u0430\u043a \u0438 \u044f, \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e ffmpeg, \u043d\u043e \u0431\u043e\u044f\u043b\u0438\u0441\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0420\u0435\u0441\u043f\u0435\u043a\u0442 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u043d\u044f\u043c, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 C ( \u0441\u0438, \u0431\u0435\u0437 # \u0438 ++ ).<\/p>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0443\u0436\u0430\u0441\u043d\u044b\u0439, \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u0432\u0435\u0440\u0431\u043e\u0443\u0437, \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u044b, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u043d\u0435\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0432\u043a\u0443\u043f\u0435 \u0441 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u0443 \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e\u0439.<\/p>\n<p>  \u042f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 ffmpeg, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0441\u0442\u044b\u0434\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 PowershellGallery.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0414\u0435\u043b\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0434 \u043f\u0430\u0439\u043f<\/font><\/h2>\n<p>  <\/p>\n<pre><code class=\"powershell\">class VideoFile {     $InputFileLiteralPath     $OutFileLiteralPath     $Arguments } <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. FFmpeg \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f, \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u044d\u0442\u043e \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e, \u0441 \u0447\u0435\u043c \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0438 \u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u0441\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c. <\/p>\n<h3><font color=\"#3AC1EF\">Begin, process, end<\/font><\/h3>\n<p>  \u0412 Begin \u0431\u043b\u043e\u043a\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0438\u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u0445\u043e\u0434\u0443 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0432 Begin \u0431\u043b\u043e\u043a\u0435 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0443\u043b\u0438.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a\u0438, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0414\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Begin-Process \u043a\u0430\u043a \u043e foreach, \u0433\u0434\u0435 begin \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0430 End \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u0441\u043b\u0435 foreach.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Begin, Process, End \u043d\u0435 \u0431\u044b\u043b\u043e. \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043b\u043e\u0445\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e.<\/p>\n<pre><code class=\"powershell\"># \u044d\u0442\u043e begin $InputColection = Get-ChildItem -Path C:\\file.txt   function Invoke-FunctionName {     param (         $i     )     # \u044d\u0442\u043e process     $InputColection | ForEach-Object {         $buffer = $_ | ConvertTo-Json      }          # \u044d\u0442\u043e end     return $buffer }   Invoke-FunctionName -i $InputColection<\/code><\/pre>\n<p>  <\/p>\n<h4><font color=\"#3AC1EF\">\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043a\u043b\u0430\u0441\u0442\u044c \u0432 Begin \u0431\u043b\u043e\u043a? <\/font><\/h4>\n<p>  \u0421\u0447\u0435\u0442\u0447\u0438\u043a\u0438, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0443\u0442\u0438 \u0434\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 Begin \u0431\u043b\u043e\u043a \u0443 \u043c\u0435\u043d\u044f:<\/p>\n<pre><code class=\"powershell\"> begin {         $PathToModule = Split-Path (Get-Module -ListAvailable ConvertTo-MP4).Path         $FfmpegPath = Join-Path (Split-Path $PathToModule) &quot;ffmpeg&quot;         $Exec = (Join-Path -Path $FfmpegPath -ChildPath &quot;ffmpeg.exe&quot;)         $OutputArray = @()           $yesToAll = $false         $noToAll = $false           $Location = Get-Location     }<\/code><\/pre>\n<p>  \u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043b\u0430\u0439\u0444\u0445\u0430\u043a: <\/p>\n<pre><code class=\"powershell\">$PathToModule = Split-Path (Get-Module -ListAvailable ConvertTo-MP4).Path<\/code><\/pre>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Get-Module \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0430\u043f\u043a\u0438 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c, \u0430 Split-Path \u0431\u0435\u0440\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u043f\u043a\u0443 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043d\u0438\u0436\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0430\u043f\u043a\u043e\u0439 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u043d\u043e \u043d\u0435 \u0432 \u0441\u0430\u043c\u043e\u0439 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435. <\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"powershell\">PSffmpeg\/ \u251c\u2500\u2500 ConvertTo-MP4\/ \u2502   \u251c\u2500\u2500 ConvertTo-MP4.psm1 \u2502   \u251c\u2500\u2500 ConvertTo-MP4.psd1 \u2502   \u251c\u2500\u2500 Readme.md \u2514\u2500\u2500 ffmpeg\/     \u251c\u2500\u2500 ffmpeg.exe     \u251c\u2500\u2500 ffplay.exe     \u2514\u2500\u2500 ffprobe.exe <\/code><\/pre>\n<p>   \u0410 \u0435\u0449\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Split-Path \u043c\u043e\u0436\u043d\u043e \u0441\u043e \u0441\u0442\u0438\u043b\u0435\u043c \u0441\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043d\u0438\u0436\u0435. <\/p>\n<pre><code class=\"powershell\">Set-Location ( Get-Location | Split-Path )<\/code><\/pre>\n<p>  <\/p>\n<h4><font color=\"#3AC1EF\">\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 Param \u0431\u043b\u043e\u043a?<\/font><\/h4>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 Begin \u0438\u0434\u0435\u0442 Process \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Param \u0431\u043b\u043e\u043a\u043e\u043c. Param \u0431\u043b\u043e\u043a \u0441\u0430\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 null \u0447\u0435\u043a\u0438, \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443:<\/p>\n<p>  <b>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443:<\/b><\/p>\n<pre><code class=\"powershell\">[ValidateSet(&quot;libx264&quot;, &quot;libx265&quot;)] $Encoder<\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f False, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <b>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443:<\/b><\/p>\n<pre><code class=\"powershell\">[ValidateRange(0, 51)] [UInt16]$Quality = 21<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443, \u0443\u043a\u0430\u0437\u0430\u0432 \u0446\u0438\u0444\u0440\u044b \u043e\u0442 \u0438 \u0434\u043e. Crf \u0443 ffmpeg \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u043e\u0442 0 \u0434\u043e 51, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d \u0442\u0430\u043a\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d.<\/p>\n<p>  <b>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0443:<\/b><\/p>\n<pre><code class=\"powershell\">[ValidateScript( { $_ -match &quot;(?:(?:([01]?\\d|2[0-3]):)?([0-5]?\\d):)?([0-5]?\\d)&quot; })] [timespan]$TrimStart<\/code><\/pre>\n<p>  \u0421\u043b\u043e\u0436\u043d\u044b\u0439 \u0438\u043d\u043f\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0430\u043c\u0438 \u0438\u043b\u0438 \u0446\u0435\u043b\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b true \u0438\u043b\u0438 false.<\/p>\n<h4><font color=\"#3AC1EF\">SupportsShouldProcess \u0438 force<\/font><\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0430\u0447\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043e\u0434\u0435\u043a\u043e\u043c, \u043d\u043e \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 ffmpeg \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c y\/N, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0430\u0439\u043b. \u0418 \u0442\u0430\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 Yes to all, Yes, No, No to all. <\/p>\n<p>  \u0412\u044b\u0431\u0440\u0430\u043b \u201cYes to all\u201d \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438 ffmpeg \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c, \u0445\u043e\u0447\u0435\u0448\u044c \u0442\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043e\u0442 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<pre><code class=\"powershell\">function ConvertTo-WEBM {     [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'high')]     param ( \t #\u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438   \t[switch]$Force      )<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u043b\u044b\u0439 Param \u0431\u043b\u043e\u043a \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SupportsShouldProcess \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0430 \u0441\u0432\u0438\u0442\u0447 force \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. <\/p>\n<p>  # \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 Force, \u0442\u043e \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u043b\u0447\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f <br \/>  if ($Force) {<br \/>   $continue = $true<br \/>   $yesToAll = $true<br \/>  }<\/p>\n<pre><code class=\"powershell\">$Verb = &quot;Overwrite file: &quot; + $Arguments.OutFileLiteralPath # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 \u0441\u043b\u0443\u043a\u0447\u0430\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 ShouldContinue      # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043b\u0438 \u043c\u044b \u0444\u0430\u0439\u043b. if (Test-Path $Arguments.OutFileLiteralPath) {     #\u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0432\u043e\u0442 \u0432\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d, \u0441\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043b\u0438 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u043b\u0438 \u043d\u0435\u0442     $continue = $PSCmdlet.ShouldContinue($OutFileLiteralPath, $Verb, [ref]$yesToAll, [ref]$noToAll)              #\u0415\u0441\u043b\u0438 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u0410 - \u0414\u0430, \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u0442\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u0444\u0430\u043a\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442     if ($continue) {         Start-Process $Exec -ArgumentList $Arguments.Arguments -NoNewWindow -Wait                      }     #\u0415\u0441\u043b\u0438 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u041d\u0435\u0442 - \u0422\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430     else {         break     } } # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0432\u0443\u0435\u0442, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 else {     Start-Process $Exec -ArgumentList $Arguments.Arguments -NoNewWindow -Wait      }<\/code><\/pre>\n<h3><font color=\"#3AC1EF\">\u0414\u0435\u043b\u0430\u0435\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0439\u043f<\/font><\/h3>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0439\u043f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"powershell\">function New-FfmpegArgs {             $VideoFile = $InputObject             | Join-InputFileLiterallPath              | Join-Preset -Preset $Preset             | Join-ConstantRateFactor -ConstantRateFactor $Quality             | Join-VideoScale -Height $Height -Width $Width             | Join-Loglevel -VerboseEnabled $PSCmdlet.MyInvocation.BoundParameters[&quot;Verbose&quot;]             | Join-Trim -TrimStart $TrimStart -TrimEnd $TrimEnd -FfmpegPath &quot;C:\\Users\\nneeo\\Documents\\lib.Scripts\\PSffmpeg\\ConvertTo-WEBM\\ffmpeg\\&quot; -SourceVideoPath ([IO.Path]::GetFullPath($InputObject))             | Join-Codec -Encoder $Encoder -FfmpegPath &quot;C:\\Users\\nneeo\\Documents\\lib.Scripts\\PSffmpeg\\ConvertTo-WEBM\\ffmpeg\\&quot; -SourceVideoPath ([IO.Path]::GetFullPath($InputObject))             | Join-OutFileLiterallPath -OutFileLiteralPath $OutFileLiteralPath -SourceVideoPath ([IO.Path]::GetFullPath($InputObject))               return $VideoFile         } <\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0436\u0430\u0441\u043d\u043e, \u0432\u0441\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043b\u0430\u043f\u0448\u0443, \u043d\u0435\u0443\u0436\u0435\u043b\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0447\u0438\u0449\u0435? <br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"powershell\">function Invoke-FunctionName  {     $ParentVar = &quot;Hello&quot;     function Invoke-NetstedFunctionName {         Write-Host $ParentVar     }     Invoke-NetstedFunctionName } <\/code><\/pre>\n<p>  \u041d\u043e \u0432 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0432 \u043a\u0430\u0436\u0434\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 ConvertTo-Mp4, ConvertTo-Webp \u0438 \u0442.\u043f. \u043b\u0435\u0433\u0447\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043b \u044f.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"powershell\">$VideoFile = $InputObject | Join-InputFileLiterallPath  | Join-Preset  | Join-ConstantRateFactor  | Join-VideoScale  | Join-Loglevel  | Join-Trim  | Join-Codec  | Join-OutFileLiterallPath <\/code><\/pre>\n<p>  \u041d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430.<\/p>\n<h3><font color=\"#3AC1EF\">\u0414\u0435\u043b\u0430\u0435\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/font><\/h3>\n<p>  \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f ffmpeg.exe, \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430. \u041a\u0430\u043a \u0436\u0435 \u044f \u043b\u044e\u0431\u043b\u044e \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b! <\/p>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0438\u043b\u0438 \u0441\u0442\u0440\u0438\u043d\u0433\u0431\u0438\u043b\u0434\u0435\u0440\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0439\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443. \u0421\u0430\u043c \u043f\u0430\u0439\u043f \u0432\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430:<\/p>\n<p>  <b>1. Measure-VideoResolution<\/b><\/p>\n<pre><code class=\"powershell\">function Measure-VideoResolution {     param (         $SourceVideoPath,         $FfmpegPath     )     Set-Location $FfmpegPath        .\\ffprobe.exe -v error -select_streams v:0 -show_entries stream=height -of csv=s=x:p=0 $SourceVideoPath | ForEach-Object {         return $_     } }<\/code><\/pre>\n<p>  h265 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0431\u0438\u0442\u0440\u0435\u0439\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 1080 \u0438 \u0432\u044b\u0448\u0435, \u043f\u0440\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e \u043e\u043d \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0438\u0434\u0435\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c h265 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u0430.<br \/>  Return \u0432 Foreach-Object \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e. \u041d\u043e \u0442\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0435\u043b\u0430\u0435\u0448\u044c. FFmpeg \u043f\u0438\u0448\u0435\u0442 \u0432\u0441\u0435 \u0432 stdout \u0438 \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0446\u0435\u043f\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u0442\u0440\u044e\u043a, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438\u0437 stdout. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Start-Process, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c stdout \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u044f\u043c\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>  \u0412\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c stdout \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u041d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043e\u0442\u0442\u0443\u0434\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0432 Begin \u0431\u043b\u043e\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043f\u0443\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre><code class=\"powershell\">  begin {         $Location = Get-Location     }<\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0430\u0441\u044c \u0431\u044b \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442, \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0431\u044b, \u043d\u043e \u044d\u0442\u043e \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.<\/p>\n<p>  <b>2. Join-VideoScale<\/b><\/p>\n<pre><code class=\"powershell\">function Join-VideoScale {     param(         [Parameter(Mandatory = $true,             ValueFromPipeline = $true,             ValueFromPipelineByPropertyName = $true)]         [ValidateNotNullOrEmpty()]         [SupportsWildcards()]         [psobject]$InputObject,         $Height,         $Width     )       switch ($true) {         ($null -eq $Height -and $null -eq $Width) {             return $InputObject         }         ($null -ne $Height -and $null -ne $Width) {             $InputObject.Arguments += &quot; -vf scale=&quot; + $Width + &quot;:&quot; + $Height             return $InputObject         }         ($null -ne $Height) {              $InputObject.Arguments += &quot; -vf scale=&quot; + $Height + &quot;:-2&quot;              return $InputObject          }         ($null -ne $Width) {              $InputObject.Arguments += &quot; -vf scale=&quot; + &quot;-2:&quot; + $Width              return $InputObject          }     } } <\/code><\/pre>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0440\u0438\u043a\u043e\u043b\u043e\u0432 \u2014 \u0432\u044b\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u043d\u0430\u0438\u0437\u043d\u0430\u043d\u043a\u0443 switch. \u041f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u0430\u0442\u0447\u0438\u043d\u0433\u0430 \u0432 Powershell \u043d\u0435\u0442, \u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u0435\u0433\u043e, \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438.<br \/>  \u0412 \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0418 \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0432\u0435\u043d \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u0432 \u0441\u0432\u0438\u0442\u0447\u0435, \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0431\u043b\u043e\u043a \u0432 \u043d\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <b>3. Join-Trim<\/b><\/p>\n<pre><code class=\"powershell\">function Join-Trim {     param(         [Parameter(Mandatory = $true,             ValueFromPipeline = $true,             ValueFromPipelineByPropertyName = $true)]         [ValidateNotNullOrEmpty()]         [SupportsWildcards()]         [psobject]$InputObject,         $TrimStart,         $TrimEnd,         $FfmpegPath,         $SourceVideoPath     )     if ($null -ne $TrimStart) {         $TrimStart = [timespan]::Parse($TrimStart)     }     if ($null -ne $TrimEnd) {         $TrimEnd = [timespan]::Parse($TrimEnd)     }          if ($TrimStart -gt $TrimEnd -and $null -ne $TrimEnd) {         Write-Error &quot;TrimStart can not be equal to TrimEnd&quot; -Category InvalidArgument         break     }     if ($TrimStart -ge $TrimEnd -and $null -ne $TrimEnd) {         Write-Error &quot;TrimStart can not be greater than TrimEnd&quot; -Category InvalidArgument         break     }     $ActualVideoLenght = Measure-VideoLenght -SourceVideoPath $SourceVideoPath -FfmpegPath $FfmpegPath         if ($TrimStart -gt $ActualVideoLenght) {         Write-Error &quot;TrimStart can not be greater than video lenght&quot; -Category InvalidArgument         break     }       if ($TrimEnd -gt $ActualVideoLenght) {         Write-Error &quot;TrimEnd can not be greater than video lenght&quot; -Category InvalidArgument         break     }       switch ($true) {         ($null -eq $TrimStart -and $null -eq $TrimEnd) {             return $InputObject         }         ($null -ne $TrimStart -and $null -ne $TrimEnd) {                          $ss = &quot; -ss &quot; + (&quot;{0:hh\\:mm\\:ss}&quot; -f $TrimStart)             $to = &quot; -to &quot; + (&quot;{0:hh\\:mm\\:ss}&quot; -f $TrimEnd)             $InputObject.Arguments += $ss + $to             return $InputObject          }         ($null -ne $TrimStart) {              $ss = &quot; -ss &quot; + (&quot;{0:hh\\:mm\\:ss}&quot; -f $TrimStart)             $InputObject.Arguments += $ss             return $InputObject         }         ($null -ne $TrimEnd) {              $to = &quot; -to &quot; + (&quot;{0:hh\\:mm\\:ss}&quot; -f $TrimEnd)             $InputObject.Arguments += $to             return $InputObject         }     } }<\/code><\/pre>\n<p>  \u0421\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0442\u044c \u043a\u043e\u0434.<br \/>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 \u043f\u0443\u0442\u0438 \u0434\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h3><font color=\"#3AC1EF\">\u0412\u044b\u0432\u043e\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/font><\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b, \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c InputObject \u0432\u0437\u044f\u0442\u044b\u0439 \u0438\u0437 Get-ChildItem, \u043d\u043e \u043f\u043e\u043b\u0435 Name \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435\u043b\u044c\u0437\u044f. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u044b\u043b \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Get-Chilitem \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e. <\/p>\n<p>  <b>1. \u0412 Begin \u0431\u043b\u043e\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432<\/b><\/p>\n<pre><code class=\"powershell\">begin {         $OutputArray = @() }<\/code><\/pre>\n<p>  <b>2. \u0412 Process \u0431\u043b\u043e\u043a\u0435 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b:<\/b><\/p>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e null \u0447\u0435\u043a\u0438, \u0434\u0430\u0436\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b.<\/p>\n<pre><code class=\"powershell\">process {         if (Test-Path $Arguments.OutFileLiteralPath) {       $OutputArray += Get-Item -Path $Arguments.OutFileLiteralPath   } }<\/code><\/pre>\n<p>  <b>3. \u0412 End \u0431\u043b\u043e\u043a\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432<\/b><\/p>\n<pre><code class=\"powershell\">end {         return $OutputArray     }<\/code><\/pre>\n<p>  \u0423\u0440\u0430, \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 end \u0431\u043b\u043e\u043a, \u043f\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<h2><font color=\"#3AC1EF\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442<\/font><\/h2>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 \u21161 <\/b><\/p>\n<p>  \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0430\u043f\u043a\u0435, \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 mp4 \u0438 \u0442\u0443\u0442 \u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0434\u0438\u0441\u043a.<\/p>\n<pre><code class=\"powershell\">Get-ChildItem | ConvertTo-MP4 -Width 320 -Preset Veryslow | Copy-Item \u2013Destination '\\\\local.smb.server\\videofiles'<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 \u21162 <\/b><\/p>\n<p>  \u041f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0435\u043e \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435, \u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c.<\/p>\n<pre><code class=\"powershell\">ConvertTo-MP4 -Path  &quot;C:\\Users\\Administrator\\Videos\\Escape From Tarkov\\&quot; | Remove-Item -Exclude $_<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 \u21163<\/b><\/p>\n<p>  \u041a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u043f\u043a\u0443.<\/p>\n<pre><code class=\"powershell\">Get-ChildItem | ConvertTo-WEBM | Move-Item -Destination D:\\OtherFolder<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0444\u0438\u043a\u0441\u0438\u043b\u0438 ffmpeg, \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043d\u0435 \u0443\u043f\u0443\u0441\u0442\u0438\u043b\u0438. \u041d\u043e \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, ffmpeg \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438?<br \/>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0434\u0430.<br \/>  \u041d\u043e \u0432\u043f\u0435\u0440\u0435\u0434\u0438 \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u044b \u043a\u0430\u043a Measure-videoLenght, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432 \u0432\u0438\u0434\u0435 Timespan, \u0441 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0439\u043f \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435.<br \/>  \u0415\u0449\u0435, \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ConvertTo-Webp \u0438 \u0432\u0441\u0435 \u0432 \u044d\u0442\u043e\u043c \u0434\u0443\u0445\u0435. \u041d\u0443\u0436\u043d\u043e \u0431\u044b \u0435\u0449\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e. \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c. <\/p>\n<p>  \u041d\u0443 \u0430 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0442\u0430\u043a, \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043d\u0430 <a href=\"https:\/\/github.com\/nneeoo\/PSffmpeg\">\u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=machehin&amp;utm_content=usable-obolochka-powershell#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/539720\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/539720\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ag\/tp\/0l\/agtp0l58br2jr7f0nqvycip2uuo.png\"><br \/>  <i><font color=\"#999999\">\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0434\u043b\u044f ffmpeg<\/font><\/i><\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0432\u044b, \u043a\u0430\u043a \u0438 \u044f, \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e ffmpeg, \u043d\u043e \u0431\u043e\u044f\u043b\u0438\u0441\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0420\u0435\u0441\u043f\u0435\u043a\u0442 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u043d\u044f\u043c, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 C ( \u0441\u0438, \u0431\u0435\u0437 # \u0438 ++ ).<\/p>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0443\u0436\u0430\u0441\u043d\u044b\u0439, \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u0432\u0435\u0440\u0431\u043e\u0443\u0437, \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u044b, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u043d\u0435\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0432\u043a\u0443\u043f\u0435 \u0441 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u0443 \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e\u0439.<\/p>\n<p>  \u042f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 ffmpeg, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0441\u0442\u044b\u0434\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 PowershellGallery.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-317103","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=317103"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317103\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}