Difference between revisions of "Template:Codec"

From VideoLAN Wiki
Jump to navigation Jump to search
 
(This is a meta-template)
Line 2: Line 2:
 
|id={{{id|{{{1|??}}}}}}
 
|id={{{id|{{{1|??}}}}}}
 
|text=<!--
 
|text=<!--
Line 1: -->This is an [[Codec#Audio|audio codec]]. The name to use at the [[command line]] is '''{{{id|{{{1|unknown}}}}}}'''{{#if:{{{altid|}}}|, but you can also use '''{{{altid}}}'''{{#if:{{{altid2|}}}|, or '''{{{altid2}}}'''}}}}.<!--
+
Line 1: -->This is <!--
 +
-->{{#switch:{{{type}}}<!--
 +
  -->|audio    = an [[Codec#Audio|audio codec]]<!--
 +
  -->|video    = a [[Codec#Video|video codec]]<!--
 +
  -->|#default = a [[codec]]<!--
 +
-->}}. The name to use at the [[command line]] is '''{{{id|{{{1|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: -->{{#ifeq:{{{encoder|n}}}|y|<br />VLC can '''encode''' using this codec.}}<!--
 
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.}}
|bgcol=#f0fcfc
+
|bgcol={{#switch:{{{type}}}<!--
|brcol=#a0c0c0
+
      -->| audio    = #f0fcfc<!--
}} <includeonly>[[Category:Audio codecs]] [[Category:codecs]]</includeonly><noinclude>
+
      -->| video    = #fcf0fc<!--
 +
      -->| #default = White<!--
 +
    -->}}
 +
|brcol={{#switch:{{{type}}}<!--
 +
      -->| audio    = #a0c0c0<!--
 +
      -->| video    = #c0a0c0<!--
 +
      -->| #default = #aaa<!--
 +
    -->}}
 +
}} <includeonly>{{#switch:{{{type}}}<!--
 +
              -->| audio    = [[Category:Audio codecs]] [[Category:Codecs]]<!--
 +
              -->| video    = [[Category:Video codecs]] [[Category:Codecs]]<!--
 +
              -->| #default =                          [[Category:Codecs]]<!--
 +
            -->}}</includeonly><noinclude>
 
<!-------------------- Documentation goes below this line --------------------->
 
<!-------------------- Documentation goes below this line --------------------->
For audio codecs.
+
A meta-template for codecs.
  
 
Usage:
 
Usage:
  <nowiki>{{codec audio | id= | altid= | altid2= | encoder= | for= | mod= }}</nowiki>
+
  <nowiki>{{codec |type= | id= | altid= | altid2= | encoder= | for= | mod= }}</nowiki>
  
You should supply id, the rest are optional.
+
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
 
* 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 <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
Line 22: Line 40:
  
 
== See also ==
 
== See also ==
 +
* {{tl|Codec}}
 
* {{tl|Codec audio}}
 
* {{tl|Codec audio}}
 
* {{tl|Codec video}}
 
* {{tl|Codec video}}

Revision as of 08:44, 17 March 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."

See also