> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.xsplit.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Automatically Starting a Scheduled Recording

With XSplit Broadcaster's Macros Extension, it's possible to automate your entire recording/livestream session from start to finish. 

---

In this guide, you will learn how the **Macros Extension's** **actions/conditions** can be used to automatically start a recording on a set schedule and play a video file.

|| Make sure XSplit Broadcaster is kept running in your system for Macros to work.  

## Creating the Event and Scheduling Macro to Start the Recording or Livestream

1. Make sure the scenes and sources in your presentation are ready.

2. Go to **Extensions > Macros**. The Macros window should appear.

![Selecting Macros under the Extensions Menu in XSplit Broadcaster](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/002_kvao7i.png)

3. Click the **+ icon** to add a new macro.

![Clicking the + icon on an empty Macros window adds a new one](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/003_1p1rmlv.gif)

| If you already have other macros, you can instead click the **+ icon** at the top-left portion of the window to add a new one. 

4. Choose and select **On scheduled time** under **Event**. A new entry field should appear just below it.

5. Set your preferred time under **Schedule**. In this guide we'll use **12:00am** as an example. This will allow the macro event to start automatically at exactly 12am.

6. Under **Action**, select **Start/stop broadcast** in the drop down menu. Two new dropdown menus should appear.

7. In **Select output/channel**, select **Local Recording**.

| Alternatively, you can select a streaming output instead of local recording if you want to livestream.

8. In **Select Function**, select **Start**. 

![First segment of the macro where the recording is set to automatically start at 12am](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/event-and-action-for-starting-_1vpquhq.png)

---

## Playing Media Files Automatically Within the Event

We want to play a video as soon as the stream event starts. For this, our media file needs to meet a certain **Condition** to proceed with the process.

9. Click **Add Condition**. This creates a new condition within the same event. Select **Check media state** in the drop down.

10. In **Select scene**, select the scene of the media file source.

11. In **Select media source**, select the media file source itself.

12. In **Select media state**, select **not playing.**

![2nd segment of the Macro where a condition is set to check if the media file is currently not playing](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/media-file-condition-as-not-pl_5z25nq.png)

---

13. Click **Add action**. This creates a new one action macro within the same event condition.

![Clicking on Add Action creates a new Action field within the same Event in Macros](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/add-action_fmccnb.gif)

14. In **Select Action**, select **Set media source playback state.**

15. In **Select scene**, select the scene of the media file source.

16. In **Select media source**, select the media file source itself.

17. In **Select media state**, select **Play.**

![3rd segment of the macro where the media file is set to play if the condition is met (initially not playing)](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/action-to-play-media-file-if-c_2eko9j.png)

Your Macros should look like this:

![Overview of how your Macros should look like if you want to automatically start a scheduled recording with automatic video playback](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/scheduled-recording-overview_464l8v.png)

| OPTIONAL: Don't forget to rename your Macro by clicking the **Pencil icon** at the top.

18. Check **Enable event listener** to activate the macro.

![Checking Enable event listener to activate the Macro](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/event-listener-multi_le281v.png)

19. To ensure everything is working, it's best to use the **Test** button located at the upper right corner of the Macros extension window. Close the window when done.

![Clicking the Test button at the upper-right corner of the Macros extension window](https://storage.crisp.chat/users/helpdesk/website/567507547fcdcc00/test-button_12eftjf.png)

---

That's it! Go back to the XSplit Broadcaster main program window and leave the program running. The recording session and playback will automatically start at your preferred time.

