vapoursynth: Switch from bestaudiosource to BestSource

BestSource now had its first official release, so this is possible now.
This commit is contained in:
arch1t3cht 2024-03-07 21:46:59 +01:00
parent deb0f19b1b
commit bf8bbb60d6
5 changed files with 16 additions and 16 deletions

View File

@ -308,15 +308,15 @@ def get_keyframes(filename: str, clip: vs.VideoNode, fallback: str | List[int],
def check_audio(filename: str, **kwargs: Any) -> bool: def check_audio(filename: str, **kwargs: Any) -> bool:
""" """
Checks whether the given file has an audio track by trying to open it with 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. 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_message("Checking if the file has an audio track")
progress_set_indeterminate() progress_set_indeterminate()
try: try:
ensure_plugin("bas", "BestAudioSource", "") ensure_plugin("bs", "BestSource", "")
vs.core.bas.Source(source=filename, **kwargs) vs.core.bs.AudioSource(source=filename, **kwargs)
return True return True
except AttributeError: except AttributeError:
pass pass

View File

@ -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 DestDir: {app}\csri; Source: {#DEPS_DIR}\VSFilter\x64\VSFilter.dll; Flags: ignoreversion; Components: main
; VapourSynth ; VapourSynth
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\L-SMASH-Works\libvslsmashsource.dll; Flags: ignoreversion; Components: 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}\SCXVid\libscxvid.dll; Flags: ignoreversion; Components: vapoursynth
DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\WWXD\libwwxd64.dll; Flags: ignoreversion; Components: vapoursynth DestDir: {app}\vapoursynth; Source: {#DEPS_DIR}\WWXD\libwwxd64.dll; Flags: ignoreversion; Components: vapoursynth

View File

@ -338,7 +338,7 @@
"Aegisub Cache" : true "Aegisub Cache" : true
}, },
"VapourSynth" : { "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" : { "Avisynth" : {

View File

@ -338,7 +338,7 @@
"Aegisub Cache" : true "Aegisub Cache" : true
}, },
"VapourSynth" : { "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" : { "Avisynth" : {

View File

@ -70,15 +70,15 @@ if (!(Test-Path L-SMASH-Works)) {
Remove-Item release-x86_64-cachedir-cwd.zip Remove-Item release-x86_64-cachedir-cwd.zip
} }
# bestaudiosource # BestSource
if (!(Test-Path bestaudiosource)) { if (!(Test-Path BestSource)) {
$basDir = New-Item -ItemType Directory bestaudiosource $bsDir = New-Item -ItemType Directory BestSource
Set-Location $basDir Set-Location $bsDir
$basReleases = Invoke-WebRequest "https://api.github.com/repos/vapoursynth/bestaudiosource/releases/latest" -Headers $GitHeaders -UseBasicParsing | ConvertFrom-Json $basReleases = Invoke-WebRequest "https://api.github.com/repos/vapoursynth/bestsource/releases/latest" -Headers $GitHeaders -UseBasicParsing | ConvertFrom-Json
$basUrl = $basReleases.assets[0].browser_download_url $bsUrl = $basReleases.assets[0].browser_download_url
Invoke-WebRequest $basUrl -OutFile bas-r1.7z -UseBasicParsing Invoke-WebRequest $bsUrl -OutFile bestsource.7z -UseBasicParsing
7z x bas-r1.7z 7z x bestsource.7z
Remove-Item bas-r1.7z Remove-Item bestsource.7z
Set-Location $DepsDir Set-Location $DepsDir
} }