diff --git a/automation/vapoursynth/aegisub_vs.py b/automation/vapoursynth/aegisub_vs.py index 3e37cb91f..dc354df03 100644 --- a/automation/vapoursynth/aegisub_vs.py +++ b/automation/vapoursynth/aegisub_vs.py @@ -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 diff --git a/packages/win_installer/fragment_codecs.iss b/packages/win_installer/fragment_codecs.iss index f71f74b31..cf71a43d7 100644 --- a/packages/win_installer/fragment_codecs.iss +++ b/packages/win_installer/fragment_codecs.iss @@ -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 diff --git a/src/libresrc/default_config.json b/src/libresrc/default_config.json index f2451d7ea..a41b528a1 100644 --- a/src/libresrc/default_config.json +++ b/src/libresrc/default_config.json @@ -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" : { diff --git a/src/libresrc/osx/default_config.json b/src/libresrc/osx/default_config.json index 8a43c5423..2850fdd38 100644 --- a/src/libresrc/osx/default_config.json +++ b/src/libresrc/osx/default_config.json @@ -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" : { diff --git a/tools/win-installer-setup.ps1 b/tools/win-installer-setup.ps1 index d1a7b0987..1f52c409c 100644 --- a/tools/win-installer-setup.ps1 +++ b/tools/win-installer-setup.ps1 @@ -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 }