Libmpv plugin for tSIP
This plugin allows to play video/rtsp stream/whatever libmpv supports on one of the buttons. Example use: combining audio-only doorphone and RTSP camera into video doorphone.
Installation
- copy tSIP_mpv.dll from Release_Build to tSIP /phone subdirectory
- copy libmpv-2.dll to tSIP directory (next to exe), get this from e.g. this archive: VideoPlayerMpv
- start tSIP and enable plugin
- choose button for video display, set size and position
- create Lua scripts starting/stopping video playback
Note: this requires tSIP 0.3.03 (or newer).
Releases
-
2024.03.27 Initial release, tSIP-plugin-mpv_1_0.7z. Limited to single player instance per dll.
Example script (note: not compatible with version 2.0):local once, onceIsSet = GetVariable("tSIP_mpv_CREATED") if onceIsSet == 0 then print("Creating mpv instance\n") SetVariable("tSIP_mpv_CREATED", "1") local handle = GetButtonHandle(54) -- button ID to use for display PluginSendMessageText("tSIP_mpv.dll", string.format("CREATE %x", handle)) end -- PluginSendMessageText("tSIP_mpv.dll", "PLAY F:\seriale\Wilq\101.mp4") PluginSendMessageText("tSIP_mpv.dll", "PLAY rtsp://rtsp-test-server.viomic.com:554/stream") PluginSendMessageText("tSIP_mpv.dll", "VOLUME 100") Sleep(120000) PluginSendMessageText("tSIP_mpv.dll", "STOP")
-
2024.03.28 Version 2.0, tSIP-plugin-mpv_2_0.7z. Adding support for multiple player instances, changed command format.
Example script, playing four separate video files on four buttons (20...23):local once, onceIsSet = GetVariable("tSIP_mpv_CREATED") if onceIsSet == 0 then print("Creating mpv instance\n") SetVariable("tSIP_mpv_CREATED", "1") local handle = GetButtonHandle(20) -- button ID to use for display PluginSendMessageText("tSIP_mpv.dll", string.format("PLAYER1 CREATE %x", handle)) handle = GetButtonHandle(21) PluginSendMessageText("tSIP_mpv.dll", string.format("PLAYER2 CREATE %x", handle)) handle = GetButtonHandle(22) PluginSendMessageText("tSIP_mpv.dll", string.format("PLAYER3 CREATE %x", handle)) handle = GetButtonHandle(23) PluginSendMessageText("tSIP_mpv.dll", string.format("PLAYER4 CREATE %x", handle)) end PluginSendMessageText("tSIP_mpv.dll", "PLAYER1 PLAY F:\seriale\Kapitan Bomba\Admirał Jachaś.mp4") PluginSendMessageText("tSIP_mpv.dll", "PLAYER2 PLAY F:\seriale\Kapitan Bomba\Barbarian.mp4") PluginSendMessageText("tSIP_mpv.dll", "PLAYER3 PLAY F:\seriale\Kapitan Bomba\Czas Wyborów.mp4") PluginSendMessageText("tSIP_mpv.dll", "PLAYER4 PLAY F:\seriale\Kapitan Bomba\LASEROWY GNIEW DZIDY.mp4") -- PluginSendMessageText("tSIP_mpv.dll", "PLAYER1 VOLUME 100") Sleep(90000) PluginSendMessageText("tSIP_mpv.dll", "PLAYER1 STOP") PluginSendMessageText("tSIP_mpv.dll", "PLAYER2 STOP") PluginSendMessageText("tSIP_mpv.dll", "PLAYER3 STOP") PluginSendMessageText("tSIP_mpv.dll", "PLAYER4 STOP")
-
2024.08.03 Version 2.1, tSIP-plugin-mpv_2_1.7z
- added SET_PROPERTY_STRING command
- cleaned up some excessive logging when playing RTSP
Github: https://github.com/tomek-o/tSIP-plugin-mpv.
Back to tSIP softphone