## metadata_osd. Example configuration file. ## Default values are pre-filled and commented out. #-- Enable OSD on mpv startup #enable_on_start=yes #-- Enable OSD for tracks #enable_for_audio=yes #enable_for_audio_withalbumart=yes #enable_for_video=yes #enable_for_image=no #-- Enable OSD-2 (with chapter title metadata if present) #enable_osd_2=yes #-- Enable pathname fallback #enable_pathname_fallback_dirnameup=yes #enable_pathname_fallback_dirname=yes #enable_pathname_fallback_filename=yes #-- Autohide OSD for tracks #autohide_for_audio=no #autohide_for_audio_withalbumart=no #autohide_for_video=yes #autohide_for_image=yes #-- Autohide delay in seconds #autohide_timeout_sec=5 #autohide_statusosd_timeout_sec=5 #-- Key bindings #-- Master enable / disable key (killswitch) #key_toggleenable=F1 #-- Key to enable / disable the OSD autohide feature #key_toggleautohide=F5 #-- Key to show / hide OSD-1 #-- - current autohide state applies so if autohide is enabled, OSD will hide again #-- after the specified delay #key_toggleosd_1= #-- Key to show / hide OSD-2 (with chapter title metadata if present) #-- - current autohide state applies (see above) #-- - OSD-2 needs to be enabled by 'enable_osd_2' config option #-- - OSD-2 needs to have some data #key_toggleosd_2= #-- Reset any user-toggled switches #key_reset_usertoggled=F6 #-- Key to show status OSD #-- - displays OSD and autohide state (enabled / disabled) #key_showstatusosd= #-- Maximum OSD message length #-- OSD messages will be trimmed after the specified (character) length. #osd_message_maxlength=96 #-- Default OSD-1 layout & content: #-- ┌─────────────────┐ #-- │ padding top │ #-- ├─────────────────┤ #-- │ TEXT AREA 1 │ #-- ├─────────────────┤ #-- │ padding top │ #-- ├─────────────────┼─────────────────────┐ #-- │ TEXT AREA 2 │ TEXT AREA 2 RELDATE │ #-- ├─────────────────┼─────────────────────┘ #-- │ padding top │ #-- ├─────────────────┤ #-- │ TEXT AREA 3 │ #-- ├─────────────────┤ #-- │ padding top │ #-- ├─────────────────┤ #-- │ TEXT AREA 4 │ #-- └─────────────────┘ #-- ===================== ========================= ====================== #-- Layout Element Filled w/Metadata (for online content) #-- ===================== ========================= ====================== #-- TEXT AREA 1 Artist < empty > #-- TEXT AREA 2 Album Uploader #-- TEXT AREA 2 RELDATE Release Year < empty > #-- TEXT AREA 3 Title Media Title #-- TEXT AREA 4 Playlist Position / <-- #-- Playlist Count #-- ===================== ========================= ====================== #-- ===================== ========================= #-- Layout Element Path-name Fallback #-- ===================== ========================= #-- TEXT AREA 1 Directory name (one above) #-- TEXT AREA 2 Directory name #-- TEXT AREA 2 RELDATE #-- TEXT AREA 3 File name #-- TEXT AREA 4 #-- ===================== ========================= #-- Default OSD-2 layout & content: #-- ┌─────────────────┐ #-- │ padding top │ #-- ├─────────────────┤ #-- │ TEXT AREA 1 │ #-- └─────────────────┘ #-- ================= ====================== #-- Layout Element Filled w/Metadata #-- ================= ====================== #-- TEXT AREA 1 Chapter Title #-- ================= ====================== #-- Styling options #-- Style: Padding top (in number of half-lines) #-- Allowed values are integers in range: #-- 0, 1, .. 40 #style_paddingtop_osd_1_textarea_1=1 #style_paddingtop_osd_1_textarea_2=0 #style_paddingtop_osd_1_textarea_3=2 #style_paddingtop_osd_1_textarea_4=3 #style_paddingtop_osd_2_textarea_1=3 #-- Style: Alignment #-- Values may be string(s) (multiple separated by semicolon ';'): #-- left_justified (or) centered (or) right_justified ';' subtitle (or) midtitle (or) toptitle #style_alignment_osd_1=left_justified;midtitle #style_alignment_osd_2=centered;midtitle #-- Style: Font style override #-- Values may be string(s) (multiple separated by semicolon ';'): #-- italic ';' bold #style_fontstyle_osd_1_textarea_1=bold #style_fontstyle_osd_1_textarea_2=bold #style_fontstyle_osd_1_textarea_2_releasedate= #style_fontstyle_osd_1_textarea_3=italic #style_fontstyle_osd_1_textarea_4= #style_fontstyle_osd_2_textarea_1= #-- Style: Border width of the outline around the text #-- Allowed values are integers: #-- 0, 1, 2, 3 or 4 #style_bord_osd_1=3 #style_bord_osd_2=3 #-- Style: Shadow depth of the text #-- Allowed values are integers: #-- 0, 1, 2, 3 or 4 #style_shad_osd_1_textarea_1=0 #style_shad_osd_1_textarea_2=0 #style_shad_osd_1_textarea_3=1 #style_shad_osd_1_textarea_4=0 #style_shad_osd_2_textarea_1=0 #-- Style: Font scale (in percent) #-- Allowed values are integers in range: #-- 10, 11, .. 400 #style_fsc_osd_1_textarea_1=100 #style_fsc_osd_1_textarea_2=100 #style_fsc_osd_1_textarea_3=100 #style_fsc_osd_1_textarea_4=60 #style_fsc_osd_2_textarea_1=100 #-- Style: Distance between letters #-- Allowed values are integers in range: #-- 0, 1, .. 40 #style_fsp_osd_1_textarea_1=0 #style_fsp_osd_1_textarea_2=0 #style_fsp_osd_1_textarea_3=10 #style_fsp_osd_1_textarea_4=0 #style_fsp_osd_2_textarea_1=0 #-- Current Chapter Number #-- Show current chapter number in addition to the current playlist position. #-- Can be useful (also) for audio files with internal chapters carrying a song #-- per chapter. #-- Current playlist position if the setting is activated (see below) #-- is moved one line down and put between square brackets. #-- E.g.: #-- Chapter: 4/16 #-- [1/5] <-- playlist position #-- If the chapter number is equal to the current playlist position, the value #-- is conflated with playlist position (to avoid duplicity). #-- ^ (reworded) Applied only if not equal to the current playlist position. #-- If playlist consists of exactly one media, playlist position is omitted #-- instead and substituted for chapter number. #show_chapternumber=no #-- Current Album Track Number #-- Show current album track number in addition to the (encompassing) playlist #-- position (if present in metadata). #-- Can be useful if the playlist traverses multiple directories. #-- Current playlist position if the setting is activated (see below) #-- is moved one line down and put between square brackets. #-- E.g.: #-- Track: 3 #-- [4/26] <-- playlist position #-- If the track number is equal to the current playlist position, the value #-- is conflated with playlist position (to avoid duplicity). #-- ^ (reworded) Applied only if not equal to the current playlist position. #-- If playlist consists of exactly one media, playlist position is omitted #-- instead and substituted for album track number. #-- _Note_: Album track number is scarcely present in metadata, #-- this can give mixed results. #show_albumtracknumber=no #-- *** UNSTABLE OPTIONS BELOW *** #-- * Options below are still riping. They might be changed or removed #-- in the future without further notice. * #-- OSD layout #-- Overall layout for elements #tmpl_layout_osd_1={{CONTENT_TEXTAREA_1_MEDIA}}{{NEWLINE}}{{CONTENT_TEXTAREA_2_MEDIA}}{{CONTENT_TEXTAREA_2_RELDATE_MEDIA}}{{NEWLINE}}{{CONTENT_TEXTAREA_3_MEDIA}}{{NEWLINE}}{{CONTENT_TEXTAREA_4_MEDIA}} #tmpl_layout_osd_2={{CONTENT_TEXTAREA_1_MEDIA}} #-- Text area content for media type #-- _Note_: Templating syntax is as yet _unstable_, #-- it can change in the future. #-- Tag expansion: #-- Expand variable with name VAR: #-- ##VAR## #-- Conditionally include if value of VAR is a non zero length string: #-- {{#?VAR}}TEMPLATE_TEXT{{#/}} #-- The above works also as logical OR, so multiple condidions are possible: #-- {{#?VAR_1}}TEMPLATE_TEXT_1{{#?VAR_2}}TEMPLATE_TEXT_2{{#/}} #content_osd_1_textarea_1_audio={{#?ARTIST}}##ARTIST##{{#?DIRNAME_UP}}##DIRNAME_UP##{{#/}} #content_osd_1_textarea_2_audio={{#?ALBUM}}##ALBUM##{{#?DIRNAME}}##DIRNAME##{{#/}} #content_osd_1_textarea_2_reldate_audio={{#?RELEASE_YEAR}}{{UNICODE_SP}}(##RELEASE_YEAR##){{#/}} #content_osd_1_textarea_3_audio={{#?TITLE}}##TITLE##{{#?FILENAME}}##FILENAME##{{#/}} #content_osd_1_textarea_4_audio=##TEXTAREA_4_GEN## #content_osd_2_textarea_1_audio=##CHAPTERTITLE## #content_osd_1_textarea_1_audio_withalbumart={{#?ARTIST}}##ARTIST##{{#?DIRNAME_UP}}##DIRNAME_UP##{{#/}} #content_osd_1_textarea_2_audio_withalbumart={{#?ALBUM}}##ALBUM##{{#?DIRNAME}}##DIRNAME##{{#/}} #content_osd_1_textarea_2_reldate_audio_withalbumart={{#?RELEASE_YEAR}}{{UNICODE_SP}}(##RELEASE_YEAR##){{#/}} #content_osd_1_textarea_3_audio_withalbumart={{#?TITLE}}##TITLE##{{#?FILENAME}}##FILENAME##{{#/}} #content_osd_1_textarea_4_audio_withalbumart=##TEXTAREA_4_GEN## #content_osd_2_textarea_1_audio_withalbumart=##CHAPTERTITLE## #content_osd_1_textarea_1_video=##DIRNAME_UP## #content_osd_1_textarea_2_video=##DIRNAME## #content_osd_1_textarea_2_reldate_video={{#?RELEASE_YEAR}}{{UNICODE_SP}}(##RELEASE_YEAR##){{#/}} #content_osd_1_textarea_3_video={{#?TITLE}}##TITLE##{{#?FILENAME}}##FILENAME##{{#/}} #content_osd_1_textarea_4_video=##TEXTAREA_4_GEN## #content_osd_2_textarea_1_video=##CHAPTERTITLE## #content_osd_1_textarea_1_image={{#?ARTIST}}##ARTIST##{{#?DIRNAME_UP}}##DIRNAME_UP##{{#/}} #content_osd_1_textarea_2_image={{#?ALBUM}}##ALBUM##{{#?DIRNAME}}##DIRNAME##{{#/}} #content_osd_1_textarea_2_reldate_image={{#?RELEASE_YEAR}}{{UNICODE_SP}}(##RELEASE_YEAR##){{#/}} #content_osd_1_textarea_3_image={{#?TITLE}}##TITLE##{{#?FILENAME}}##FILENAME##{{#/}} #content_osd_1_textarea_4_image=##TEXTAREA_4_GEN## #content_osd_2_textarea_1_image= #content_osd_1_textarea_1_stream= #content_osd_1_textarea_2_stream=##UPLOADER## #content_osd_1_textarea_3_stream=##MEDIATITLE## #content_osd_1_textarea_4_stream=##TEXTAREA_4_GEN## #content_osd_2_textarea_1_stream=##CHAPTERTITLE## #-- Global string substitutions for pathname fallback #-- For *_gsubpatt_* options, so called Lua "patterns" apply as documented #-- in the documentation: #-- https://www.lua.org/manual/5.1/manual.html#5.4.1 #-- Characters after equal sign '=' are not interpreted specially, #-- subsequent equal signs or quotes will be part of the value. #-- For *_gsubrepl_* options, value is taken as such as string replacement. #-- Optionally, space character can be inserted as %UNICODE_SP% in case of #-- a need to make it visible (e.g. if it's at the end of the string). #-- Text Area 1: Directory name one above of the currently loaded media file #-- (empty slot) #pathname_fallback_dirnameup_gsubpatt_1= #pathname_fallback_dirnameup_gsubrepl_1= #-- (empty slot) #pathname_fallback_dirnameup_gsubpatt_2= #pathname_fallback_dirnameup_gsubrepl_2= #-- (empty slot) #pathname_fallback_dirnameup_gsubpatt_3= #pathname_fallback_dirnameup_gsubrepl_3= #-- Text Area 2: Directory name of the currently loaded media file #-- (empty slot) #pathname_fallback_dirname_gsubpatt_1= #pathname_fallback_dirname_gsubrepl_1= #-- (empty slot) #pathname_fallback_dirname_gsubpatt_2= #pathname_fallback_dirname_gsubrepl_2= #-- (empty slot) #pathname_fallback_dirname_gsubpatt_3= #pathname_fallback_dirname_gsubrepl_3= #-- Text Area 3: File name without extension #-- Replace underscore(s) with space character #pathname_fallback_filename_gsubpatt_1=_+ #pathname_fallback_filename_gsubrepl_1=%UNICODE_SP% #-- Remove leading track number #pathname_fallback_filename_gsubpatt_2=^%d+%s+-%s+ #pathname_fallback_filename_gsubrepl_2= #-- (empty slot) #pathname_fallback_filename_gsubpatt_3= #pathname_fallback_filename_gsubrepl_3=