Difference between revisions of "Template:Codec"

From VideoLAN Wiki
Jump to navigation Jump to search
m (But what if I pass it raw?)
m (Not sure about H.262)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{top box
 
{{top box
|id={{{id|??}}}
+
|id={{#if:{{{id|}}}|{{{id}}}|??[[Category:Codecs missing ids]]}}
 
|text=<!--
 
|text=<!--
 
Line 1: -->This is <!--
 
Line 1: -->This is <!--
Line 7: Line 7:
 
   -->|video    = a [[Codec#Video|video codec]]<!--
 
   -->|video    = a [[Codec#Video|video codec]]<!--
 
   -->|#default = a [[codec]]<!--
 
   -->|#default = a [[codec]]<!--
-->}}. The name to use at the [[command line]] is '''{{{id|unknown}}}'''{{#if:{{{altid|}}}|, but you can also use '''{{{altid}}}'''{{#if:{{{altid2|}}}|, or '''{{{altid2}}}'''}}}}.<!--
+
-->}}. The name to use at the [[command line]] is {{#if:{{{id|}}}|'''{{{id}}}'''|unknown}}{{#if:{{{altid|}}}|, but you can also use '''{{{altid}}}'''{{#if:{{{altid2|}}}|, or '''{{{altid2}}}'''}}}}.<!--
Line 2: -->{{#ifeq:{{{encoder|n}}}|y|<br />VLC can '''encode''' using this codec.}}<!--
+
Line 2: -->{{#switch:{{{encoder|n}}}<!--
 +
          -->|y             = <br />VLC can '''encode''' using this codec.<!--
 +
          -->|n            = <!--
 +
          -->|{{{encoder}}} = <br />VLC can '''encode''' using this codec through the [[Documentation:Modules/{{{encoder}}}|{{{encoder}}}]] module.<!--
 +
        -->}}<!--
 
Line 3: -->{{#if:{{{for|}}}| <br />This codec can be used inside the {{{for}}} containers.}}<!--
 
Line 3: -->{{#if:{{{for|}}}| <br />This codec can be used inside the {{{for}}} containers.}}<!--
 
Line 4: -->{{#if:{{{mod|}}}| <br />This codec is from the [[Documentation:Modules/{{{mod}}}|{{{mod}}}]] module.}}
 
Line 4: -->{{#if:{{{mod|}}}| <br />This codec is from the [[Documentation:Modules/{{{mod}}}|{{{mod}}}]] module.}}
Line 37: Line 41:
 
* for: a list of containers this codec is compatible with. Put the names in <nowiki>[[ ]]</nowiki> so they link properly
 
* for: a list of containers this codec is compatible with. Put the names in <nowiki>[[ ]]</nowiki> so they link properly
 
* mod: module name from [[Documentation:Modules]]
 
* mod: module name from [[Documentation:Modules]]
* encoder: if equal to <kbd>y</kbd>, display a message, currently "VLC can '''encode''' using this codec."
+
* encoder:
 +
** If equal to <kbd>y</kbd>, display a message, currently "<samp>VLC can '''encode''' using this codec.</samp>"
 +
** If equal to <kbd>n</kbd> (default), do nothing
 +
** All other values attempt to link to a module of that name (even if it doesn't exist!). Useful for e.g. H.264 and H.265, which decode and encode through separate modules
  
 
== See also ==
 
== See also ==

Latest revision as of 06:24, 13 April 2019

??
This is a codec. The name to use at the command line is unknown.

A meta-template for codecs.

Usage:

{{codec |type= | id= | altid= | altid2= | encoder= | for= | mod= }}

You should supply type and id, the rest are optional.

  • type: the type of codec, currently audio or video
  • id: the module name for the codec. If other shortcuts to the same module exist, also list them with altid, or altid and altid2
  • for: a list of containers this codec is compatible with. Put the names in [[ ]] so they link properly
  • mod: module name from Documentation:Modules
  • encoder:
    • If equal to y, display a message, currently "VLC can encode using this codec."
    • If equal to n (default), do nothing
    • All other values attempt to link to a module of that name (even if it doesn't exist!). Useful for e.g. H.264 and H.265, which decode and encode through separate modules

See also