diff options
author | Peter Kuchar <peter.kuchar@konicaminolta.cz> | 2020-07-11 22:45:58 +0200 |
---|---|---|
committer | Peter Kuchar <peter.kuchar@konicaminolta.cz> | 2020-07-11 22:56:57 +0200 |
commit | 3ef4ecf765820cbb34921a3bc2893e3d2e8c440a (patch) | |
tree | 542938ef824f2a859b2f515a6dd9efe904feee5c | |
parent | 0013328ff2df09c63cd06fb82a50a63a7c76b763 (diff) | |
download | python-mpv-3ef4ecf765820cbb34921a3bc2893e3d2e8c440a.tar.gz python-mpv-3ef4ecf765820cbb34921a3bc2893e3d2e8c440a.tar.bz2 python-mpv-3ef4ecf765820cbb34921a3bc2893e3d2e8c440a.zip |
update README with inserting subtitles
-rw-r--r-- | README.rst | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -161,6 +161,25 @@ Directly feeding mpv data from python player.play('python://foo') player.wait_for_playback() +Inserting subtitles +................... + +The "core-idle" property tells you whether video is actually playing or not +(player core is available for further commands) + +.. code:: python + + #!/usr/bin/env python3 + import mpv + from operator import not_ + + player = mpv.MPV(log_handler=print, input_default_bindings=True, input_vo_keyboard=True) + player.play(video) + player.wait_for_property('core-idle', not_) + player.sub_add(subs) + player.wait_for_playback() + player.terminate() + Using MPV's built-in GUI ........................ |