Created
June 8, 2020 07:24
-
-
Save HeyBanditoz/e85aa647574bb3883fa97f49f08cc359 to your computer and use it in GitHub Desktop.
Revisions
-
HeyBanditoz created this gist
Jun 8, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ param ( [string]$fps = "30", [Parameter(Mandatory=$true)][string]$File, [Parameter(Mandatory=$true)][string]$Start, [Parameter(Mandatory=$true)][string]$Duration ) $Size = 7.5*8000 $Bitrate=$Size/$duration write-output "$fps fps, $duration duration, $Bitrate bitrate." ffmpeg -hide_banner -loglevel info -an -ss $Start -t $Duration -y -i $File -c:v libvpx-vp9 -b:v ${BITRATE}k -pass 1 -row-mt 1 -r $FPS -f webm - > $null Invoke-Expression "ffmpeg -hide_banner -loglevel info -ss $Start -t $Duration -i $File -c:v libvpx-vp9 -b:v ${BITRATE}k -c:a libopus -b:a 128k -pass 2 -row-mt 1 -r $FPS -f webm ${File}.webm"