]> git.sesse.net Git - nageru-docs/blobdiff - video.rst
Document the imperative 1.9.0 functions.
[nageru-docs] / video.rst
index 88cf383b4df59f30978c6d1dcc6651df37509614..12e32e3fc8dbe8448ae8c88dd667e780335b5cf2 100644 (file)
--- a/video.rst
+++ b/video.rst
@@ -94,7 +94,35 @@ You can also change its rate, e.g. by::
 This will make it play at twice its usual speed. Your rate should not be
 negative nor exactly zero. You can set a rate to e.g. 1e-6 if you want to
 in practice stop the video; once you change it back to normal speed,
-the next frame will resume playing.
+the next frame will resume playing. Be aware that changing the rate may
+make the audio behave unpredictably; there are no attempts to do time
+stretching or change the pitch accordingly.
+
+Finally, if you want to forcibly abort the playing of a video,
+even one that is blocking on I/O, you can use (since Nageru 1.7.2)::
+
+  video:disconnect()
+
+This is particularly useful when dealing with network streams, as FFmpeg does not
+always properly detect if the connection has been lost. See :ref:`menus`
+for a way to expose such functionality to the operator.
+
+.. _subtitle-ingest:
+
+Ingesting subtitles
+-------------------
+
+Video streams can contain separate subtitle tracks. Since Nageru 1.8.1,
+you can read these streams. This is particularly useful when using Nageru
+and Futatabi together (see :ref:`talkback`).
+
+To get the last subtitle given before the current video frame, call
+“signals:get_last_subtitle(n)” from get_chain, where n is the signal number
+of your video signal. It will either contain nil, if there hasn't been
+a subtitle, or else the raw subtitle. Note that if the video frame and
+the subtitle occur on the exact same timestamp, and the video frame
+is muxed before the subtitle packet, the subtitle will not make it in time.
+(Futatabi puts the subtitle slightly ahead of the video frame to avoid this.)
 
 
 Integration with CasparCG