Difference between revisions of "Documentation:Format String"
(→Source code: spelling; created footnote) |
|||
Line 60: | Line 60: | ||
==Source code== | ==Source code== | ||
− | If you want to know | + | 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 13:29, 29 July 2010
Starting with VLC media player 0.9.0, format string variables can be used with the following options:
- --marq-marquee
- --snapshot-path (when specifying a full image path, not a directory)
- --snapshot-prefix
- --image-out-prefix (or --scene-prefix in 1.0.0 and newer)
- --msn-format (windows only)
- file access output dst/url (like in std{access=file,mux=ts,dst=THIS})
There are two kinds of format string variables: time variables and meta variables.
Time
Time variables are those defined by the strftime C function. Those include:
- %Y : year
- %m : month
- %d : day
- %H : hour
- %M : minute
- %S : second
For an extensive list have a look at man strftime.
Meta
Meta variables are VLC specific. The complete list is:
- $a : artist
- $b : album
- $c : copyright
- $d : description
- $e : encoded by
- $f : frame count
- $g : genre
- $l : language
- $n : track num
- $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)[1]
Please read the Documentation Editing Guidelines before you edit the documentation