Media flags: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Loki12
No edit summary
mNo edit summary
 
(47 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{cleanup}}
'''Media flags''' are icons in Kodi that displays the meta-information from the media file of a movie, TV show or music title.
==== What are Media Flags? ====


Media Flags are icons at XBMC that displays the meta-information from the media file of a movie, TV show or music title.
== Examples ==
<gallery widths=450px heights=250px>
File:Posterwrapmediaflags.png|Media Flags in the movie library, Confluence skin: 1080, H.264, dts, 5.1, 1.85 and Blu-Ray Disc
File:media_flags_music.png|Media Flags in music-section
</gallery>
{{-}}


[[File:ConfluenceMediaFlags.jpg|700px|thumb|none|Media Flags at skin Confluence: 1080, h264, dts, 5.1, 16:9 and Blu-Ray Disc]]
== Flag types and where they come from ==
[[File:media_flags_music.png|700px|thumb|none|Media Flags in music-section]]
Kodi tries to read the meta information from the media file after it's been added to the [[Library]]. This meta-information can be queried by the built-in [[InfoLabels]] in order to display it in the skin.<br />
 
Example-code for a resolution-flag in [[Confluence]] (Kodi's default skin):
 
<syntaxhighlight lang="xml" enclose="div">
==== Where does XBMC get the Information for Media Flags? ====
 
XBMC tries to read the meta information from the media file, after it was added to the Library.
This meta information can be queried by the built-in [[InfoLabels]] in order to display it in the skin.<br />
Example-code for a resolution-flag in Confluence:
<source lang="xml">
<control type="image">
<control type="image">
            <description>Video rez Image</description>
            <description>Video rez Image</description>
Line 21: Line 19:
    <texture>$INFO[ListItem.VideoResolution,flagging/video/,.png]</texture>
    <texture>$INFO[ListItem.VideoResolution,flagging/video/,.png]</texture>
</control>
</control>
</source>
</syntaxhighlight>
 
===== Video Flags =====
The category video flags provides images for the following properties:<br />
 
* Resolution: SD, HD, 720p, 1080p, 480p, 576p ...
 
* Format: DivX, XviD, h264, x264, wmv, mpeg2video ...
 
* Aspect ratio: 4:3, 16:9, 2.35:1 ...


'''NOTE: What exact kind of video flag is provided depends on the skin you are using!'''
=== Video flags ===
The category video flags provides images for the following properties:
{| class=wikitable
! Resolution
! Format
! Aspect ratio
|-
|[[File:480.png|50px]] [[File:1080.png|50px]] [[File:720.png|50px]] [[File:1080 n.png|50px]] [[File:480-1.png|50px]] '''...'''
|[[File:Divx.png|80px]] [[File:Xvid.png|80px]] [[File:H264.png|80px]] [[File:Bluray.png|80px]] [[File:Dvd.png|80px]] [[File:Avc1.png|80px]] '''...'''
|[[File:1.33.png|50px]] [[File:1.66.png|50px]] [[File:2.20.png|50px]] [[File:2.35.png|50px]] '''...'''
|}


===== Audio Flags =====
What exact kind of video flag is provided depends on the skin you are using. The above are just a few examples types.
The category audio flags provides images for the following properties:<br />


* Channels: 1.0, 2.0, 5.1, 7.1 ...
=== Audio flags ===
The category audio flags provides images for the following properties: e.g.
{| class=wikitable
! Channels
! Formats
|-
|[[File:1.png|50px]] [[File:2.png|50px]] [[File:6.png|50px]] [[File:8.png|50px]] [[File:10.png|50px]] '''...'''
|[[File:Aac.png|80px]] [[File:Ac3.png|80px]] [[File:Mp3.png|80px]] [[File:Flac.png|80px]] [[File:Dts.png|80px]] [[File:Dtshd_ma.png|80px]] [[File:Truehd.png|80px]] [[File:Pcm_bluray.png|80px]] [[File:Cdda.png|80px]] '''...'''
|}
What exact kind of audio flag is provided depends on the skin you are using. The above are just a few examples types.


* Format: AC3, DTS, mp3, flac, DTS-HD MasterAudio ...
=== Media source ===
{{see also|Add-on:Confluence#Media flags|Naming video files}}
Most skins have flags for the video source of a media file. This information is obtained from the the filename or the directory name.
Media can be flagged with following media source flags in Confluence:
{{#lst:Add-on:Confluence|flags}}


'''NOTE: What exact kind of audio flag is provided depends on the skin you are using!'''
As an alternative you can set your folder structure to fit the keywords above:
* '''C:\Videos\DVDR\Movie1...'''    on Windows
* '''/mnt/dev1/videos/bluray/movie1'''   on Linux


===== Media Source =====
What exact kind of source flag is provided depends on the skin you are using and its naming convention.


Most skins have flags for the video source of a media file. This information are obtained from the the filename or the directoryname.
=== Custom flags ===
 
Media can be flagged with following media source flags:
 
* '''DVD''', if the filename contains DVDR, DVDRIP, SDDVD, .iso or .ifo.
* '''Blu-Ray Disc''', if the filename contains BLURAY, BLU-RAY, BRRIP or BDRIP.
* '''HDDVD''', if the filename contains HDDVD.
* '''SDTV''', if the filename contains SDTV or TVRip.
* '''HDTV''', if the filename contains HDTV or PDTV.
 
As an alternative you can set your folder structure to fit the keywords above:<br />
* '''C:\Videos\DVDR\Movie1...'''    on Windows<br />
* '''/mnt/dev1/videos/bluray/movie1'''    on Linux<br />
 
 
'''NOTE: What exact kind of source flag is provided depends on the skin you are using and its naming convention!'''
 
===== Custom Flags =====
Most skins also have the ability to show media flags from [[InfoLabels]] that come not from the media file itself. These pieces of information are provided by the scraper that was used to scan the file to the library and can be:<br />
Most skins also have the ability to show media flags from [[InfoLabels]] that come not from the media file itself. These pieces of information are provided by the scraper that was used to scan the file to the library and can be:<br />
* Movie Studio: WarnerBros., 20th Century Fox, Universal ...
* Movie Studio: WarnerBros., 20th Century Fox, Universal ...
Line 68: Line 64:
* Rating: MPAA, FSK, UK-Rating ...
* Rating: MPAA, FSK, UK-Rating ...


===== Special Notes =====
=== Special notes ===
* Some file types (e.g. .iso) have to be played one time, before the media flags appear in the database<br />
* Some file types (e.g. .iso) have to be played one time, before the media flags appear in the database<br />
* You can change the kind of media flag regardless of the file by editing the table [http://wiki.xbmc.org/index.php?title=Database#streamdetails streamdetails] in the XBMC database
 
[[Category:User Interface]]
== See also ==
[[Category:Skin Development]]
'''Development:'''
* [[Add-on development]]
* [[Skinning]]
* [http://forum.kodi.tv/showthread.php?tid=184403&pid=1615348#pid1615348 Add custom flag] Forum post
 
{{Isengard updated}}

Latest revision as of 20:09, 17 December 2020

Media flags are icons in Kodi that displays the meta-information from the media file of a movie, TV show or music title.

Examples


Flag types and where they come from

Kodi tries to read the meta information from the media file after it's been added to the Library. This meta-information can be queried by the built-in InfoLabels in order to display it in the skin.
Example-code for a resolution-flag in Confluence (Kodi's default skin):

<control type="image">
	            <description>Video rez Image</description>
		    <width>55</width>
		    <height>35</height>
		    <aspectratio align="right">keep</aspectratio>
		    <texture>$INFO[ListItem.VideoResolution,flagging/video/,.png]</texture>
		</control>

Video flags

The category video flags provides images for the following properties:

Resolution Format Aspect ratio
480.png 1080.png 720.png 1080 n.png 480-1.png ... Divx.png Xvid.png H264.png Bluray.png Dvd.png Avc1.png ... 1.33.png 1.66.png 2.20.png 2.35.png ...

What exact kind of video flag is provided depends on the skin you are using. The above are just a few examples types.

Audio flags

The category audio flags provides images for the following properties: e.g.

Channels Formats
1.png 2.png 6.png 8.png 10.png ... Aac.png Ac3.png Mp3.png Flac.png Dts.png Dtshd ma.png Truehd.png Pcm bluray.png Cdda.png ...

What exact kind of audio flag is provided depends on the skin you are using. The above are just a few examples types.

Media source

Most skins have flags for the video source of a media file. This information is obtained from the the filename or the directory name. Media can be flagged with following media source flags in Confluence:

  • DVD, if the filename contains DVD.
  • Bluray, if the filename contains BLURAY, BRRIP, BD25, or BD50.
  • HDDVD, if the filename contains HDDVD.
  • TV, if the filename contains HDTV, PDTV, or DSR.
  • VHS, if the filename contains VHS.


As an alternative you can set your folder structure to fit the keywords above:

  • C:\Videos\DVDR\Movie1... on Windows
  • /mnt/dev1/videos/bluray/movie1 on Linux

What exact kind of source flag is provided depends on the skin you are using and its naming convention.

Custom flags

Most skins also have the ability to show media flags from InfoLabels that come not from the media file itself. These pieces of information are provided by the scraper that was used to scan the file to the library and can be:

  • Movie Studio: WarnerBros., 20th Century Fox, Universal ...
  • TV Channel/Network: HBO, ABC, FOX ...
  • Rating: MPAA, FSK, UK-Rating ...

Special notes

  • Some file types (e.g. .iso) have to be played one time, before the media flags appear in the database

See also

Development: