Aegisub/FFmpegSource/ffmpegsource.html

118 lines
3.6 KiB
HTML

<html>
<head>
<title>
FFmpegSource Documentation
</title>
</head>
<body>
<h1>FFmpegSource Documentation</h1>
<h2>Changes</h2>
<ul>
<li>1.3<ul>
<li>Compiled against ffmpeg rev9620</li>
<li>Added FFAudioRefSource</li>
<li>Added FFAudioSource (has big issues)</li>
<li>Renamed FFmpegSource to FFVideoSource</li>
<li>Adjusted seeking in the forward direction to only be done if the requested frame is more than 10 frames away to reduce unnecessary seeking</li>
<li>Now outputs the last frame properly when there are decoding delays</li>
</ul></li>
<li>1.2<ul>
<li>Compiled against ffmpeg rev9451</li>
<li>Somewhat cleaner source code</li>
<li>Linear access in addition to a few other modes of seeking can now be forced</li>
<li>Can now save the index information to a file which makes subsequent file opening fast</li>
<li>No longer skips indexing for any format</li>
</ul></li>
<li>1.1<ul>
<li>Skip indexing for avi</li>
<li>Prefix all error messages with the plugin name</li>
<li>Can write v2 timecodes to a file</li>
<li>Fixed reported framerate</li>
</ul></li>
</ul>
<h2>Usage</h2>
<p>
<b>FFVideoSource(string source, int track = -1, int seekmode = 1, string timecodes, bool cache = true, string cachefile)</b><br />
A video source that is frame accurate for most popular containers
</p>
<p>
<b>FFAudioSource(string source, int track = -1)</b><br />
Very unreliable attempt at sample accurate seeking in audio files
</p>
<p>
<b>FFAudioRefSource(string source, int track = -1, string cachefile)</b><br />
Decodes all audio to a temporary file which ensures that it will always be sample accurate
</p>
<p>
<b>source:</b>
source file
</p>
<p>
<b>track:</b>
track number as seen by the relevant demuxer, starts from 0, -1 means it will pick the first suitable track
</p>
<p>
<b>seekmode:</b>
force how seeking is handled, has no effect on matroska files which always use the equivalent of seekmode=1<br />
<b>0:</b> linear access, the definition of slow but should make some formats "usable"<br />
<b>1:</b> safe normal, bases seeking decisions on the reported keyframe positions<br />
<b>2:</b> unsafe normal, same as 1 but no error will be thrown if the exact destination has to be guessed<br />
<b>3:</b> aggressive, seek in the forward direction even if no closer keyframe is known to exist, only useful for containers where avformat doesn't report keyframes properly and testing
</p>
<p>
<b>timecodes:</b>
file to output timecodes to, if the file exists it will always be overwritten
</p>
<p>
<b>cache:</b>
write indexing information to a file for later use
</p>
<p>
<b>cachefile:</b>
if specified the file to store the index information or raw audio in, if nothing is specified (source).ffcache is used for video and (source).ffracache for audio
</p>
<h2>Compatibility - Video</h2>
<ul>
<li>AVI, MKV, MP4, FLV: Frame accurate</li>
<li>WMV: Frame accurate(?) but avformat seems to pick keyframes relatively far away</li>
<li>OGM: Messed up first frame and seeking produces smearing with seekmode=3, incredibly slow seeking without, remux to mkv or avi</li>
<li>VOB: No rff flags applied, frame accurate?</li>
<li>MPG: Seeking seems to be off by one or two frames now and then</li>
<li>TS: don't bother</li>
</ul>
<h2>Compatibility - Audio</h2>
<ul>
<li>Not sample accurate ever?</li>
</ul>
<h2>Compiling</h2>
<p><b>zlib</b> from http://www.zlib.net/</p>
<p><b>FFmpeg svn</b> from http://ffmpeg.mplayerhq.hu/</p>
<p><b>Required Configuration:</b>
./configure --enable-shared --disable-static --enable-memalign-hack --enable-gpl --enable-swscaler</p>
<p><b>Suggested Additional Options:</b>
--disable-encoders --disable-muxers --enable-small</p>
</body>
</html>