Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @setlocal enabledelayedexpansion
- @REM Genki Shadowcast Launcher for MPV by JERisBRISK
- @set _version=1.1
- @set _arg1=%~1
- @set _arg1Start=!_arg1:~1,1!
- @if /i [!_arg1Start!]==[?] (
- call :usage
- goto :eof
- )
- @if /i [!_arg1Start!]==[h] (
- call :help
- goto :eof
- )
- @if /i [!_arg1Start!]==[f] (
- goto :fullScreen
- )
- @if /i [!_arg1Start!]==[w] (
- goto :windowed
- )
- @REM no switch passed, ask the user what they want
- @goto :userChoice
- :title
- @echo -= Genki Shadowcast Launcher for MPV =-
- @echo Version %_version% by JERisBRISK
- @goto :eof
- :usage
- @echo Usage:
- @echo %~nx0 [-f ^| -w ^| -?]
- @echo f : fullscreen mode
- @echo w : windowed mode
- @echo ? : show usage
- @echo h : show usage and dependencies
- @echo Slashes may be used instead of dashes for all switches
- @goto :eof
- :checkMpv
- @where /q mpv.exe
- @if ERRORLEVEL 1 (
- echo - mpv is missing
- echo get it at https://mpv.io and add to your PATH or place %~nx0 next to it
- exit /b 1
- ) else (
- echo + mpv is present
- exit /b 0
- )
- @goto :eof
- :checkMono
- @where /q mono-to-stereo.exe
- @if ERRORLEVEL 1 (
- echo - mono-to-stereo is missing
- echo get it at https://github.com/ToadKing/mono-to-stereo/releases and add to your PATH or place %~nx0 next to it
- echo things will sound funky until this is done
- exit /b 1
- ) else (
- echo + mono-to-stereo is present
- exit /b 0
- )
- @goto :eof
- :help
- @call :title
- @echo.
- @call :usage
- @echo.
- @echo Dependencies:
- @call :checkMpv
- @echo.
- @call :checkMono
- @goto :eof
- :userChoice
- @choice /T 7 /D N /M "Run full-screen (default is No after 7 seconds)"
- @if ERRORLEVEL 2 (
- goto :windowed
- ) else (
- goto :fullScreen
- )
- @goto :eof
- :fullScreen
- @call :checkMpv
- @if ERRORLEVEL 1 exit /b 1
- @echo Starting MPV in full screen mode
- @call :run --fs
- @goto :eof
- :windowed
- @call :checkMpv
- @if ERRORLEVEL 1 exit /b 1
- @echo Starting MPV in windowed mode
- @call :run
- @goto :eof
- :run %1
- @start /high mpv.exe av://dshow:video="ShadowCast" --profile=low-latency --untimed %1
- @call :checkMono
- @if ERRORLEVEL 1 exit /b 1
- @echo Starting Mono to Stereo
- @start "Mono to Stereo" /normal /min mono-to-stereo.exe --in-device "Digital Audio Interface (2- ShadowCast)"
- @start "Mono to Stereo" /normal /min mono-to-stereo.exe --in-device "Digital Audio Interface (ShadowCast)"
- @goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement