On Windows I ended killing the process by window title which is set with "--meta-title" in vlc. SET metatitle={your task title} SET source={your source} SET output={your output file} SET runtime = {needed length of recording in seconds} echo %metatitle% start "%metatitle%" "...