If you enjoy watching movies before bed or listening to a playlist while relaxing, VLC Media Player includes a useful feature that can automatically close the application after media playback ends. This is particularly helpful if you often fall asleep while watching a movie or listening to music and do not want to leave VLC running unnecessarily.
VLC Media Player offers a Play and Exit option that automatically closes the application once the current playback or playlist has finished. You can enable this feature through the advanced preferences in VLC, so you do not have to close the application manually every time you finish watching a video or listening to audio.
This feature is available in VLC on major desktop operating systems, including Windows, Linux, and macOS, although the settings menu may differ slightly depending on your platform and version. If you want your computer to go to sleep after playback finishes, you may also need to configure your operating system’s power settings separately. Let’s walk through the steps to enable automatic exit in VLC Media Player.
Automatically Close VLC Media Player When Playback Ends
You can enable the automatic exit feature by changing VLC’s playlist preferences. Once enabled, VLC will close after the media playback or playlist finishes, allowing you to avoid leaving the application running in the background.
Follow these steps to configure the setting.
1. Open VLC Media Player on your computer. Make sure you are using the desktop application and not a browser-based media player.
2. Click the Tools menu at the top of the VLC window and select Preferences to open the application’s settings.
Note: If you are using VLC on macOS, click VLC Media Player in the menu bar and select Settings or Preferences, depending on your version.

3. In the Preferences window, look for the Show settings section in the bottom-left corner. By default, VLC displays only the basic settings, so you need to switch to the advanced configuration options to access the playlist controls.
4. Select All to display the advanced preferences. This will reveal additional configuration categories in the left sidebar.

5. In the left sidebar, expand or locate the Playlist category. Find the Play and Exit option and select its checkbox to enable it. This setting tells VLC to close automatically after it finishes playing the media.
5. After enabling the option, click Save to apply the changes. Close and reopen VLC if necessary to ensure the updated configuration is applied.

Test the feature by opening a video or audio file and allowing it to play until the end. VLC should close automatically when playback finishes. If you have added multiple media files to a playlist, allow the entire playlist to finish to verify the behavior.
What Happens After Enabling Play and Exit?
Once you enable Play and Exit, VLC can automatically close after completing the media playback or playlist. This is useful when you want to listen to music while working, watch a movie before going to bed, or play a collection of audio files without leaving the media player open afterward.
However, there is an important distinction: automatically closing VLC does not automatically put your computer to sleep. The Play and Exit option only controls VLC’s behavior. If you want your computer to enter sleep mode after playback, you will need to configure your operating system’s power settings or use a separate sleep-scheduling method.
Also, if you stop playback manually or leave a playlist unfinished, VLC may not close in the way you expect. For the most reliable results, let the media or playlist reach its natural end.
Conclusion
Now, whenever you play any media files, VLC Media Player will automatically close when the playback ends. This feature is especially useful if you frequently leave VLC running while watching movies or listening to music before going to bed.
By enabling this option, you can avoid having to manually close the VLC Media Player and ensure that your system saves power by entering sleep mode once the media has finished playing.