1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>asfmux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual"> 8<link rel="up" href="ch01.html" title="gst-plugins-bad Elements"> 9<link rel="prev" href="gst-plugins-bad-plugins-aiffparse.html" title="aiffparse"> 10<link rel="next" href="gst-plugins-bad-plugins-asfparse.html" title="asfparse"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#gst-plugins-bad-plugins-asfmux.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-bad-plugins-asfmux.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 20 <a href="#gst-plugins-bad-plugins-asfmux.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> 21 <a href="#gst-plugins-bad-plugins-asfmux.properties" class="shortcut">Properties</a></span> 22</td> 23<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 24<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 25<td><a accesskey="p" href="gst-plugins-bad-plugins-aiffparse.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 26<td><a accesskey="n" href="gst-plugins-bad-plugins-asfparse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 27</tr></table> 28<div class="refentry"> 29<a name="gst-plugins-bad-plugins-asfmux"></a><div class="titlepage"></div> 30<div class="refnamediv"><table width="100%"><tr> 31<td valign="top"> 32<h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-asfmux.top_of_page"></a>asfmux</span></h2> 33<p>asfmux</p> 34</td> 35<td class="gallery_image" valign="top" align="right"></td> 36</tr></table></div> 37<div class="refsect1"> 38<a name="gst-plugins-bad-plugins-asfmux.properties"></a><h2>Properties</h2> 39<div class="informaltable"><table class="informaltable" border="0"> 40<colgroup> 41<col width="150px" class="properties_type"> 42<col width="300px" class="properties_name"> 43<col width="200px" class="properties_flags"> 44</colgroup> 45<tbody> 46<tr> 47<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 48<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux--is-live" title="The “is-live” property">is-live</a></td> 49<td class="property_flags">Read / Write</td> 50</tr> 51<tr> 52<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 53<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux--merge-stream-tags" title="The “merge-stream-tags” property">merge-stream-tags</a></td> 54<td class="property_flags">Read / Write / Construct</td> 55</tr> 56<tr> 57<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> 58<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux--packet-size" title="The “packet-size” property">packet-size</a></td> 59<td class="property_flags">Read / Write / Construct</td> 60</tr> 61<tr> 62<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td> 63<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux--padding" title="The “padding” property">padding</a></td> 64<td class="property_flags">Read / Write / Construct</td> 65</tr> 66<tr> 67<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td> 68<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux--preroll" title="The “preroll” property">preroll</a></td> 69<td class="property_flags">Read / Write / Construct</td> 70</tr> 71<tr> 72<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 73<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux--streamable" title="The “streamable” property">streamable</a></td> 74<td class="property_flags">Read / Write / Construct</td> 75</tr> 76</tbody> 77</table></div> 78</div> 79<a name="GstAsfMux"></a><div class="refsect1"> 80<a name="gst-plugins-bad-plugins-asfmux.other"></a><h2>Types and Values</h2> 81<div class="informaltable"><table class="informaltable" width="100%" border="0"> 82<colgroup> 83<col width="150px" class="name"> 84<col class="description"> 85</colgroup> 86<tbody><tr> 87<td class="datatype_keyword">struct</td> 88<td class="function_name"><a class="link" href="gst-plugins-bad-plugins-asfmux.html#GstAsfMux-struct" title="struct GstAsfMux">GstAsfMux</a></td> 89</tr></tbody> 90</table></div> 91</div> 92<div class="refsect1"> 93<a name="gst-plugins-bad-plugins-asfmux.object-hierarchy"></a><h2>Object Hierarchy</h2> 94<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 95 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 96 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 97 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 98 <span class="lineart">╰──</span> GstAsfMux 99</pre> 100</div> 101<div class="refsect1"> 102<a name="gst-plugins-bad-plugins-asfmux.implemented-interfaces"></a><h2>Implemented Interfaces</h2> 103<p> 104GstAsfMux implements 105 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagSetter.html#GstTagSetter-struct">GstTagSetter</a>.</p> 106</div> 107<div class="refsect1"> 108<a name="gst-plugins-bad-plugins-asfmux.description"></a><h2>Description</h2> 109<p>Muxes media into an ASF file/stream.</p> 110<p>Pad names are either video_xx or audio_xx, where 'xx' is the 111stream number of the stream that goes through that pad. Stream numbers 112are assigned sequentially, starting from 1.</p> 113<div class="refsect3"> 114<a name="id-1.2.8.8.4"></a><h4>Example launch lines</h4> 115<p>(write everything in one line, without the backslash characters)</p> 116<div class="informalexample"> 117 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 118 <tbody> 119 <tr> 120 <td class="listing_lines" align="right"><pre>1 1212 1223 1234 1245</pre></td> 125 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">250</span> \ 126<span class="gtkdoc opt">!</span> <span class="string">"video/x-raw,format=(string)I420,framerate=(fraction)25/1"</span> <span class="gtkdoc opt">!</span> avenc_wmv2 \ 127<span class="gtkdoc opt">!</span> asfmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>asf \ 128audiotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">440</span> <span class="gtkdoc opt">!</span> audioconvert \ 129<span class="gtkdoc opt">!</span> <span class="string">"audio/x-raw,rate=44100"</span> <span class="gtkdoc opt">!</span> avenc_wmav2 <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span></pre></td> 130 </tr> 131 </tbody> 132 </table> 133</div> 134 135<p> This creates an ASF file containing an WMV video stream 136with a test picture and WMA audio stream of a test sound.</p> 137</div> 138<div class="refsect3"> 139<a name="id-1.2.8.8.5"></a><h4>Live streaming</h4> 140<p>asfmux and rtpasfpay are capable of generating a live asf stream. 141asfmux has to set its 'streamable' property to true, because in this 142mode it won't try to seek back to the start of the file to replace 143some fields that couldn't be known at the file start. In this mode, 144it won't also send indexes at the end of the data packets (the actual 145media content) 146the following pipelines are an example of this usage. 147(write everything in one line, without the backslash characters) 148Server (sender)</p> 149<div class="informalexample"> 150 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 151 <tbody> 152 <tr> 153 <td class="listing_lines" align="right"><pre>1 1542 1553</pre></td> 156 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>ve videotestsrc <span class="gtkdoc opt">!</span> avenc_wmv2 <span class="gtkdoc opt">!</span> asfmux name<span class="gtkdoc opt">=</span>mux streamable<span class="gtkdoc opt">=</span><span class="keyword">true</span> \ 157<span class="gtkdoc opt">!</span> rtpasfpay <span class="gtkdoc opt">!</span> udpsink host<span class="gtkdoc opt">=</span><span class="number">127.0.0.1</span> port<span class="gtkdoc opt">=</span><span class="number">3333</span> \ 158audiotestsrc <span class="gtkdoc opt">!</span> avenc_wmav2 <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span></pre></td> 159 </tr> 160 </tbody> 161 </table> 162</div> 163 164<p> 165Client (receiver)</p> 166<div class="informalexample"> 167 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 168 <tbody> 169 <tr> 170 <td class="listing_lines" align="right"><pre>1 1712 1723 1734</pre></td> 174 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> udpsrc port<span class="gtkdoc opt">=</span><span class="number">3333</span> <span class="gtkdoc opt">!</span> <span class="string">"caps_from_rtpasfpay_at_sender"</span> \ 175<span class="gtkdoc opt">!</span> rtpasfdepay <span class="gtkdoc opt">!</span> decodebin name<span class="gtkdoc opt">=</span>d <span class="gtkdoc opt">!</span> queue \ 176<span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> autovideosink \ 177d<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> autoaudiosink</pre></td> 178 </tr> 179 </tbody> 180 </table> 181</div> 182 183<p></p> 184</div> 185<div class="refsynopsisdiv"> 186<h2>Synopsis</h2> 187<div class="refsect2"> 188<a name="id-1.2.8.8.6.1"></a><h3>Element Information</h3> 189<div class="variablelist"><table border="0" class="variablelist"> 190<colgroup> 191<col align="left" valign="top"> 192<col> 193</colgroup> 194<tbody> 195<tr> 196<td><p><span class="term">plugin</span></p></td> 197<td> 198 <a class="link" href="gst-plugins-bad-plugins-plugin-asfmux.html#plugin-asfmux">asfmux</a> 199 </td> 200</tr> 201<tr> 202<td><p><span class="term">author</span></p></td> 203<td>Thiago Santos <thiagoss@embedded.ufcg.edu.br></td> 204</tr> 205<tr> 206<td><p><span class="term">class</span></p></td> 207<td>Codec/Muxer</td> 208</tr> 209</tbody> 210</table></div> 211</div> 212<hr> 213<div class="refsect2"> 214<a name="id-1.2.8.8.6.2"></a><h3>Element Pads</h3> 215<div class="variablelist"><table border="0" class="variablelist"> 216<colgroup> 217<col align="left" valign="top"> 218<col> 219</colgroup> 220<tbody> 221<tr> 222<td><p><span class="term">name</span></p></td> 223<td>audio_%u</td> 224</tr> 225<tr> 226<td><p><span class="term">direction</span></p></td> 227<td>sink</td> 228</tr> 229<tr> 230<td><p><span class="term">presence</span></p></td> 231<td>request</td> 232</tr> 233<tr> 234<td><p><span class="term">details</span></p></td> 235<td>audio/x-wma, wmaversion=(int)[ 1, 3 ]</td> 236</tr> 237<tr> 238<td><p><span class="term"></span></p></td> 239<td> audio/mpeg, layer=(int)3, mpegversion=(int)1, channels=(int)[ 1, 2 ], rate=(int)[ 8000, 96000 ]</td> 240</tr> 241</tbody> 242</table></div> 243<div class="variablelist"><table border="0" class="variablelist"> 244<colgroup> 245<col align="left" valign="top"> 246<col> 247</colgroup> 248<tbody> 249<tr> 250<td><p><span class="term">name</span></p></td> 251<td>video_%u</td> 252</tr> 253<tr> 254<td><p><span class="term">direction</span></p></td> 255<td>sink</td> 256</tr> 257<tr> 258<td><p><span class="term">presence</span></p></td> 259<td>request</td> 260</tr> 261<tr> 262<td><p><span class="term">details</span></p></td> 263<td>video/x-wmv, wmvversion=(int)[ 1, 3 ]</td> 264</tr> 265</tbody> 266</table></div> 267<div class="variablelist"><table border="0" class="variablelist"> 268<colgroup> 269<col align="left" valign="top"> 270<col> 271</colgroup> 272<tbody> 273<tr> 274<td><p><span class="term">name</span></p></td> 275<td>src</td> 276</tr> 277<tr> 278<td><p><span class="term">direction</span></p></td> 279<td>source</td> 280</tr> 281<tr> 282<td><p><span class="term">presence</span></p></td> 283<td>always</td> 284</tr> 285<tr> 286<td><p><span class="term">details</span></p></td> 287<td>video/x-ms-asf, parsed=(boolean)true</td> 288</tr> 289</tbody> 290</table></div> 291</div> 292</div> 293</div> 294<div class="refsect1"> 295<a name="gst-plugins-bad-plugins-asfmux.functions_details"></a><h2>Functions</h2> 296<p></p> 297</div> 298<div class="refsect1"> 299<a name="gst-plugins-bad-plugins-asfmux.other_details"></a><h2>Types and Values</h2> 300<div class="refsect2"> 301<a name="GstAsfMux-struct"></a><h3>struct GstAsfMux</h3> 302<pre class="programlisting">struct GstAsfMux;</pre> 303</div> 304</div> 305<div class="refsect1"> 306<a name="gst-plugins-bad-plugins-asfmux.property-details"></a><h2>Property Details</h2> 307<div class="refsect2"> 308<a name="GstAsfMux--is-live"></a><h3>The <code class="literal">“is-live”</code> property</h3> 309<pre class="programlisting"> “is-live” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 310<p>Deprecated in 0.10.20, use 'streamable' instead.</p> 311<p>Flags: Read / Write</p> 312<p>Default value: FALSE</p> 313</div> 314<hr> 315<div class="refsect2"> 316<a name="GstAsfMux--merge-stream-tags"></a><h3>The <code class="literal">“merge-stream-tags”</code> property</h3> 317<pre class="programlisting"> “merge-stream-tags” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 318<p>If the stream metadata (received as events in the sink) should be merged to the main file metadata.</p> 319<p>Flags: Read / Write / Construct</p> 320<p>Default value: TRUE</p> 321</div> 322<hr> 323<div class="refsect2"> 324<a name="GstAsfMux--packet-size"></a><h3>The <code class="literal">“packet-size”</code> property</h3> 325<pre class="programlisting"> “packet-size” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> 326<p>The ASF packets size (bytes).</p> 327<p>Flags: Read / Write / Construct</p> 328<p>Allowed values: >= 18</p> 329<p>Default value: 4800</p> 330</div> 331<hr> 332<div class="refsect2"> 333<a name="GstAsfMux--padding"></a><h3>The <code class="literal">“padding”</code> property</h3> 334<pre class="programlisting"> “padding” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre> 335<p>Size of the padding object to be added to the end of the header. If this less than 24 (the smaller size of an ASF object), no padding is added.</p> 336<p>Flags: Read / Write / Construct</p> 337<p>Default value: 0</p> 338</div> 339<hr> 340<div class="refsect2"> 341<a name="GstAsfMux--preroll"></a><h3>The <code class="literal">“preroll”</code> property</h3> 342<pre class="programlisting"> “preroll” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre> 343<p>The preroll time (milisecs).</p> 344<p>Flags: Read / Write / Construct</p> 345<p>Default value: 5000</p> 346</div> 347<hr> 348<div class="refsect2"> 349<a name="GstAsfMux--streamable"></a><h3>The <code class="literal">“streamable”</code> property</h3> 350<pre class="programlisting"> “streamable” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 351<p>If set to true, the output should be as if it is to be streamed and hence no indexes written or duration written.</p> 352<p>Flags: Read / Write / Construct</p> 353<p>Default value: FALSE</p> 354</div> 355</div> 356</div> 357<div class="footer"> 358<hr>Generated by GTK-Doc V1.28</div> 359</body> 360</html>