Have you ever wanted to automatically stop video playback on Android-device after a certain time? You might want to fall asleep with a movie, but not drain your battery all night. Or limit viewing time for your child. In this article, we will look at all the possible ways to set a timer on a video - from built-in functions to third-party applications with advanced settings.
Standard players Android rarely offer a built-in sleep timer, but there are workarounds. We tested solutions for different OS versions (from Android 8.0 to Android 14) and collected working methods. Important: some methods require superuser rights or installing additional software, but there are also completely free options without root.
If you are looking for a way to turn off a video after 30 minutes, an hour or a specific time, you will find detailed instructions here. And if you need to not just stop playback, but completely turn off the screen or put the device into sleep mode, we have solutions for that too.
1. Sleep timer in the standard Google Photo/Gallery player
Many users do not know that the application Google Photos (and some standard galleries from manufacturers) has a hidden timer function. It does not work for all video formats, but it supports popular .mp4 and .mkv.
To activate the timer:
- ๐ฑ Open the video in Google Photos and click on the three dots in the upper right corner.
- โฑ๏ธ Select item
Sleep timer(in some versions -Auto stop). - โฐ Set the time: 15/30/45/60 minutes or
At the end of the video. - ๐ Confirm your choice - the timer will start counting down from the moment you press
Play.
Method limitations:
- โ Works only in the background (if minimized application, the timer will be reset).
- โ Does not support
4Kvideo and files with a bitrate higher than20 Mbit/s. - โ On some devices (Xiaomi, Huawei) the function may missing.
If the item Sleep Timer is not in the menu, update Google Photos to the latest version in Play Market.
2. Using the "Sleep Timer" application. (without root)
For those who need more flexibility, a third-party application is suitable Sleep Timer from Urbandroid. It can not only stop the video, but also:
- ๐ต Stop music (YouTube Music, Spotify).
- ๐ฑ Turn off the screen or switch the phone to Do Not Disturb mode
Do not disturb. - โฒ๏ธ Set the timer accurate to the second (maximum 24 hours).
- ๐ Work on top of other applications (you need to give permission in the settings).
Step-by-step guide:
- Download Sleep Timer from Play Market (free version with advertising).
- Run the video in any player (VLC, MX Player, standard).
- Open Sleep Timer and click
+ Add timer. - Select an action:
Stop mediaโ specify the time โStart. - Return to the video - the timer will run in the background.
Give the app permission to "Display on top of other windows"|Disable battery optimization for Sleep Timer|Check compatibility with your player|Set up a notification when the timer ends
-->
App supports automatic recognition running media files, but some players (for example, YouTube) require manual configuration via ADB.
How to set up Sleep Timer for YouTube?
To work with YouTube need to be enabled Accessibility Service in the settings Sleep Timer:
- Go to
Settings โ Accessibility โ Sleep Timer. - Activate the switch.
- Go back to the application and select the action
Stop YouTube.
Without this, the timer will not be able to close the application.
3. Timer via Tasker (for advanced users)
If you need it fully automate process (for example, stopping a video at the same time every day) is suitable Tasker. This application allows you to create complex scenarios based on triggers.
Setting algorithm:
- Install Tasker and plugin AutoInput (to emulate clicks).
- Create a new task (
+ โ New task). - Add action:
Media โ Stop. - Set a time trigger:
Profile โ Time. - Save the task and activate it.
Advantages method:
- โ Works with any players, including YouTube i Netflix.
- โ Can be configured repeating timer (for example, every day at 23:00).
- โ Supports conditional logic (for example, stop the video only when connected to Wi-Fi).
VLC|MX Player|Standard player|YouTube|Other-->
Tasker requires time to study, but provides maximum flexibility. To simplify, you can download ready-made profiles from the community (for example, on TaskerNet).
โ ๏ธ Attention: To work Android 12+ for work Tasker with media functions, you must manually give permission Managing media sessions in the application settings.
4. Built-in functions of VLC and MX Player players
Popular players VLC and MX Player have built-in sleep timers, but they are hidden deep in the settings. Let's consider both options.
VLC for Android
Instructions:
- Open the video in VLC.
- Click on the icon
โฎ(three dots) โSleep timer. - Select time or configure
Custom(up to 240 minutes). - The timer will start counting after press
Play.
MX Player
Here the function is called Auto stop:
- During playback, swipe up to open the toolbar.
- Click on the icon โฐ โ select the time.
- To cancel the timer, press โฐ again.
Comparison of capabilities:
| Function | VLC | MX Player |
|---|---|---|
| Max. timer time | 240 min | 120 min |
| Work in the background | โ Yes | โ No |
| 4K HDR support | โ Yes | โ ๏ธ Partially |
| Automatic repeat | โ No | โ Yes |
MX Player may conflict with energy-saving modes on devices Samsung i OnePlus โthe timer is reset when optimizing the battery.
5. Timer via ADB commands (for technical users)
If you do not want to install third-party applications, you can use ADB (Android Debug Bridge) to send a command to stop playback. This method works on any device with enabled USB debugging.
Instructions:
- Connect the phone to the PC and activate
Developer mode(click onBuild number7 times settings). - Enable
USB debugginginSettings โ System โ For developers. - On a PC, open a terminal and enter:
adb shell input keyevent KEYCODE_MEDIA_PAUSEThis command simulates pressing the pause button.
- To automate the process, create a
.batfile with a timer:timeout /t 1800 & adb shell input keyevent KEYCODE_MEDIA_PAUSEHere
1800โ time in seconds (30 minutes).
Advantages of the method:
- โ Does not require installation of additional applications.
- โ Works on any version of Android.
- โ Can be integrated with Tasker or Automate.
โ ๏ธ Attention: CommandsADBrequire a permanent connection to a PC or wireless debugging settings. On some devices (Huawei, Xiaomi), you need to additionally enable debugging inSecurity Settings.
Comparison of all methods: which one to choose?
The choice of method depends on your needs:
- ๐ฌ For one-time use the built-in timer is suitable for VLC or MX Player.
- โฐ For daily automatic shutdown โ Tasker or Sleep Timer.
- ๐ป For technical userswho do not want to install software -
ADB. - ๐ถ For controlling children's time โ Sleep Timer with the screen lock function.
If you need not just to stop the video, but turn off completely devicecombine Sleep Timer with the application MacroDroid (to create a chain of actions).
For maximum reliability, use a combination of VLC (built-in timer) + Tasker (backup shutdown).
Frequent problems and their solutions
Even with the correct setting of the timer may not work. Considered errors and ways to fix them:
Problem 1: The timer is reset when the screen is locked.
- ๐น Disable
Battery optimizationfor the player in the settings. - ๐น In Sleep Timer activate the option
Work in the background. - ๐น For VLC: enable
Do not stop playback when lockedin the settings.
Problem 2: The timer does not work in YouTube.
- ๐น Use YouTube Vanced (if available) or NewPipe โthey support background playback.
- ๐น In Sleep Timer select action
Close applicationinstead ofStop media.
Problem 3: The Android 13+ timer stops working after updating.
- ๐น Check permissions for the application in
Settings โ Applications โ Special access. - ๐น Update the player and Sleep Timer to the latest versions.
โ ๏ธ Attention: On devices with MIUI (Xiaomi) and EMUI (Huawei) you may need to manually add applications to the listAutostartandNo battery limitations.
FAQ: Answers to popular questions
Is it possible to set a timer on a YouTube video without third-party applications?
No, the standard application YouTube does not support a sleep timer. Alternatives:
- Use the web version YouTube in a browser with an extension AutoStop (for PC).
- Install NewPipe โthere is a built-in timer.
- Set Tasker to close the application by time.
Why does the timer in VLC reset after a pause?
This is a known bug in the versions VLC below 3.5.0. Update the application or:
- Stop the video instead of pausing (button
Stop). - Use an external timer (Sleep Timer).
How to make the phone turn off after the end of the video?
For This requires a combination of two actions:
- Set Sleep Timer to stop the video.
- Create a task in Tasker or MacroDroid to turn off the screen after stopping the media.
Example of a macro for MacroDroid:
Trigger: Stop playback (Media Session)
Action: Turn off the screen (Display Off)
Is there a way to set a timer on a video in Telegram?
Yes, but with limitations:
- In the official client Telegram there is no timer.
- Use Sleep Timer with the action
Close Telegram. - For local files download the video and open it in VLC.
Is it possible to set a timer on a video in Netflix or Disney+?
Streaming services block access to system media buttons, therefore:
- ๐น Use Sleep Timer with action
Close the application. - ๐น Set Tasker to simulate pressing
Backafter a specified time. - ๐น On Android TV use function
Sleep by timerin the system settings.