Any way to add timecodes to the left and right sides of the Duration Bar OSD #14952
Replies: 5 comments
-
I guess the task itself isn't that important but mainly just curious what kind of editing can be done to default OSD items provided by MPV. OSD text labels / graphical items such as bars and icons. Thank You |
Beta Was this translation helpful? Give feedback.
-
Indeed it is possible. If you look at lo = add_layout("tc_left")
lo.geometry =
{x = posX - pos_offsetX, y = bottomrowY, an = 4, w = 110, h = 18}
lo.style = osc_styles.timecodes
-- tc_left (current pos)
ne = new_element("tc_left", "button")
ne.content = function ()
if state.tc_ms then
return (mp.get_property_osd("playback-time/full"))
else
return (mp.get_property_osd("playback-time"))
end
end
ne.eventresponder["mbtn_left_up"] = function ()
state.tc_ms = not state.tc_ms
request_init()
end You can then compare that layout and its elements, then find the part for seekbar and simply adjust it (or repeat it) to the left and right. |
Beta Was this translation helpful? Give feedback.
-
@Samillion |
Beta Was this translation helpful? Give feedback.
-
Apologies, I misread and thought you were talking about OSC like the other posts. Technically the answer is still apt, since OSD modification doesn't really exist, unless you consider
To truly customize the message output (ie: OSD message), you'll have to rely on OSC or a simple script that utilizes something like Though someone with more knowledge could enlighten us both on this, as I've not really ventured into OSD modification before. Just OSC. |
Beta Was this translation helpful? Give feedback.
-
Ahh no problem, yeah I agree OSD has been a little confusing to me because it appears to be a general term for many different items, |
Beta Was this translation helpful? Give feedback.
-
Probably just as complicated as trying to modify the OSC but I was wondering if anyone knew if it was possible to add timecodes to the left and right side of the Duration Bar OSD, similar to how the OSC has them?
I wanted to see if I could move my Duration Bar OSD to bottom of screen (which there appears to be an option for already) but I do not see of a way to add timecodes.
The only thing I see is the ability to show timecodes when using "o" or "Shift+P" hotkeys, but not desired to have them show up at the top of screen while the bar is as the bottom.
Might also need to change the width of the Duration Bar OSD as well to fit the time code text.
This could allow Duration Bar OSD to take the place of the OSC, just wanted to try it out if it is possible.
Customizing graphical stuff can be really tricky in MPV.
Thank You
Beta Was this translation helpful? Give feedback.
All reactions