<-Back

Schedule Stream Recordings in Windows

I do my stream recording using cron in Linux, so leave me a message here if you run into any issues or if part of this guide could be more clear. Also, there are programs available that can be used to schedule stream recordings if this process seems too complicated.

  1. Install ffmpeg

  2. Ffmpeg is available here. There wasn't an auto-installer when I downloaded mine, so you will need to pick a zip folder of the win64 build. Once it's downladed, unzip the folder to an easily accessed folder. I extracted mine to a folder on the C: drive.

  3. Create "RadioShows" folder

  4. Ffmpeg may fail to savethe file instead of automatically generating the folder, so it should be added manually. I set mine up as "C:\RadioShows\".

  5. Create a New Folder for Radio Show Events

  6. Open the "Task Scheduler" program. The easiest way to find it is to use the Windows search bar. Once it's open, if the "Task Scheduler Library" folder is minimized, double click it or click the arrow to the left of it.

    Windows Task Scheduler main screen, showing task folders in left panel, tasks in current folder in middle section, and actions in right panel. New Folder action is highlighted.

    While the "Task Scheduler Library" folder is highlighted, click the "New Folder..." option in the action panel on the right. In the window that pops up, type "Radio Shows."

    New Folder Dialog. The text Radio Shows is shown in the input box.

    Once the folder is created, click on it. The middle section should now be blank.

  7. Set Up a Test Stream

  8. With the Radio Shows folder selected, click the "Create Task..." option in the Action panel.

    Task Scheduler main screen. Create Task action is highlighted.

    Enter a name for the task. I have called this task "Test. If you want the process to run even if you aren't logged in, then check the box indicating that. This will also prevent a pop-up window from displaying. You may also want to check the box that you don't want to save credentials. If you are testing to see if ffmpeg is installed correctly, you can skip the next step and click the Action tab. Otherwise, click the Trigger tab.

    General tab of the Create Task dialog

    This screen shows when the task will run. Click "Add..." to set the trigger for the task. We most likely want the task to run weekly. Some shows will be daily. Enter the day and the time. Click "OK" and then the Action tab.

    New Trigger screen showing sample date and time settings.

    The next screen shows the action we want to perform. Click "Add," then make sure "Start a program" is selected. For the Program/script, type cmd.exe. By calling the command prompt instead of the stream recorder directly, we can pull the date variables from the system.

    "The Add arguments (optional)" section will include the arguments that determine the input stream, duration of the recording and the output file. This seems like a lot, but most of it can be copied, pasted, and adjusted for each task you want to set up. Lets dissect the following line of arguments:
    /c "C:\ffmpeg\bin\ffmpeg.exe" -i https://wucx.streamguys1.com/live -t 00:00:30 -c copy C:\RadioShows\MusicYouMayHaveMissed-%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.mp3

    Click OK, then click the Conditions tab.

    New Action screen displaying the options described in the previous section.

    Review the settings on the Conditions tab. These might prevent your stream from recording if you aren't careful. The power section is probably the most important. You have to decide whether you want the computer to still record the stream if it isn't plugged in (in the case of a laptop) and if it's in standby mode. Once you're finished with this tab, click the Settings tab.

    Conditions tab or Create Task dialog.

    On the settings tab, if we are doing a manual test to make sure ffmpeg is working correctly, make sure "Allow task to be run on demand" is checked. This will allow us to run the task directly from the main screen instead of on a schedule. click OK.

    Settings tab of the Create Task dialog.

    Now that the task has been set up, make sure it is selected in the main screen and then click the "Run" action. As long as you have the task set up to only run when the user is logged in (from the General tab), a window should pop up showing the progress of the stream recording. Once the process is complete, the window should close and the audio file should be in the folder designated in the Action of the task.

    Task Scheduler main screen. Run action is highlighted.
  9. Set up Stream Recorder Tasks

  10. Once you've verified that everything is working correctly, you can edit the task to record an actual show. Unfortunately, you can't copy and paste tasks, but you can export the task as a template and then import it whenever you want to add a show.