vapoursynth: Switch from bestaudiosource to BestSource
BestSource now had its first official release, so this is possible now.
This commit is contained in:
parent
deb0f19b1b
commit
bf8bbb60d6
5 changed files with 16 additions and 16 deletions
|
@ -308,15 +308,15 @@ def get_keyframes(filename: str, clip: vs.VideoNode, fallback: str | List[int],
|
|||
def check_audio(filename: str, **kwargs: Any) -> bool:
|
||||
"""
|
||||
Checks whether the given file has an audio track by trying to open it with
|
||||
BestAudioSource. Requires the `bas` plugin to return correct results, but
|
||||
BestSource. Requires the `bs` plugin to return correct results, but
|
||||
won't crash if it's not installed.
|
||||
Additional keyword arguments are passed on to BestAudioSource.
|
||||
Additional keyword arguments are passed on to BestSource.
|
||||
"""
|
||||
progress_set_message("Checking if the file has an audio track")
|
||||
progress_set_indeterminate()
|
||||
try:
|
||||
ensure_plugin("bas", "BestAudioSource", "")
|
||||
vs.core.bas.Source(source=filename, **kwargs)
|
||||
ensure_plugin("bs", "BestSource", "")
|
||||
vs.core.bs.AudioSource(source=filename, **kwargs)
|
||||
return True
|
||||
except AttributeError:
|
||||
pass
|
||||
|
|
|
@ -7,6 +7,6 @@ DestDir: {app}; Source: {#DEPS_DIR}\AvisynthPlus64\x64\plugins\DirectShowSource.
|
|||
DestDir: {app}\csri; Source: {#DEPS_DIR}\VSFilter\x64\VSFilter.dll; Flags: ignoreversion; Components: main
|
||||
; VapourSynth
|
||||
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\L-SMASH-Works\libvslsmashsource.dll; Flags: ignoreversion; Components: vapoursynth
|
||||
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\bestaudiosource\win64\BestAudioSource.dll; Flags: ignoreversion; Components: vapoursynth
|
||||
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\BestSource\x64\BestSource.dll; Flags: ignoreversion; Components: vapoursynth
|
||||
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\SCXVid\libscxvid.dll; Flags: ignoreversion; Components: vapoursynth
|
||||
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\WWXD\libwwxd64.dll; Flags: ignoreversion; Components: vapoursynth
|
||||
|
|
|
@ -338,7 +338,7 @@
|
|||
"Aegisub Cache" : true
|
||||
},
|
||||
"VapourSynth" : {
|
||||
"Default Script" : "# This default script will load an audio file using BestAudioSource.\n# It requires the `bas` plugin.\n\nimport vapoursynth as vs\nimport aegisub_vs as a\na.set_paths(locals())\n\na.ensure_plugin(\"bas\", \"BestAudioSource\", \"To use Aegisub's default audio loader, the `bas` plugin for VapourSynth must be installed\")\nvs.core.bas.Source(source=filename).set_output()"
|
||||
"Default Script" : "# This default script will load an audio file using BestSource.\n# It requires the `bs` plugin.\n\nimport vapoursynth as vs\nimport aegisub_vs as a\na.set_paths(locals())\n\na.ensure_plugin(\"bs\", \"BestSource\", \"To use Aegisub's default audio loader, the `bs` plugin for VapourSynth must be installed\")\nvs.core.bs.AudioSource(source=filename).set_output()"
|
||||
}
|
||||
},
|
||||
"Avisynth" : {
|
||||
|
|
|
@ -338,7 +338,7 @@
|
|||
"Aegisub Cache" : true
|
||||
},
|
||||
"VapourSynth" : {
|
||||
"Default Script" : "# This default script will load an audio file using BestAudioSource.\n# It requires the `bas` plugin.\n\nimport vapoursynth as vs\nimport aegisub_vs as a\na.set_paths(globals())\n\na.ensure_plugin(\"bas\", \"BestAudioSource\", \"To use Aegisub's default audio loader, the `bas` plugin for VapourSynth must be installed\")\nvs.core.bas.Source(source=filename).set_output()"
|
||||
"Default Script" : "# This default script will load an audio file using BestSource.\n# It requires the `bs` plugin.\n\nimport vapoursynth as vs\nimport aegisub_vs as a\na.set_paths(locals())\n\na.ensure_plugin(\"bs\", \"BestSource\", \"To use Aegisub's default audio loader, the `bs` plugin for VapourSynth must be installed\")\nvs.core.bs.AudioSource(source=filename).set_output()"
|
||||
}
|
||||
},
|
||||
"Avisynth" : {
|
||||
|
|
|
@ -70,15 +70,15 @@ if (!(Test-Path L-SMASH-Works)) {
|
|||
Remove-Item release-x86_64-cachedir-cwd.zip
|
||||
}
|
||||
|
||||
# bestaudiosource
|
||||
if (!(Test-Path bestaudiosource)) {
|
||||
$basDir = New-Item -ItemType Directory bestaudiosource
|
||||
Set-Location $basDir
|
||||
$basReleases = Invoke-WebRequest "https://api.github.com/repos/vapoursynth/bestaudiosource/releases/latest" -Headers $GitHeaders -UseBasicParsing | ConvertFrom-Json
|
||||
$basUrl = $basReleases.assets[0].browser_download_url
|
||||
Invoke-WebRequest $basUrl -OutFile bas-r1.7z -UseBasicParsing
|
||||
7z x bas-r1.7z
|
||||
Remove-Item bas-r1.7z
|
||||
# BestSource
|
||||
if (!(Test-Path BestSource)) {
|
||||
$bsDir = New-Item -ItemType Directory BestSource
|
||||
Set-Location $bsDir
|
||||
$basReleases = Invoke-WebRequest "https://api.github.com/repos/vapoursynth/bestsource/releases/latest" -Headers $GitHeaders -UseBasicParsing | ConvertFrom-Json
|
||||
$bsUrl = $basReleases.assets[0].browser_download_url
|
||||
Invoke-WebRequest $bsUrl -OutFile bestsource.7z -UseBasicParsing
|
||||
7z x bestsource.7z
|
||||
Remove-Item bestsource.7z
|
||||
Set-Location $DepsDir
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue