Difference between revisions of "Documentation:Format String"
(Correct / update to 2.1.0) |
|||
Line 1: | Line 1: | ||
{{RightMenu|Documentation TOC}} | {{RightMenu|Documentation TOC}} | ||
− | Starting with [[VLC media player]] 0.9.0, | + | == Time == |
+ | |||
+ | Starting with [[VLC media player]] 0.9.0, the following option specify a character formatted time string, rather than just a plain character string: | ||
* --marq-marquee | * --marq-marquee | ||
− | |||
* --snapshot-prefix | * --snapshot-prefix | ||
− | * -- | + | * --sout-file-format |
− | * -- | + | * --sout-livehttp-index |
− | |||
− | |||
− | |||
− | |||
− | |||
− | Time variables are those defined by the '''strftime''' C function. | + | Time variables are those defined by the '''strftime''' C function. The following expansions are most common: |
* %Y : year | * %Y : year | ||
* %m : month | * %m : month | ||
Line 20: | Line 16: | ||
* %M : minute | * %M : minute | ||
* %S : second | * %S : second | ||
− | |||
− | == | + | For an extensive list have a look at [http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html] (or the strftime manual page on Unix systems). |
+ | |||
+ | ==Input meta== | ||
− | + | The following VLC-specific meta-data expansions are available for the --input-title-formato ption: | |
* $a : artist | * $a : artist | ||
* $b : album | * $b : album | ||
Line 30: | Line 27: | ||
* $d : description | * $d : description | ||
* $e : encoded by | * $e : encoded by | ||
− | * $f : frame count | + | * $f : total decoded frame count (since VLC started) |
* $g : genre | * $g : genre | ||
* $l : language | * $l : language | ||
− | * $n : track | + | * $n : track number |
* $p : now playing | * $p : now playing | ||
* $r : rating | * $r : rating | ||
Line 59: | Line 56: | ||
You can insert a space between the $ sign and the character to tell it to not display anything if the meta data isn't available. For example: $ T instead will display "" if no time is available while $T would display something like "01_22_13" (for a snapshot from one hour, 22 minutes and 13 seconds in a video). | You can insert a space between the $ sign and the character to tell it to not display anything if the meta data isn't available. For example: $ T instead will display "" if no time is available while $T would display something like "01_22_13" (for a snapshot from one hour, 22 minutes and 13 seconds in a video). | ||
− | ==Source code== | + | ===Source code=== |
If you want to know how this works, check out src\text\strings.c (str_format_meta function)[http://git.videolan.org/?p=vlc.git;a=blob;f=src/text/strings.c] | If you want to know how this works, check out src\text\strings.c (str_format_meta function)[http://git.videolan.org/?p=vlc.git;a=blob;f=src/text/strings.c] | ||
{{Documentation}} | {{Documentation}} |
Revision as of 16:26, 3 October 2013
Time
Starting with VLC media player 0.9.0, the following option specify a character formatted time string, rather than just a plain character string:
- --marq-marquee
- --snapshot-prefix
- --sout-file-format
- --sout-livehttp-index
Time variables are those defined by the strftime C function. The following expansions are most common:
- %Y : year
- %m : month
- %d : day
- %H : hour
- %M : minute
- %S : second
For an extensive list have a look at [1] (or the strftime manual page on Unix systems).
Input meta
The following VLC-specific meta-data expansions are available for the --input-title-formato ption:
- $a : artist
- $b : album
- $c : copyright
- $d : description
- $e : encoded by
- $f : total decoded frame count (since VLC started)
- $g : genre
- $l : language
- $n : track number
- $p : now playing
- $r : rating
- $s : subtitles language
- $t : title
- $u : url
- $A : date
- $B : audio bitrate (in kb/s)
- $C : chapter (as in DVD chapter number)
- $D : duration
- $F : full name with path
- $I : title (as in DVD title number)
- $L : time left
- $N : name (media name as seen in the VLC playlist)
- $O : audio language
- $P : position (in %)
- $R : rate
- $S : audio sample rate (in kHz)
- $T : time code of the video
- $U : publisher
- $V : volume
- $_ : new line
- $<any other char> : <any other char> (for example: $$ transforms to $)
You can insert a space between the $ sign and the character to tell it to not display anything if the meta data isn't available. For example: $ T instead will display "" if no time is available while $T would display something like "01_22_13" (for a snapshot from one hour, 22 minutes and 13 seconds in a video).
Source code
If you want to know how this works, check out src\text\strings.c (str_format_meta function)[2]
Please read the Documentation Editing Guidelines before you edit the documentation