change to whatever your chromecast device ip is.
--sout-chromecast-ip=192.168.1.101
windows batch cmd
play.bat
Code: Select all
@echo off
setlocal
:get_url
echo Please paste the remote URL of the MKV file and press Enter:
set /p "remote_url="
if "%remote_url%"=="" (
echo URL cannot be empty. Please try again.
goto get_url
)
:transcoder
echo Starting transcoder...
set "vlc_path=%PROGRAMFILES%\VideoLAN\VLC\vlc.exe"
start "" "%vlc_path%" "%remote_url%" :sout=#transcode{vcodec=mp2v,vb=10800,scale=Auto,soverlay}:http{mux=ts,dst=:8080/play} :no-sout-all :sout-keep
echo.
echo Waiting 30 seconds for transcoder to start...
timeout /t 30 /nobreak > nul
:streaming
echo Starting streaming...
set "vlc_path=%PROGRAMFILES%\VideoLAN\VLC\vlc.exe"
start "" "%vlc_path%" "http://localhost:8080/play" --sout "#chromecast" --sout-chromecast-ip=192.168.1.101
echo.
echo Transcoder and streaming have been started using URL: %remote_url%
pause
endlocal