So geht's:
- Folgenden Quellcode in einer Datei mit dem Namen record.bat speichern
@echo off
SET STATION=%1
SET FILENAME=%2
SET KILLTIME=%3
SET VLCPATH="C:\Program Files (x86)\VideoLan\VLC\"
SET DSTPATH=C:\Users\Benutzername\Desktop\
IF %STATION%==ARDHD SET IP=239.35.10.1
IF %STATION%==ZDFHD SET IP=239.35.10.2
IF %STATION%==ARTEHD SET IP=239.35.10.3
IF %STATION%==ARD SET IP=239.35.129.11
IF %STATION%==ZDF SET IP=239.35.86.11
IF %STATION%==ZDFneo SET IP=239.35.150.11
IF %STATION%==KiKa SET IP=239.35.205.12
IF %STATION%==3sat SET IP=239.35.140.11
IF %STATION%==Arte SET IP=239.35.4.11
echo Starting to Record %STATION% (%IP%) for %KILLTIME% seconds
cd %DSTPATH%
tasklist /V>pre_pidlist.txt
cd %VLCPATH%
start vlc rtp://@%IP%:10000 --sout "#duplicate{dst=std{access=file,mux=ts,dst=%DSTPATH%\%FILENAME%.ts}}" --sout-all
cd %DSTPATH%
tasklist /V>post_pidlist.txt
for /F "tokens=2 delims= " %%a in ('fc %DSTPATH%\pre_pidlist.txt %DSTPATH%\post_pidlist.txt^|find "vlc.exe"') do set PID=%%a
del %DSTPATH%\pre_pidlist.txt
del %DSTPATH%\post_pidlist.txt
waitfor vlc /T %KILLTIME%
TASKKILL /PID %PID%
echo Recording successfully saved: %DSTPATH%\%FILENAME%.ts
pause
Viel Spaß beim aufnehmen!