Page 1 of 1

Adding Date To File Name In Sout Capture of Radio Stream

Posted: 23 Jun 2021 17:27
by kewa
Hi

I run the following from a batch file which when finished will be launched by Windows Task Scheduler

Code: Select all

@echo off start "" "C:\Program Files\VideoLAN\VLC\vlc.exe" http://stream.blahblahorg.uk:8001/stream?type=.mp3 :sout=#transcode{mux=raw}:file{dst=C:\\Users\\Kewa\\Radio\\HRS.mp3,no-overwrite} :no-sout-all :sout-keep --stop-time=20 vlc://quit
The code above works fine in that it starts VLC opens and saves a 20 second clip of the stream to my Radio folder

I want to make the output file name date specific - that is with the file saved date eg HRS 2021-06-23 and I've tried various ideas from this and other forums - mostly in much older versions of VLC - like %YY%MM%DD but they either stop the script running altogether or the file is saved with no date but the actual text HRS %YY%MM%DD

My skills here are very limited but clearly I don't understand the syntax well enough. I'd appreciate some ideas as to how to make this work and also how I could amend the code to have this run in the background perhaps using -quiet

Many thanks

Kewa