Had to deal with this for several hours today, so thought I'd share the script that worked for me:
Code: Select all
@echo off
start "" "C:\Program Files\VideoLAN\VLC\vlc.exe" "https://vdn.terrafox.com/live/downtown-silver.stream/playlist.m3u8" :sout=#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100,scode=none}:file{dst=C:\\Users\\Alex\\Videos\\silver.mp4,no-overwrite} :no-sout-all :sout-keep --stop-time=26400 vlc://quit
Only occurred to me after a long struggle why the stream would not start and why I was ending up with empty mp4 files. I was connecting to a file/stream that was already playing (it's a m3u8 file format, which is a pointer to an internet stream), but was trying to connect to it from the beginning (in the past), not having a --start-time value. You can only connect to it from the current time and the stop time (in seconds) should be in the future, counting from the beginning of the file. I discovered this after just deciding to play the stream in the player (instead of streaming) and seeing that the starting time was not 0:00:00.