Quote from: jalman on April 11, 2019, 07:17:45 PMOh, I made a batch file that can Buzzr with a timestamp added so I don't worry about overwriting. While my file uses Streamlink, ffmpeg is incredibly versatile.Timestamp for Windows batch. Add %dtStamp% to the filename somewhere to get the timestamp.QuoteSET HOUR=%time:~0,2%SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%%time:~6,2%SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)Awesome -- this was also super helpful. I stuck this ahead of the ffmpeg line in the batch file, and then changed the file name to Buzzr_%dtStamp%.mp4, works like a charm.I am having a weird issue with the batch file and Task Scheduler. No issues setting up the task, no issues when I manually kick off the task in Scheduler. When Scheduler kicks it off , I see the window open and start but within 3-5 seconds it shuts down, no file generated. My first instinct was that it's a write permission issue, but I've given full access to all users to the folder at every level up to root, and the batch file. I also tried toggling between 'Run When User is Logged in' and 'Run when User is or is not Logged in', selected 'Run with highest priviledges', tried different configuration profiles. Same result - when kicked off manually, or immediately in Task Scheduler, it works perfectly, when scheduled it kicks off but stops after 2 seconds.
Oh, I made a batch file that can Buzzr with a timestamp added so I don't worry about overwriting. While my file uses Streamlink, ffmpeg is incredibly versatile.Timestamp for Windows batch. Add %dtStamp% to the filename somewhere to get the timestamp.QuoteSET HOUR=%time:~0,2%SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%%time:~6,2%SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
SET HOUR=%time:~0,2%SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%%time:~6,2%SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
Thanks everyone. The Windows solutions look great and ingenious. Unfortunately, the main computer in my home is my iMac. I do think I have an old Windows box laying around somewhere, this will give me reason to fire that up...
All of this should work on a Mac as well, in roughly the same way: install FFMpeg (it exists for the Mac), set up the script / batch file, schedule tasks. The devil will just be in the details of how those things are done on a Mac as opposed to Windows.
#!/bin/bashffmpeg -re -i https://buzzr.global.ssl.fastly.net/out/u/buzzr_hls_4.m3u8 -ss 00:00:00.0 -t 01:04:00.0 -c:v copy -c:a copy Buzzr-$(date '+%Y%m%d_%H%M%S').mp4 -y
The scripting is fairly straightforward for Mac (and probably also Linux) folks:Quote#!/bin/bashffmpeg -re -i https://buzzr.global.ssl.fastly.net/out/u/buzzr_hls_4.m3u8 -ss 00:00:00.0 -t 01:04:00.0 -c:v copy -c:a copy Buzzr-$(date '+%Y%m%d_%H%M%S').mp4 -yJust save that to a file, chmod 700 it, and run it from your Terminal.
Possible dumb question
Have you checked the spacing in your script? -i designates the input file. It's not seeing the '-' and doesn't know what to do with just 'i'
The file should drop to the same directory as the batch file unless you get fancy and specify another file path in the script.
How frequently does Buzzr miss timing cues? I had the stream set up 90 sec early for Password Plus and the file was missing the first 1 minute. By the time they got to CS they were back on the half hour again.