New upstream ffmpeg version 4.2.1 on windows

This commit is contained in:
Nyanmisaka 2020-01-16 17:57:19 +08:00 committed by GitHub
parent ac0b30285e
commit e92e105c42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,8 @@ function Build-JellyFin {
function Install-FFMPEG { function Install-FFMPEG {
param( param(
[string]$ResolvedInstallLocation, [string]$ResolvedInstallLocation,
[string]$Architecture [string]$Architecture,
[string]$FFMPEGVersionX86 = "ffmpeg-4.2.1-win32-shared",
) )
Write-Verbose "Checking Architecture" Write-Verbose "Checking Architecture"
if($Architecture -notin @('x86','x64')){ if($Architecture -notin @('x86','x64')){
@ -55,7 +56,7 @@ function Install-FFMPEG {
Invoke-WebRequest -Uri https://repo.jellyfin.org/releases/server/windows/ffmpeg/jellyfin-ffmpeg.zip -UseBasicParsing -OutFile "$tempdir/ffmpeg.zip" | Write-Verbose Invoke-WebRequest -Uri https://repo.jellyfin.org/releases/server/windows/ffmpeg/jellyfin-ffmpeg.zip -UseBasicParsing -OutFile "$tempdir/ffmpeg.zip" | Write-Verbose
}else{ }else{
Write-Verbose "Downloading 32 bit FFMPEG" Write-Verbose "Downloading 32 bit FFMPEG"
Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-4.0.2-win32-shared.zip -UseBasicParsing -OutFile "$tempdir/ffmpeg.zip" | Write-Verbose Invoke-WebRequest -Uri https://ffmpeg.zeranoe.com/builds/win32/shared/$FFMPEGVersionX86.zip -UseBasicParsing -OutFile "$tempdir/ffmpeg.zip" | Write-Verbose
} }
Expand-Archive "$tempdir/ffmpeg.zip" -DestinationPath "$tempdir/ffmpeg/" -Force | Write-Verbose Expand-Archive "$tempdir/ffmpeg.zip" -DestinationPath "$tempdir/ffmpeg/" -Force | Write-Verbose
@ -66,7 +67,7 @@ function Install-FFMPEG {
} }
}else{ }else{
Write-Verbose "Copying Binaries to Jellyfin location" Write-Verbose "Copying Binaries to Jellyfin location"
Get-ChildItem "$tempdir/ffmpeg/ffmpeg-4.0.2-win32-shared/bin" | ForEach-Object { Get-ChildItem "$tempdir/ffmpeg/$FFMPEGVersionX86/bin" | ForEach-Object {
Copy-Item $_.FullName -Destination $installLocation | Write-Verbose Copy-Item $_.FullName -Destination $installLocation | Write-Verbose
} }
} }