The pervasive utilization of mobile technology for an increasing number of utilities and applications enhances the importance of the battery-energy optimization. Among those applications, the ones related to digital video are very popular. When using this type of applications, users may want to ensure a certain battery lifetime in order to complete the viewing of a given video content. This paper presents the design of a closed-loop control system that, from the user-desired battery lifetime, regulates the battery discharge rate in order to meet the user expectations regardless of the real-time dynamic power variations of the video decoding activity. The system is validated first by simulation and then by real tests, since it has been implemented in the operating system (OS) of a commercial development board. A simple proportional controller is able to limit the system error to an equivalent difference of only 0.4 s between the target and the achieved lifetimes, with very little computational overhead. Besides, its OS-based implementation makes it transparent to the user-level applications. Some tests show how the system is able to achieve the same lifetimes as the ones achieved with a couple of Linux-based governors, but with the determinism that the user target lifetime sets from the beginning of each test. Moreover, further tests show that the deterministic lifetimes can be extended up to 12% and 4% beyond those two governors, respectively.