Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ffmpeg-doc / usr / share / doc / ffmpeg-doc / api / group__libavf.html
Size: Mime:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FFmpeg: I/O and Muxing/Demuxing Library</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">FFmpeg
   &#160;<span id="projectnumber">2.7.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#files">Files</a>  </div>
  <div class="headertitle">
<div class="title">I/O and Muxing/Demuxing Library</div>  </div>
</div><!--header-->
<div class="contents">

<p>Libavformat (lavf) is a library for dealing with various media container formats.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="groups"></a>
Modules</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__decoding.html">Demuxing</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Demuxers read a media file and split it into chunks of data (<em>packets</em>). </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__encoding.html">Muxing</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Muxers take encoded data in the form of <a class="el" href="structAVPacket.html">AVPackets</a> and write it into files or other output bytestreams in the specified container format. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__io.html">I/O Read/Write</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__codec.html">Demuxers</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__protos.html">I/O Protocols</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__internal.html">Internal</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__metadata__api.html">Public Metadata API</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>The metadata API allows libavformat to export metadata tags to a client application when demuxing. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__core.html">Core functions</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Functions for querying libavformat capabilities, allocating core structures, etc. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavf__misc.html">Utility functions</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Miscellaneous utility functions related to both muxing and demuxing (or neither). </p>
<br/></td></tr>
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="avformat_8h.html">avformat.h</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Main libavformat public API header. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libavformat_2version_8h.html">version.h</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Libavformat version macros. </p>
<br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Libavformat (lavf) is a library for dealing with various media container formats. </p>
<p>Its main two purposes are demuxing - i.e. splitting a media file into component streams, and the reverse process of muxing - writing supplied data in a specified container format. It also has an <a class="el" href="group__lavf__io.html">I/O module</a> which supports a number of protocols for accessing the data (e.g. file, tcp, http and others). Before using lavf, you need to call <a class="el" href="group__lavf__core.html#ga917265caec45ef5a0646356ed1a507e3" title="Initialize libavformat and register all the muxers, demuxers and protocols.">av_register_all()</a> to register all compiled muxers, demuxers and protocols. Unless you are absolutely sure you won't use libavformat's network capabilities, you should also call <a class="el" href="group__lavf__core.html#ga84542023693d61e8564c5d457979c932" title="Do global initialization of network components.">avformat_network_init()</a>.</p>
<p>A supported input format is described by an <a class="el" href="structAVInputFormat.html">AVInputFormat</a> struct, conversely an output format is described by <a class="el" href="structAVOutputFormat.html">AVOutputFormat</a>. You can iterate over all registered input/output formats using the <a class="el" href="group__lavf__core.html#ga64ff7d30d32639e69fe57f99bb48f680" title="If f is NULL, returns the first registered input format, if f is non-NULL, returns the next registere...">av_iformat_next()</a> / <a class="el" href="group__lavf__core.html#ga8fe016b9e8df67a5ffde855f2f891d71" title="If f is NULL, returns the first registered output format, if f is non-NULL, returns the next register...">av_oformat_next()</a> functions. The protocols layer is not part of the public API, so you can only get the names of supported protocols with the <a class="el" href="avio_8h.html#a50fda7362db877e8b9e493650c9e3fb3" title="Iterate through names of available protocols.">avio_enum_protocols()</a> function.</p>
<p>Main lavf structure used for both muxing and demuxing is <a class="el" href="structAVFormatContext.html" title="Format I/O context.">AVFormatContext</a>, which exports all information about the file being read or written. As with most Libavformat structures, its size is not part of public ABI, so it cannot be allocated on stack or directly with <a class="el" href="group__lavu__mem.html#ga9722446c5e310ffedfaac9489864796d" title="Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...">av_malloc()</a>. To create an <a class="el" href="structAVFormatContext.html" title="Format I/O context.">AVFormatContext</a>, use <a class="el" href="group__lavf__core.html#gac7a91abf2f59648d995894711f070f62" title="Allocate an AVFormatContext.">avformat_alloc_context()</a> (some functions, like <a class="el" href="group__lavf__decoding.html#ga10a404346c646e4ab58f4ed798baca32" title="Open an input stream and read the header.">avformat_open_input()</a> might do that for you).</p>
<p>Most importantly an <a class="el" href="structAVFormatContext.html" title="Format I/O context.">AVFormatContext</a> contains: </p>
<ul>
<li>the <a class="el" href="structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374">input</a> or <a class="el" href="structAVFormatContext.html#a20d80ac07e38ff5c268d15aaf2798b98">output</a> format. It is either autodetected or set by user for input; always set by user for output. </li>
<li>an <a class="el" href="structAVFormatContext.html#acfefb6b6cf21e87a0dcbd1a547ba2348">array</a> of AVStreams, which describe all elementary streams stored in the file. AVStreams are typically referred to using their index in this array. </li>
<li>an <a class="el" href="structAVFormatContext.html#a1e7324262b6b78522e52064daaa7bc87">I/O context</a>. It is either opened by lavf or set by user for input, always set by user for output (unless you are dealing with an AVFMT_NOFILE format).</li>
</ul>
<h2><a class="anchor" id="lavf_options"></a>
Passing options to (de)muxers</h2>
<p>It is possible to configure lavf muxers and demuxers using the <a class="el" href="group__avoptions.html">AVOptions</a> mechanism. Generic (format-independent) libavformat options are provided by <a class="el" href="structAVFormatContext.html" title="Format I/O context.">AVFormatContext</a>, they can be examined from a user program by calling <a class="el" href="group__avoptions.html#ga33723e44fd2f22f42fe7145a08ea8e60" title="Iterate over all AVOptions belonging to obj.">av_opt_next()</a> / <a class="el" href="group__avoptions.html#gae31ae7fb20113b00108d0ecf53f25664" title="Look for an option in an object.">av_opt_find()</a> on an allocated <a class="el" href="structAVFormatContext.html" title="Format I/O context.">AVFormatContext</a> (or its <a class="el" href="structAVClass.html" title="Describe the class of an AVClass context structure.">AVClass</a> from <a class="el" href="group__lavf__core.html#ga6030789ce395ef543306bbe933619749" title="Get the AVClass for AVFormatContext.">avformat_get_class()</a>). Private (format-specific) options are provided by <a class="el" href="structAVFormatContext.html#ac4c0777e54085af2f3f1b27130e2b21b" title="Format private data.">AVFormatContext.priv_data</a> if and only if <a class="el" href="structAVInputFormat.html#afaac829559ad9e07618c01a51d8a4c5f" title="AVClass for the private context.">AVInputFormat.priv_class</a> / <a class="el" href="structAVOutputFormat.html#ae030463c5c08de99f8c9e727c822ca87" title="AVClass for the private context.">AVOutputFormat.priv_class</a> of the corresponding format struct is non-NULL. Further options may be provided by the <a class="el" href="structAVFormatContext.html#a1e7324262b6b78522e52064daaa7bc87">I/O context</a>, if its <a class="el" href="structAVClass.html" title="Describe the class of an AVClass context structure.">AVClass</a> is non-NULL, and the protocols layer. See the discussion on nesting in <a class="el" href="group__avoptions.html">AVOptions</a> documentation to learn how to access those. </p>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>