This commit is contained in:
stpeter 2011-06-12 15:06:56 -06:00
parent 1a83435ac1
commit da3c671a9b
1 changed files with 26 additions and 79 deletions

View File

@ -6,8 +6,8 @@
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Codecs for Jingle RTP Sessions</title>
<abstract>This document describes implementation considerations related to voice and video codecs for use in Jingle RTP sessions.</abstract>
<title>Codecs for Jingle Audio</title>
<abstract>This document describes implementation considerations related to audio codecs for use in Jingle RTP sessions.</abstract>
&LEGALNOTICE;
<number>0266</number>
<status>Experimental</status>
@ -23,6 +23,12 @@
<shortname>N/A</shortname>
<discuss>jingle</discuss>
&stpeter;
<revision>
<version>0.5</version>
<date>2011-06-12</date>
<initials>psa</initials>
<remark><p>Moved video codecs to XEP-0299.</p></remark>
</revision>
<revision>
<version>0.4</version>
<date>2011-06-09</date>
@ -74,24 +80,23 @@
</header>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0167; defines the &xep0166; signalling exchanges needed to establish voice and video chat using the Real-time Transport Protocol &rfc3550;; however, it does not discuss the matter of voice and video codecs, since the state of codec technologies is more fluid than the signalling interactions. This document fills that gap by providing guidance to Jingle developers regarding voice and video codecs.</p>
<p>&xep0167; defines the &xep0166; signalling exchanges needed to establish voice chat and other audio sessions using the Real-time Transport Protocol &rfc3550;; however, it does not say which audio codecs are mandatory-to-implement, since the state of codec technologies is more fluid than the signalling interactions. This document fills that gap by providing guidance to Jingle developers regarding audio codecs.</p>
<p>Because codec technologies are typically subject to patents, the topics discussed here are controversial. This document attempts to steer a middle path between (1) specifying mandatory-to-implement technologies that realistically will not be implemented and deployed and (2) providing guidelines that, while realistic, do not encourage the implementation and deployment of patent-clear technologies.</p>
<p class='box'>Please note that this document is strictly informational and does not (yet) provide binding recommendations to the XMPP developer community regarding mandatory-to-implement technologies; however, it is expected that this document will provide input that the &XSF; could use in making such recommendations. Furthermore, it is expected that any recommendations that might be made by the XSF would need to be modified over time as the technology landscape changes.</p>
</section1>
<section1 topic='Basic Considerations' anchor='basics'>
<p>The ideal codec would meet the following criteria:</p>
<p>The ideal audio codec would meet the following criteria:</p>
<dl>
<di><dt>Quality</dt><dd>The encoding quality is acceptable for deployment among XMPP users.</dd></di>
<di><dt>Packetization</dt><dd>The specification of the codec clearly defines packetization of data for sending over RTP.</dd></di>
<di><dt>Availability</dt><dd>The codec can be implemented on a wide variety of computing platforms and is commonly used in Internet or other systems.</dd></di>
<di><dt>Patents</dt><dd>The codec is patent-clear. <note>The term patent-clear does not necessarily mean that no patents have ever been applied for or granted regarding a technology, or that the technology is completely free from patents (since such a judgment is nearly impossible to make, and is outside the purview of the XMPP developer community and the XMPP Standards Foundation); the term means only that those who implement the technology are generally understood to be relatively safe from the threat of patent litigation, either because any relevant patents have expired, were filed in a defensive manner, or are made available under suitable royalty-free licenses.</note> (Although most XMPP developers would prefer to implement codecs that are patent-clear, such options are not always widely implemented and deployed.)</dd></di>
</dl>
<p>Unfortunately, not all codecs are ideal. In the remainder of this document we discuss the audio and video codecs that are most appropriate for implementation in Jingle RTP applications.</p>
<p>Unfortunately, not all codecs meet those criteria. In the remainder of this document we discuss the audio codecs that are most appropriate for implementation in Jingle RTP applications.</p>
</section1>
<section1 topic='Audio Codecs' anchor='audio'>
<section2 topic='G.711' anchor='audio-g711'>
<section1 topic='Codecs' anchor='codecs'>
<section2 topic='G.711' anchor='codecs-g711'>
<p>G.711 refers to the Pulse Code Modulation (PCM) codec defined in &ITU; recommendation G.711, which is widely used on the public switched telephone network (PSTN) and by many voice over Internet Protocol (VoIP) providers. There are two versions: the &#956;-law ("U-law") version is widely deployed in North America and in Japan, whereas the A-law version is widely deployed in the rest of the world. The following table summarizes the available information about G.711.</p>
<table caption='Codec Considerations for G.711'>
<tr>
@ -108,7 +113,7 @@
</tr>
</table>
</section2>
<section2 topic='Opus' anchor='audio-opus'>
<section2 topic='Opus' anchor='codecs-opus'>
<p>The Opus codec is under development within the IETF's <link url='http://tools.ietf.org/wg/codec/'>Codec Working Group</link>. In essence it combines the best features of CELT (developed by Jean-Marc Valin, the creator of Speex) and SILK (created by and widely used in the Skype service). The following table summarizes the available information about Opus.</p>
<table caption='Codec Considerations for Opus'>
<tr>
@ -125,7 +130,7 @@
</tr>
</table>
</section2>
<section2 topic='Speex' anchor='audio-speex'>
<section2 topic='Speex' anchor='codecs-speex'>
<p>According to the speex.org website, the Speex codec is "an Open Source/Free Software patent-free audio compression format designed for speech". Speex was developed by Jean-Marc Valin and is maintained by the <link url='http://www.xiph.org/'>Xiph.org Foundation</link>. The following table summarizes the available information about Speex.</p>
<table caption='Codec Considerations for Speex'>
<tr>
@ -142,77 +147,19 @@
</tr>
</table>
</section2>
<section2 topic='Guidance for Implementers' anchor='audio-impl'>
<p>Given that both Speex and G.711 are patent-clear, freely implementable, and commonly deployed, implementers are encouraged to consider including support for both codecs in audio applications of Jingle RTP sessions. Discussion on the jingle@xmpp.org mailing list indicates a slight preference for G.711 because it is so widely deployed and easily available. The Opus codec is not yet widely deployed (or even fully developed), but it might become the "codec of the future" for audio applications over the Internet.</p>
</section2>
<section2 topic='Mandatory-to-Implement Codec' anchor='audio-mti'>
<p>As of June 2011, this document makes the following recommendations:</p>
<ol>
<li>Jingle clients MUST implement both PCMU and PCMA.</li>
<li>Gateways between Jingle networks and other networks (e.g., SIP networks and the PSTN) MUST implement either PCMA or PCMA.</li>
</ol>
<p>Naturally, clients and gateways can implement additional codecs, such as those listed in this document.</p>
</section2>
</section1>
<section1 topic='Video' anchor='video'>
<section2 topic='Dirac' anchor='video-dirac'>
<p>Dirac is a general-purpose video compression technology developed by the BBC that has been licensed in the open. It is used for everything from Internet streaming to HDTV. To date there is no RTP packetization deveintion for Dirac; however, such a format is under development.</p>
<table caption='Codec Considerations for Dirac'>
<tr>
<th>Quality</th>
<th>Packetization</th>
<th>Availability</th>
<th>Patents</th>
</tr>
<tr>
<td>High quality.</td>
<td>Not yet defined.</td>
<td>Freely downloadable under both GPL and LGPL at &lt;<link url='http://diracvideo.org/'>http://diracvideo.org/</link>&gt;; commonly deployed but not yet in video over IP systems because of the lack of an RTP packetization format.</td>
<td>Diract is patent-clear, and the BBC has allowed its related patents to lapse.</td>
</tr>
</table>
</section2>
<section2 topic='H.264' anchor='video-h264'>
<p>H.264 is a technology for video compression jointly designed by the ITU and the &ISO;. The following table summarizes the available information about H.264.</p>
<table caption='Codec Considerations for H.264'>
<tr>
<th>Quality</th>
<th>Packetization</th>
<th>Availability</th>
<th>Patents</th>
</tr>
<tr>
<td>High quality.</td>
<td>See &rfc3984;.</td>
<td>Commonly deployed in commercial video systems. Not freely downloadable; both software implementations and service deployments can be subject to royalty payments for commercial use.</td>
<td>Patented.</td>
</tr>
</table>
</section2>
<section2 topic='Theora' anchor='video-theora'>
<p>According to the theora.org website, the Theora codec is "a free and open video compression format". Theora is based on the VP3 codec originally developed by On2 Technologies and is now maintained by the <link url='http://www.xiph.org/'>Xiph.org Foundation</link>. The following table summarizes the available information about Theora.</p>
<table caption='Codec Considerations for Theora'>
<tr>
<th>Quality</th>
<th>Packetization</th>
<th>Availability</th>
<th>Patents</th>
</tr>
<tr>
<td>Acceptable quality.</td>
<td>See &rtptheora;.</td>
<td>Freely downloadable under BSD license at &lt;<link url='http://theora.org/'>http://theora.org/</link>&gt;; not yet commonly deployed, especially on devices that have deployed H.264 instead.</td>
<td>On2's patents over VP3 were contributed to the Xiph.org Foundation in 2001.</td>
</tr>
</table>
</section2>
<section2 topic='Guidance for Implementers' anchor='video-impl'>
<p>The situation regarding video codecs is more murky, and implementers face difficult tradeoffs. Although Theora is patent-clear and freely implementable, it is not yet commonly deployed. Although Dirac is patent-clear and deployed fairly widely, no RTP packetization format has been defined for it. Although deployment of H.264 is fairly common, it is not patent-clear or freely implementable. For many open-source / free software projects and smaller technology vendors, implementation of H.264 is either impossible (because of patents and licensing restrictions) or prohibitively expensive (because of royalty payments). These developers are strongly encouraged to implement Theora or Dirac and also to urge wider adoption of Theora and Dirac among larger technology vendors. However, this document acknowledges that it may take some time before Theora and Dirac are commonly deployed (especially on mobile devices) and that systems based on H.264 might be dominant in the marketplace for several years. This situation is unfortunate but cannot be directly changed by the XMPP developer community.</p>
</section2>
<section2 topic='Mandatory-to-Implement Codec' anchor='video-mti'>
<p>Because video codecs are not as mature as audio codecs, it is not yet possible for the XSF to recommend a mandatory-to-implement technology for video codecs. However, it might be possible to recommend Theora or Dirac in the future if they are more widely adopted.</p>
</section2>
<section1 topic='Guidance for Implementers' anchor='impl'>
<p>Given that both Speex and G.711 are patent-clear, freely implementable, and commonly deployed, implementers are encouraged to consider including support for both codecs in audio applications of Jingle RTP sessions. Discussion on the jingle@xmpp.org mailing list indicates a slight preference for G.711 because it is easily available and so widely deployed (e.g., in SIP networks and the PSTN). The Opus codec is not yet widely deployed (or even fully developed), but it might become the "codec of the future" for audio applications over the Internet.</p>
</section1>
<section1 topic='Mandatory-to-Implement Codecs' anchor='mti'>
<p>As of June 2011, this document makes the following recommendations:</p>
<ol>
<li>Jingle clients MUST implement both PCMU and PCMA.</li>
<li>Gateways between Jingle networks and other networks (e.g., SIP networks and the PSTN) MUST implement either PCMU or PCMA (and preferably both).</li>
</ol>
<p>Naturally, clients and gateways can implement additional codecs, such as those listed in this document.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>