View Full Version : OSD Overlay
ressof
March 20th, 2007, 12:25 PM
Hello
I wonder if I can show an OSD message on my TV while watching a movie.
I have an ATI graphic card and using clone mode and overlay with media player classic.
Promixis
March 21st, 2007, 02:02 PM
You will have to give it a try. I am guessing it won't work.
mhund
March 21st, 2007, 03:51 PM
it should work because I use this every day. You can modify the video renderer overlay/VMR7/VMR9 to solve flicker problems.
blubberhoofd
March 21st, 2007, 05:42 PM
hi,
this will usually work. If used with simple OSD the transparent setting can cause some problems.
For example: white text with transparent background will often show up as solid white rectangle when both applications are trying to use overlay.
but as Mhund mentioned, there's plenty of options to optimize.
ressof
March 22nd, 2007, 12:34 PM
how can i do it. is it with lua scipt or some plugin or is it built in to the system. I'm pretty new to this.
I found this code but it only show the osd on my main screen
-- get time from MPC
local m = {}
m.ChildClass = "static"
m.Filename = "mplayerc.exe"
m.MatchHidden = true
index = 1
local test = gir.GetWindowMatches(m)
if test ~= nil then
Handle = table.tostring(gir.GetWindowMatches(m))
repeat
Start = string.find(Handle, "= ", index)
if Start ~= nil then
index = string.find(Handle, ",", Start)
handle = string.sub(Handle, Start+2, index-1)
windowtext = win.GetWindowText(handle)
if windowtext ~= nil then
if string.find(windowtext, "%d%d%s/%s%d") then
print (windowtext)
--convert to percentage
_, _, hours, minutes, seconds, thours, tminutes, tseconds = string.find(windowtext, "(%d%d)%p(%d%d)%p(%d%d)%s%p%s(%d%d)%p(%d%d)%p(%d%d)")
if hours == nil then
_, _, minutes, seconds, tminutes, tseconds = string.find(windowtext, "(%d%d)%p(%d%d)%s%p%s(%d%d)%p(%d%d)")
hours = 0
thours = 0
end
hours = 3600 * hours
minutes = minutes * 60
seconds = seconds + minutes + hours
print ("current="..seconds)
thours = 3600 * thours
tminutes = tminutes * 60
tseconds = tseconds + tminutes + thours
print ("total="..tseconds)
ratio = seconds / tseconds
percentage = ratio * 100
print (percentage.."%")
if Title == nil then Title = "test" end
--show progressbar
if not ProgOSD then
ProgOSD = osd.Classes.Progress:New(osd.GetStyle("ProgressDarkBlue",{Monitor = 0, Position = "CENTER", BorderSize = 0, BGColor1 = osd.MakeARGB(255, 136, 136, 136), BGColor2 = osd.MakeARGB(255, 17, 17, 17), FGColor1 = osd.MakeARGB(255, 221, 221, 221), FGColor2 = osd.MakeARGB(255, 136, 136, 136), TimeOut = 1500, AutoSizeWidth = 95, Caption = Title.."\n"..windowtext, Min = 0, Max = 100}))
end
ProgOSD.Caption = Title.."\n"..windowtext
ProgOSD:Show(true, percentage, 1)
end
end
end
until Start == nil
end
blubberhoofd
March 24th, 2007, 05:17 AM
hi,
so you found my old OSD code ;)
change this line (monitor=0):
ProgOSD = osd.Classes.Progress:New(osd.GetStyle("ProgressDarkBlue",{Monitor = 0, Position = "CENTER", BorderSize = 0, BGColor1 = osd.MakeARGB(255, 136, 136, 136), BGColor2 = osd.MakeARGB(255, 17, 17, 17), FGColor1 = osd.MakeARGB(255, 221, 221, 221), FGColor2 = osd.MakeARGB(255, 136, 136, 136), TimeOut = 1500, AutoSizeWidth = 95, Caption = Title.."\n"..windowtext, Min = 0, Max = 100}))
end
into (monitor=1):
ProgOSD = osd.Classes.Progress:New(osd.GetStyle("ProgressDarkBlue",{Monitor = 1, Position = "CENTER", BorderSize = 0, BGColor1 = osd.MakeARGB(255, 136, 136, 136), BGColor2 = osd.MakeARGB(255, 17, 17, 17), FGColor1 = osd.MakeARGB(255, 221, 221, 221), FGColor2 = osd.MakeARGB(255, 136, 136, 136), TimeOut = 1500, AutoSizeWidth = 95, Caption = Title.."\n"..windowtext, Min = 0, Max = 100}))
end
haven't played with this code for a while, so let me know if it works or not ;)
ressof
March 26th, 2007, 03:21 AM
no it didn't work. It still displays on my main screen.
Is there another way to do this?
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.