Automatic stream (cast) to Smart TV
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Automatic stream (cast) to Smart TV
Hello everybody,
I've been trying to find a program (media server) that can do the scenario explained in the following topic and so far UMS is the only media server that is promising enough to do this.
I have 2 smart LG TVs connected in LAN. Both of them automatically turn on specifically at 7am every day and turn off at 4pm.
My first question Is: Is it possible that i can create some kind of script that can push video content to one of the tvs (corporate video) that need to loop until the tv is automatically turned off at 4pm?
My second question is: Is it possible to create a script to stream TWO JPEG photos to the second tv (slide show) until the tv is turned off automatically at 4 pm?
The idea of the photos is to be automatically added to a playlist when someone adds them in a shared folder.
The whole concept is intended to have minimum human input (besides adding the photos in the shared network folder)
Thanks in advance!
P.S. Sorry for using the word "automatically" to often
I've been trying to find a program (media server) that can do the scenario explained in the following topic and so far UMS is the only media server that is promising enough to do this.
I have 2 smart LG TVs connected in LAN. Both of them automatically turn on specifically at 7am every day and turn off at 4pm.
My first question Is: Is it possible that i can create some kind of script that can push video content to one of the tvs (corporate video) that need to loop until the tv is automatically turned off at 4pm?
My second question is: Is it possible to create a script to stream TWO JPEG photos to the second tv (slide show) until the tv is turned off automatically at 4 pm?
The idea of the photos is to be automatically added to a playlist when someone adds them in a shared folder.
The whole concept is intended to have minimum human input (besides adding the photos in the shared network folder)
Thanks in advance!
P.S. Sorry for using the word "automatically" to often

Re: Automatic stream (cast) to Smart TV
All communication between a renderer and a media server is the DLNA protocol based so the renderer is always asking for the media which should be played. It is not a responsibility of a media server to push something to them. If you would be able to make a script in your smart TV then it could work. Or you can make a new UMS plugin which can use the UPnP support implemented and push the media to your TV. We don't use scripts for such cases.
Re: Automatic stream (cast) to Smart TV
You can try this using the jumpy plugin's (undocumented) pms.play(uri, renderer_ip) scripting command, e.g. working example in python to start a video at a given time and stop it a minute later (timedplay.py):aleks2x wrote:Is it possible that i can create some kind of script that can push video content to one of the tvs
Code: Select all
import sys, time, jumpy
def push_at(hour, min, uri, renderer):
while True:
now = time.localtime()
if now.tm_hour == hour and now.tm_min == min:
# push the uri to the renderer
pms.play(uri, renderer)
return
time.sleep(1)
# parse start time
t = sys.argv[1]
hour, min = [int(x) for x in t.split(':')]
# schedule start at hour:min
push_at(hour, min, 'c:\\video.mp4', '192.168.1.5')
# playing...
# schedule stop after one minute by pushing
# a dummy uri to interrupt previous stream
push_at(hour, min + 1, 'dummy', '192.168.1.5')
Code: Select all
[+timedplay]
cmd = ${home}/timer/timedplay.py 07:00 &

Note that you would need to script all the directory-scanning, timing and looping logic yourself in python, and push uris accordingly.
Re: Automatic stream (cast) to Smart TV
Thank you very much!
I'll definitely try this and let everybody know how it goes.
Kind regards!
I'll definitely try this and let everybody know how it goes.
Kind regards!
Re: Automatic stream (cast) to Smart TV
I have one proposal. Try to make some folder with the pistures you want to show and add that folder to the UMS shared folders. Than if your TVs are really smart there should be a choice to play the slide show. TV will be asking for all pictures from the folder and the UMS will serve it.