CGI

This example consists of 2 parts: flix2_sample.aspx and process_sample.aspx. flix2_sample.aspx searches for uploaded files to encode and allows the user to select one while giving the option to set values for most of the engine's functions. The engine options are separated into sections that map to the engine's COM interfaces.

The ASP .NET example requires that the Microsoft .NET Framework (1.1 or higher) be installed. The .NET Framework component is located on Windows Update under "Software, Optional".

This example also requires that the server process user account has any necessary access to the input and output directories. Therefore, you may need to give the ASPNET account write access to the output directory.

To install this example on your web server, copy the file <InstallDir>\sample\asp.net\bin\Interop.flixengine_com.dll to your <WebServerRoot>\bin directory, which is usually C:\Inetpub\wwwroot\bin. Then copy the <InstallDir>\sample\asp.net directory to your web server root.
To use this example navigate to flix2_sample.aspx in your web browser, select a file from the list, set any of the desired options and click the encode button. The selected options are submitted to process_sample.aspx which runs the encode loop.
Default file locations used by the scripts:
Input : C:/Inetpub/flixmedia/in ($indir in flix2_sample.aspx)
Overlay : C:/Inetpub/flixmedia/overlay ($overlaydir in flix2_sample.aspx)
Output : C:/Inetpub/flixmedia/out ($outdir in process_sample.aspx)

flix2_sample.aspx

<!--
'==========================================================================
'
'  Copyright (c) On2 Technologies Inc. All Rights Reserved.
'
'--------------------------------------------------------------------------
'
'  File:        $Workfile$
'               $Revision$
'
'  Last Update: $DateUTC$
'
'--------------------------------------------------------------------------
-->
<%@ Page Language="VB" Strict = "true"%>
<%@ Import Namespace=System.IO %>
<%@ Assembly Name="Interop.flixengine_com"%>
<%@ Import Namespace="flixengine_com" %>
<%@ Import Namespace="flixengine_com.FE2_AudioBitrates" %>
<%@ Import Namespace="flixengine_com.FE2_AudioSamplingrates" %>
<%@ Import Namespace="flixengine_com.FE2_CompressMode" %>
<%@ Import Namespace="flixengine_com.FE2_CuePointType" %>
<%@ Import Namespace="flixengine_com.FE2_EmbeddedUrlType" %>
<%@ Import Namespace="flixengine_com.FE2_ExportedVideoType" %>
<%@ Import Namespace="flixengine_com.FE2_OverlayPositionMode" %>
<%@ Import Namespace="flixengine_com.FE2_PNGExCuePtMode" %>
<%@ Import Namespace="flixengine_com.FE2_SwfOnEndOptions" %>
<%@ Import Namespace="flixengine_com.FE2_SwfOnStartOptions" %>
<%@ Import Namespace="flixengine_com.FE2_SwfPreloaderOptions" %>
<%@ Import Namespace="flixengine_com.FE2_VideoBitrateControls" %>
<%@ Import Namespace="flixengine_com.FE2_VideoKeyframeTypes" %>
<%@ Import Namespace="flixengine_com._on2bool" %>
<%@ Import Namespace="flixengine_com.blurfilter" %>
<%@ Import Namespace="flixengine_com.deinterlacemode" %>
<%@ Import Namespace="flixengine_com.flv_metadata" %>
<%@ Import Namespace="flixengine_com.h264profile" %>
<%@ Import Namespace="flixengine_com.lame_rcmode" %>
<%@ Import Namespace="flixengine_com.masksiz" %>
<%@ Import Namespace="flixengine_com.vp6profile" %>

<script runat="server">
    Dim prefix     As String = "C:\Inetpub\"
    Dim indir      As String = prefix & "flixmedia\in\"
    Dim overlaydir As String = prefix & "flixmedia\overlay\"
</script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
 <title>Flix2 CGI Sample - ASP.NET</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 <script type="text/javascript">
 function showall(show) {
    var legend_list = document.getElementsByTagName('legend');
    var i=0;
    while(legend_list[i]) {
        legend_list[i].parentNode.className=show?'expanded':'collapsed';
        i++;
    }
 }

 function toggle_expand(_this)
 {
     _this.parentNode.className= (_this.parentNode.className=='expanded') ?
                                 'collapsed' : 'expanded';
    document.getElementById('showall').checked=false;
 }

 function set_table_visible(ctable,visible)
 {
    var table= document.getElementById(ctable);

    if(table) {
       if(visible && table.className == 'hidden') {
           table.className= '';
       } else if(!visible && table.className == '') {
           table.className= 'hidden';
       }
    }
 }

 function hide_tablelist(vistablename,tablelist)
 {
   var table= document.getElementById(vistablename);

   if(table&&table.className=='hidden') {
     table.className= '';

     var i=0;
     while(tablelist[i]) {
       if(tablelist[i]!=vistablename) {
         var hiddentable= document.getElementById(tablelist[i]);

         set_table_visible(tablelist[i],false);
         /*clear down any values set in the hidden table to avoid posting
           unnecessary values*/
         clear_value(hiddentable.getElementsByTagName('input'));
         clear_value(hiddentable.getElementsByTagName('select'));
       }
       i++;
     }
   }
 }

 function set_acodec_visible(ctable)
 {
   var acodecs= new Array('aactable','aacplustable','amrnbtable','lametable','pcmtable','vorbistable');
   hide_tablelist(ctable,acodecs);
 }

 function set_vcodec_visible(ctable)
 {
   var vcodecs= new Array('h263table','h264table','vp6atable','vp6table','vp8table');
   hide_tablelist(ctable,vcodecs);
 }

 function set_muxer_visible(mtable)
 {
   var muxers= new Array('flvtable','fxmtable','movtable','mp4table','swftable','tg2table','tgptable','webmtable');
   hide_tablelist(mtable,muxers);
 }

 function clear_value(list)
 {
    var i=0;
    while(list[i]) {
      if(list[i].type=='checkbox') { list[i++].checked=false; }
      else { list[i++].value=''; }
    }
 }

 function toggle_ftable(ftable,enabled)
 {
   var table= document.getElementById(ftable);

   if(table) {
     table.className = enabled ? '' : 'disabled';
     if(!enabled) {
       clear_value(table.getElementsByTagName('input'));
       clear_value(table.getElementsByTagName('select'));
     }
   }
 }

 function reset_tables()
 {
    var table_list= document.getElementsByTagName('table');
    var i=0;
    while(table_list[i]) {
      if (table_list[i].id.length > 7 &&
        table_list[i].id.substring(0,7) == 'filter_') {
        table_list[i].className= 'disabled';
      } else if (table_list[i].id.indexOf('table') != -1) {
        table_list[i].className= 'hidden';
      }
      i++;
    }
 }

 </script>

 <style type="text/css">
    <!--
    html {
        font-family: Verdana, 'bitstream vera sans', Arial, sans-serif;
        font-size: 100%;
        color: rgb(56,56,56);
        background-color: rgb(236,236,236);
        border-style: solid;
        border-color: rgb(236,236,236);
    }

    body {
        text-align: center;
        margin: 0 auto;
    }

    div.content {
        color: rgb(56,56,56);
        background-color: rgb(246,246,246);
        text-align: left;
        margin: 0 auto;
        width: 80%;
        min-width: 768px;
        max-width: 932px;
        border-width: 0 1px;
        border-color: rgb(144,144,144);
        border-style: solid;
    }

    div.content:after {
        content: "";
        color: inherit;
        background-color: rgb(250,250,250);
        border-top: 1px solid rgb(144,144,144);
        height: 20px;
        width: 100%;
        display: block;
    }

    fieldset table, fieldset {display: none;}
    fieldset.expanded, fieldset.collapsed {display: block;}

    /*first is fallback for IE*/
    fieldset.expanded table {display: block;}
    fieldset.expanded table {display: table;}

    h1 {
        font-family: sans-serif;    
        font-size: 150%;
        font-weight: normal;
        text-align: left;
        letter-spacing: -1px;
        color: rgb(74,74,74);
        background-color: inherit;
        margin: 0;
    }

    a {
        color: rgb(74,74,74);
        background-color: transparent;
    }

    label {
        font-size: 75%;
    }

    fieldset {
        font-size: 75%;
        line-height: 130%;
        padding: 0;
        margin: 20px;
        border: none;
    }

    fieldset.expanded {
        color: inherit;
        background-color: rgb(252,252,252);
        border-style: solid;
        border-width: 1px;
        border-color: rgb(217,217,217) rgb(217,217,217) rgb(188,188,188);
    }

    legend {
        padding: 0 5px;
        border-left: 10px solid rgb(217,217,217);
        cursor: pointer;
    }
    legend:hover {text-decoration: underline;}
    fieldset.expanded legend {
        font-size: 150%;
        font-weight: bold;
        letter-spacing: -1px;
        background: transparent;
        margin-left: 12px;
        border-right: 10px solid rgb(217,217,217);
        display: block;
    }
    table {
        font-size: 100%;
        border-spacing: 0;
        /*border-collapse: collapse;*/
        width: 100%;
    }

    th:before { display: none; }
    th, td {
        width: 50%;
        vertical-align: top;
        padding: 2px 3px;
        border-width: 1px 0;
        border-style: solid;
        border-color: rgb(188,188,188) rgb(252,252,252) rgb(252,252,252);
    }
    tr:first-child>* {border-top-color: rgb(252,252,252);}
    th {
        font-weight: normal;
        text-align: left;
        padding: 2px 2px 2px 5px;
    }
    input[type] {
        font-family: monospace;
        font-size: 100%;
        color: rgb(56,56,56);
        background-color: inherit;
    }
    [type="text"], [type="number"] {
        margin-right: 13px;
        width: 222px;
    }

    [type="checkbox"].filter {
        margin-left: 4px
    }
    [type="checkbox"] {
        margin-left: 13px
    }
    [type="button"], [type="submit"] {
        font-size: 1em;
        margin: 0 2px 0 13px;
    }

    fieldset {
        font-size: 75%;
        margin: 20px 10px;
    }
    fieldset input[type="text"], fieldset input[type="number"] {
        width: 95% !important;
        margin: 0;
        display: block;
    }
    fieldset.expanded table.hidden {
        display: none;
    }

    table.disabled {
        color: rgb(176,176,176);
    }
    -->
 </style>
</head>

<body>
 <div class='content'>
 <noscript>
  <p>This page requires javascript be enabled.</p>
 </noscript>

<hr>
<h1>Flix CGI Sample</h1>



<p><small>flix2_sample.cgi version 1.9</small></p>
<h4>Instructions</h4>
<ul>
 <li>In this sample you must choose a source file and an output file.<br>
 If you leave all the other options blank then the sample will not call
 the corresponding Flix Engine function and the default will be used.<br>
 When done please press the "Start Encode" button at the bottom of the page.<br>
 <li>Mouse over a function name to see its default, if applicable.
 <li>Current source file directory: <%=indir%>
</ul>

<p>
 <label><input type="checkbox" id='showall' onclick='showall(this.checked)'>Show all</label>
</p>

<form action="process_sample.aspx" method="post">

<!-- ##SOURCE FILE########################################################### -->
<hr>
<fieldset class='expanded' id="srcfile">
<legend onclick='toggle_expand(this)'>Source File</legend>
<table>

<tr>
 <td>
<%
   'Get the file names from indir
   Dim inDirectory As DirectoryInfo = New DirectoryInfo(indir)
   If (inDirectory.Exists) Then
      'Code snippet for sorted directory listing
      Dim fileInfos() As FileInfo = inDirectory.GetFiles()
      Dim buffer As FileInfo
      Dim fileOne, fileTwo As Integer
      For fileOne = 0 To UBound(fileInfos)
         For fileTwo = (fileOne + 1) To UBound(fileInfos)
            If strComp(fileInfos(fileOne).Name,fileInfos(fileTwo).Name,0)=1 Then
               buffer = fileInfos(fileTwo)
               fileInfos(fileTwo) = fileInfos(fileOne)
               fileInfos(fileOne) = buffer
            end if
         Next
      Next

      Dim siz As Integer = Ubound(fileInfos)+1
      If (siz>15) Then siz= 15

      'Output the sorted options
      Response.Write("<select name='setInputFile' size='" & siz & "'>" & vbLf)
      Dim selected As Boolean = False
      Dim inFile As FileInfo
      For Each inFile In fileInfos
         If (Len(inFile.Name) > 0) Then
            Response.Write("<option ")
            If (selected = False) Then
               Response.Write("selected ")
               selected = True
            End If
            Response.Write("value=""" & indir & inFile.Name & """>" _
                           & inFile.Name & "</option>" & vbLf)
         End If
      Next
      Response.Write("</select>" & vbLf)
   Else
      Response.Write("WARNING couldn't open " & indir _
                     & ": FolderExists() returned FALSE<br>" & vbLf)
   End If
%>

 </td>
</tr>

</table>
</fieldset>

<!-- ##DST FILE################################################################# -->
<hr>
<fieldset class='expanded' id="dstfile">
<legend onclick='toggle_expand(this)'>Output File</legend>
<table>

<tr>
 <td>
  <input type="text" name="setOutputFile" value="cgi-aspnet-out.flv">
 </td>
</tr>

</table>
</fieldset>

<!-- ##MAIN OPTIONS################################################################# -->
<hr>
<fieldset class='collapsed' id="main_opts">
<legend onclick='toggle_expand(this)'>Main Options</legend>
<table>

<tr>
 <th><abbr title="Default: FALSE">setOverwriteExistingFiles</abbr></th>
 <td>
 <select name="setOverwriteExistingFiles">
 <option value=""></option>
 <option value="<%=on2true%>">TRUE</option>
 <option value="<%=on2false%>">FALSE</option>
 </select>
 </td>
</tr>

<tr>
 <th><abbr title="Default: TRUE">setExportAudio</abbr></th>
 <td>
 <select name="setExportAudio">
 <option value=""></option>
 <option value="<%=on2true%>">TRUE</option>
 <option value="<%=on2false%>">FALSE</option>
 </select>
 </td>
</tr>

<tr>
 <th><abbr title="Default: TRUE">setExportVideo</abbr></th>
 <td>
 <select name="setExportVideo">
 <option value=""></option>
 <option value="<%=on2true%>">TRUE</option>
 <option value="<%=on2false%>">FALSE</option>
 </select>
 </td>
</tr>

</table>
</fieldset>

<!-- ##CODECS####################################################################### -->
<hr>
<fieldset class='collapsed' id="codecs">
<legend onclick='toggle_expand(this)'>Codecs</legend>
<table>

<tr><th><b>Video Codecs</b></th></tr>
<tr>
 <td>
 <label>
  <input type='radio' name='vcodec:' value='FE2_CODEC_VP8'
         onfocus="set_vcodec_visible('vp8table')">
  <abbr title="For use with WebM">FE2_CODEC_VP8</abbr>&nbsp;
 </label>
 <br>

 <label>
  <input type='radio' name='vcodec:' value='FE2_CODEC_VP6'
         onfocus="set_vcodec_visible('vp6table')">
  <abbr title="For use with FLV/FXM/SWF">FE2_CODEC_VP6</abbr>&nbsp;
 </label>
 <label>
  <input type='radio' name='vcodec:' value='FE2_CODEC_VP6ALPHA'
         onfocus="set_vcodec_visible('vp6atable')">
  <abbr title="For use with FLV/SWF">FE2_CODEC_VP6ALPHA</abbr>&nbsp;
 </label>
 <label>
  <input type='radio' name='vcodec:' value='FE2_CODEC_H263'
         onfocus="set_vcodec_visible('h263table')">
  <abbr title="For use with FLV/SWF">FE2_CODEC_H263</abbr>&nbsp;
 </label>
 <br>

 <label>
  <input type='radio' name='vcodec:' value='FE2_CODEC_H263_BASELINE'
         onfocus="set_vcodec_visible('h263table')">
  <abbr title="For use with 3GP">FE2_CODEC_H263_BASELINE</abbr>&nbsp;
 </label>
 <label>
  <input type='radio' name='vcodec:' value='FE2_CODEC_H264'
         onfocus="set_vcodec_visible('h264table')">
  <abbr title="For use with 3GP/3G2/MOV/MP4">FE2_CODEC_H264</abbr>&nbsp;
 </label>

 <!-- VP6 codec parameters -->
 <table id='vp6table' class='hidden'>
  <tr>
   <th><abbr title="Default: 448kbps">FE2_VP6_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: MAX_KEYFRAMES">FE2_VP6_KFINTTYPE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6_KFINTTYPE">
    <option value=""></option>
    <option value="<%=MAX_KEYFRAMES%>">MAX_KEYFRAMES</option>
    <option value="<%=FIXED_KEYFRAMES%>">FIXED_KEYFRAMES</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 12*fps or 360 frames if the framerate is unknown">FE2_VP6_KFFREQ</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_KFFREQ'></td>
  </tr>

  <tr>
   <th><abbr title="Default: VBR_2PASSControl">FE2_VP6_RC_MODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6_RC_MODE">
    <option value=""></option>
    <option value="<%=VBR_2PASSControl%>">VBR_2PASSControl</option>
    <option value="<%=CBR_2PASSControl%>">CBR_2PASSControl</option>
    <option value="<%=VBR_1PASSControl%>">VBR_1PASSControl</option>
    <option value="<%=CBR_1PASSControl%>">CBR_1PASSControl</option>
   </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: COMPRESSMODE_GOOD">FE2_VP6_CXMODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6_CXMODE">
    <option value=""></option>
    <option value="<%=COMPRESSMODE_GOOD%>">COMPRESSMODE_GOOD</option>
    <option value="<%=COMPRESSMODE_BEST%>">COMPRESSMODE_BEST</option>
   </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: VP6_E">FE2_VP6_PROFILE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6_PROFILE">
    <option value=""></option>
    <option value="<%=VP6_E%>">VP6_E</option>
    <option value="<%=VP6_S%>">VP6_S</option>
   </select>
   </td>
  </tr>

  <tr><th><b>Advanced Settings:</b></th></tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP6_CONCURRENCY</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_CONCURRENCY'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 90">FE2_VP6_UNDERSHOOT_PCT</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_UNDERSHOOT_PCT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6_MIN_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_MIN_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6_MAX_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_MAX_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6_SHARPNESS</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_SHARPNESS'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6_NOISE_REDUCTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_NOISE_REDUCTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6_TEMPORAL_RESAMPLING</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_TEMPORAL_RESAMPLING'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6_TEMPORAL_DOWN_WATERMARK</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_TEMPORAL_DOWN_WATERMARK'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 100">FE2_VP6_STREAM_PEAK_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_STREAM_PEAK_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 6 (CBR only)">FE2_VP6_STREAM_PREBUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_STREAM_PREBUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 10 (CBR only)">FE2_VP6_STREAM_OPTIMAL_BUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_STREAM_OPTIMAL_BUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="(CBR only)">FE2_VP6_STREAM_MAX_BUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_STREAM_MAX_BUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 40">FE2_VP6_2PASS_MIN_SECTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_2PASS_MIN_SECTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 400">FE2_VP6_2PASS_MAX_SECTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6_2PASS_MAX_SECTION'></td>
  </tr>

 </table>
 <!-- END - VP6 codec parameters -->

 <!-- VP6A codec parameters -->
 <table id='vp6atable' class='hidden'>
  <tr>
   <th><abbr title="Default: 380kbps">FE2_VP6A_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 68kbps (15% of default 448kbps)">FE2_VP6A_ALPHA_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_ALPHA_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: MAX_KEYFRAMES">FE2_VP6A_KFINTTYPE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6A_KFINTTYPE">
    <option value=""></option>
    <option value="<%=MAX_KEYFRAMES%>">MAX_KEYFRAMES</option>
    <option value="<%=FIXED_KEYFRAMES%>">FIXED_KEYFRAMES</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 12*fps or 360 frames if the framerate is unknown">FE2_VP6A_KFFREQ</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_KFFREQ'></td>
  </tr>

  <tr>
   <th><abbr title="Default: VBR_2PASSControl">FE2_VP6A_RC_MODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6A_RC_MODE">
    <option value=""></option>
    <option value="<%=VBR_2PASSControl%>">VBR_2PASSControl</option>
    <option value="<%=CBR_2PASSControl%>">CBR_2PASSControl</option>
    <option value="<%=VBR_1PASSControl%>">VBR_1PASSControl</option>
    <option value="<%=CBR_1PASSControl%>">CBR_1PASSControl</option>
   </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: COMPRESSMODE_GOOD">FE2_VP6A_CXMODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP6A_CXMODE">
    <option value=""></option>
    <option value="<%=COMPRESSMODE_GOOD%>">COMPRESSMODE_GOOD</option>
    <option value="<%=COMPRESSMODE_BEST%>">COMPRESSMODE_BEST</option>
   </select>
   </td>
  </tr>

  <tr><th><b>Advanced Settings:</b></th></tr>

  <tr>
   <th><abbr title="Default: 90">FE2_VP6A_UNDERSHOOT_PCT</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_UNDERSHOOT_PCT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_MIN_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_MIN_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_ALPHA_MIN_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_ALPHA_MIN_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_MAX_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_MAX_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_MAX_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_ALPHA_MAX_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_SHARPNESS</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_SHARPNESS'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_ALPHA_SHARPNESS</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_ALPHA_SHARPNESS'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_NOISE_REDUCTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_NOISE_REDUCTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_ALPHA_NOISE_REDUCTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_ALPHA_NOISE_REDUCTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_TEMPORAL_RESAMPLING</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_TEMPORAL_RESAMPLING'></td>
  </tr>

  <tr>
   <th><abbr title="Default: bits per pixel dependent (see API docs)">FE2_VP6A_TEMPORAL_DOWN_WATERMARK</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_TEMPORAL_DOWN_WATERMARK'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 100">FE2_VP6A_STREAM_PEAK_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_STREAM_PEAK_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 6 (CBR only)">FE2_VP6A_STREAM_PREBUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_STREAM_PREBUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 10 (CBR only)">FE2_VP6A_STREAM_OPTIMAL_BUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_STREAM_OPTIMAL_BUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="(CBR only)">FE2_VP6A_STREAM_MAX_BUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_STREAM_MAX_BUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 40">FE2_VP6A_2PASS_MIN_SECTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_2PASS_MIN_SECTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 400">FE2_VP6A_2PASS_MAX_SECTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP6A_2PASS_MAX_SECTION'></td>
  </tr>

 </table>
 <!-- END - VP6A codec parameters -->

 <!-- H263 codec parameters -->
 <table id='h263table' class='hidden'>
  <tr>
   <th><abbr title="Default: 448kbps">FE2_H263_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H263_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: MAX_KEYFRAMES">FE2_H263_KFINTTYPE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_H263_KFINTTYPE">
    <option value=""></option>
    <option value="<%=MAX_KEYFRAMES%>">MAX_KEYFRAMES</option>
    <option value="<%=FIXED_KEYFRAMES%>">FIXED_KEYFRAMES</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 12*fps or 360 frames if the framerate is unknown">FE2_H263_KFFREQ</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H263_KFFREQ'></td>
  </tr>

  <tr>
   <th><abbr title="Default: VBR_2PASSControl">FE2_H263_RC_MODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_H263_RC_MODE">
     <option value=""></option>
     <option value="<%=VBR_2PASSControl%>">VBR_2PASSControl</option>
     <option value="<%=CBR_2PASSControl%>">CBR_2PASSControl</option>
     <option value="<%=VBR_1PASSControl%>">VBR_1PASSControl</option>
     <option value="<%=CBR_1PASSControl%>">CBR_1PASSControl</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 31">FE2_H263_MAX_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H263_MAX_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 2">FE2_H263_MIN_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H263_MIN_Q'></td>
  </tr>

 </table>
 <!-- END - H263 codec parameters -->

 <!-- H264 codec parameters -->
 <table id='h264table' class='hidden'>
  <tr>
   <th><abbr title="Default: 448kbps">FE2_H264_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H264_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 12*fps or 360 frames if the framerate is unknown">FE2_H264_KFFREQ</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H264_KFFREQ'></td>
  </tr>

  <tr>
   <th><abbr title="Default: VBR_1PASSControl">FE2_H264_RC_MODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_H264_RC_MODE">
     <option value=""></option>
     <option value="<%=VBR_1PASSControl%>">VBR_1PASSControl</option>
     <option value="<%=CBR_1PASSControl%>">CBR_1PASSControl</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: MAIN_H264PROFILE">FE2_H264_PROFILE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_H264_PROFILE">
     <option value=""></option>
     <option value="<%=BASE_H264PROFILE%>">BASE_H264PROFILE</option>
     <option value="<%=MAIN_H264PROFILE%>">MAIN_H264PROFILE</option>
     <option value="<%=HIGH_H264PROFILE%>">HIGH_H264PROFILE</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_H264_B_FRAME_RATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H264_B_FRAME_RATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: Dependent on profile selection, see API docs. Valid Range [0,5]">FE2_H264_SPEED</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_H264_SPEED'></td>
  </tr>

 </table>
 <!-- END - H264 codec parameters -->

 <!-- VP8 codec parameters -->
 <table id='vp8table' class='hidden'>
  <tr>
   <th><abbr title="Default: 448kbps">FE2_VP8_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: MAX_KEYFRAMES">FE2_VP8_KFINTTYPE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP8_KFINTTYPE">
    <option value=""></option>
    <option value="<%=MAX_KEYFRAMES%>">MAX_KEYFRAMES</option>
    <option value="<%=FIXED_KEYFRAMES%>">FIXED_KEYFRAMES</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 12*fps or 360 frames if the framerate is unknown">FE2_VP8_KFFREQ</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_KFFREQ'></td>
  </tr>

  <tr>
   <th><abbr title="Default: VBR_2PASSControl">FE2_VP8_RC_MODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP8_RC_MODE">
    <option value=""></option>
    <option value="<%=VBR_2PASSControl%>">VBR_2PASSControl</option>
    <option value="<%=CBR_2PASSControl%>">CBR_2PASSControl</option>
    <option value="<%=VBR_1PASSControl%>">VBR_1PASSControl</option>
    <option value="<%=CBR_1PASSControl%>">CBR_1PASSControl</option>
   </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: COMPRESSMODE_GOOD">FE2_VP8_CXMODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_VP8_CXMODE">
    <option value=""></option>
    <option value="<%=COMPRESSMODE_GOOD%>">COMPRESSMODE_GOOD</option>
    <option value="<%=COMPRESSMODE_BEST%>">COMPRESSMODE_BEST</option>
   </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_THREADS</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_THREADS'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_PROFILE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_PROFILE'></td>
  </tr>

  <tr><th><b>Advanced Settings:</b></th></tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_LAG</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_LAG'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 95">FE2_VP8_UNDERSHOOT_PCT</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_UNDERSHOOT_PCT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 200">FE2_VP8_OVERSHOOT_PCT</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_OVERSHOOT_PCT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 4">FE2_VP8_MIN_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_MIN_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 63">FE2_VP8_MAX_Q</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_MAX_Q'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_SHARPNESS</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_SHARPNESS'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_NOISE_REDUCTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_NOISE_REDUCTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_DROP_THRESH</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_DROP_THRESH'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 4 (CBR only)">FE2_VP8_STREAM_PREBUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_STREAM_PREBUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 5 (CBR only)">FE2_VP8_STREAM_OPTIMAL_BUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_STREAM_OPTIMAL_BUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 6 (CBR only)">FE2_VP8_STREAM_MAX_BUFFER</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_STREAM_MAX_BUFFER'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 40">FE2_VP8_2PASS_MIN_SECTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_2PASS_MIN_SECTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 400">FE2_VP8_2PASS_MAX_SECTION</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_2PASS_MAX_SECTION'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_ALTREF</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_ALTREF'></td>
  </tr>

  <tr>
   <th><abbr title="">FE2_VP8_AR_MAX_FRAMES</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_AR_MAX_FRAMES'></td>
  </tr>

  <tr>
   <th><abbr title="">FE2_VP8_AR_TYPE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_AR_TYPE'></td>
  </tr>

  <tr>
   <th><abbr title="">FE2_VP8_AR_STRENGTH</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_AR_STRENGTH'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_VP8_MB_STATIC_THRESHOLD</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_MB_STATIC_THRESHOLD'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 1">FE2_VP8_TOKEN_PARTITIONS</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VP8_TOKEN_PARTITIONS'></td>
  </tr>

 </table>
 <!-- END - VP8 codec parameters -->

 </td>
</tr> <!-- END - video codecs -->

<tr><th><b>Audio Codecs</b></th></tr>
<tr>
 <td>
 <label>
  <input type='radio' name='acodec:' value='FE2_CODEC_VORBIS'
         onfocus="set_acodec_visible('vorbistable')">
  <abbr title="For use with WebM">FE2_CODEC_VORBIS</abbr>&nbsp;
 </label>
 <br>

 <label>
  <input type='radio' name='acodec:' value='FE2_CODEC_AAC'
         onfocus="set_acodec_visible('aactable')">
  <abbr title="For use with FLV & 3GP/3G2/MOV/MP4">FE2_CODEC_AAC</abbr>&nbsp;
 </label>
 <label>
  <input type='radio' name='acodec:' value='FE2_CODEC_AACPLUS'
         onfocus="set_acodec_visible('aacplustable')">
  <abbr title="For use with FLV & 3GP/3G2/MOV/MP4">FE2_CODEC_AACPLUS</abbr>&nbsp;
 </label>
 <label>
  <input type='radio' name='acodec:' value='FE2_CODEC_LAME'
         onfocus="set_acodec_visible('lametable') ">
  <abbr title="For use with FLV/FXM/SWF">FE2_CODEC_LAME</abbr>&nbsp;
 </label>
 <label>
  <input type='radio' name='acodec:' value='FE2_CODEC_PCM'
         onfocus="set_acodec_visible('pcmtable')">
  <abbr title="For use with FLV/SWF">FE2_CODEC_PCM</abbr>&nbsp;
 </label>
 <br>

 <label>
  <input type='radio' name='acodec:' value='FE2_CODEC_AMR_NB'
         onfocus="set_acodec_visible('amrnbtable')">
  <abbr title="For use with 3GP">FE2_CODEC_AMR_NB</abbr>&nbsp;
 </label>

 <!-- AMR_NB codec parameters -->
 <table id='amrnbtable' class='hidden'>
  <tr>
   <th><abbr title="Default: 12.2kbps">FE2_AMR_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_AMR_BITRATE'></td>
  </tr>

 </table>
 <!-- END - AMR_NB codec parameters -->

 <!-- AAC codec parameters -->
 <table id='aactable' class='hidden'>
  <tr>
   <th><abbr title="Default: 64kbps">FE2_AAC_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_AAC_BITRATE'></td>
  </tr>
 
 </table>
 <!-- END - AAC codec parameters -->

 <!-- AACPLUS codec parameters -->
 <table id='aacplustable' class='hidden'>
  <tr>
   <th><abbr title="Default: 64kbps">FE2_AACPLUS_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_AACPLUS_BITRATE'></td>
  </tr>
 
  <tr>
   <th><abbr title="Default: disabled (aacPlus v1)">FE2_AACPLUS_PARAMETRIC_STEREO</abbr></th>
   <td>
    <select name="codec:setParam:FE2_AACPLUS_PARAMETRIC_STEREO">
    <option value=""></option>
    <option value="0">disable (aacPlus v1)</option>
    <option value="1">enable (aacPlus v2)</option>
    </select>
   </td>
  </tr>
 </table>
 <!-- END - AACPLUS codec parameters -->

 <!-- LAME codec parameters -->
 <table id='lametable' class='hidden'>
  <tr>
   <th><abbr title="Default: 64kbps">FE2_LAME_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_LAME_BITRATE'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 5">FE2_LAME_QUALITY</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_LAME_QUALITY'></td>
  </tr>

  <tr>
   <th><abbr title="Default: LAME_CBR">FE2_LAME_RC_MODE</abbr></th>
   <td>
    <select name="codec:setParam:FE2_LAME_RC_MODE">
    <option value=""></option>
    <option value="<%=LAME_CBR%>">LAME_CBR</option>
    <option value="<%=LAME_ABR%>">LAME_ABR</option>
    <option value="<%=LAME_VBR_rh%>">LAME_VBR_rh</option>
    <option value="<%=LAME_VBR_mtrh%>">LAME_VBR_mtrh</option>
    </select>
   </td>
  </tr>
 </table>
 <!-- END - LAME codec parameters -->

 <!-- PCM codec parameters -->
 <table id='pcmtable' class='hidden'>
  <tr>
   <th>(FE2_CODEC_PCM defines no parameters)</th>
  </tr>
 </table>
 <!-- END - PCM codec parameters -->

 <!-- VORBIS codec parameters -->
 <table id='vorbistable' class='hidden'>
  <tr>
   <th><abbr title="Default: 64kbps">FE2_VORBIS_BITRATE</abbr></th>
   <td><input type='text' name='codec:setParam:FE2_VORBIS_BITRATE'></td>
  </tr>
 </table>
 <!-- END - VORBIS codec parameters -->

 </td>
</tr> <!-- END - audio codecs -->

</table>

</fieldset>

<!-- ##FILTERS###################################################################### -->
<hr>
<fieldset class='collapsed' id="filters">
<legend onclick='toggle_expand(this)'>Filters</legend>
<table>

<tr><th><b>A/V Filters</b></th></tr>

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_CUT' value='avfilter:'
          onchange="toggle_ftable('filter_cut',this.checked)">
   FE2_FILTER_CUT
  </label>

  <table id='filter_cut' class='disabled'>
   <tr>
    <th><abbr title="Default: 0">FE2_CUT_START_SEC</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_CUT_START_SEC'></td>
   </tr>

   <tr>
    <th><abbr title="Default: -1">FE2_CUT_STOP_SEC</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_CUT_STOP_SEC'></td>
   </tr>

   <tr>
    <th><abbr title="Default: 1">FE2_CUT_USE_SEEK</abbr></th>
    <td>
     <select name="filter:setParam:FE2_CUT_USE_SEEK">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>
 
  </table>

 </td>
</tr>
<!-- END - CUT filter parameters -->

<tr><th><b>Video Filters</b></th></tr>

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_ADAPTIVE_DEINTERLACE' value='vfilter:'
          onchange="toggle_ftable('filter_adaptive_deinterlace',this.checked)">
   FE2_FILTER_ADAPTIVE_DEINTERLACE
  </label>

  <table id='filter_adaptive_deinterlace' class='disabled'>
   <tr>
    <th><abbr title="Default: DEINTERLACE_NONE">FE2_ADAPTIVE_DEINTERLACE_MODE</abbr></th>
    <td>
     <select name="filter:setParam:FE2_ADAPTIVE_DEINTERLACE_MODE">
     <option value=""></option>
     <option value="<%=DEINTERLACE_NONE%>">DEINTERLACE_NONE</option>
     <option value="<%=DEINTERLACE_1_2_1_BLUR%>">DEINTERLACE_1_2_1_BLUR</option>
     <option value="<%=DEINTERLACE_DROP_FIELD%>">DEINTERLACE_DROP_FIELD</option>
     <option value="<%=DEINTERLACE_ADAPTIVE%>">DEINTERLACE_ADAPTIVE</option>
     </select>
    </td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - ADAPTIVE DEINTERLACE filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_BCHS' value='vfilter:'
          onchange="toggle_ftable('filter_bchs',this.checked)">
   FE2_FILTER_BCHS
  </label>

  <table id='filter_bchs' class='disabled'>
   <tr>
    <th><abbr title="Default: 0">FE2_BCHS_BRIGHTNESS</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_BCHS_BRIGHTNESS'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_BCHS_CONTRAST</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_BCHS_CONTRAST'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_BCHS_HUE</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_BCHS_HUE'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_BCHS_SATURATION</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_BCHS_SATURATION'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - BCHS filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_BLUR' value='vfilter:'
          onchange="toggle_ftable('filter_blur',this.checked)">
   FE2_FILTER_BLUR
  </label>

  <table id='filter_blur' class='disabled'>
   <tr>
    <th><abbr title="Default: BLUR_GAUSS">FE2_BLUR_FILTER</abbr></th>
    <td>
     <select name="filter:setParam:FE2_BLUR_FILTER">
     <option value=""></option>
     <option value="<%=BLUR_LOWPASS%>">BLUR_LOWPASS</option>
     <option value="<%=BLUR_GAUSS%>">BLUR_GAUSS</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="Default: MASK_3x3">FE2_BLUR_MASKSIZE</abbr></th>
    <td>
     <select name="filter:setParam:FE2_BLUR_MASKSIZE">
     <option value=""></option>
     <option value="<%=MASK_3x3%>">MASK_3x3</option>
     <option value="<%=MASK_5x5%>">MASK_5x5</option>
     </select>
    </td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - BLUR filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_CROP' value='vfilter:'
          onchange="toggle_ftable('filter_crop',this.checked)">
   FE2_FILTER_CROP
  </label>

  <table id='filter_crop' class='disabled'>
   <tr>
    <th><abbr title="Default: 0">FE2_CROP_TOP</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_CROP_TOP'></td>
   </tr>

   <tr>
    <th><abbr title="Default: input image height">FE2_CROP_BOTTOM</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_CROP_BOTTOM'></td>
   </tr>

   <tr>
    <th><abbr title="Default: 0">FE2_CROP_LEFT</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_CROP_LEFT'></td>
   </tr>

   <tr>
    <th><abbr title="Default: input image width">FE2_CROP_RIGHT</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_CROP_RIGHT'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - CROP filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_DENOISE' value='vfilter:'
          onchange="toggle_ftable('filter_denoise',this.checked)">
   FE2_FILTER_DENOISE
  </label>

  <table id='filter_denoise' class='disabled'>
   <tr>
    <th><abbr title="Default: 0. Range: [0.0,1.0)">FE2_DENOISE_NOISE_LEVEL</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_DENOISE_NOISE_LEVEL'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - DENOISE filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_FRAMERATE' value='vfilter:'
          onchange="toggle_ftable('filter_framerate',this.checked)">
   FE2_FILTER_FRAMERATE
  </label>

  <table id='filter_framerate' class='disabled'>
   <tr>
    <th><abbr title="decimation interval, range: [1,] Default: disabled">FE2_FRAMERATE_DECIMATE</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_FRAMERATE_DECIMATE'></td>
   </tr>

   <tr>
    <th><abbr title="explicit frame rate, range: (0.0,] Default: disabled">FE2_FRAMERATE_FPS</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_FRAMERATE_FPS'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - FRAMERATE filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_MIRROR' value='vfilter:'
          onchange="toggle_ftable('filter_mirror',this.checked)">
   FE2_FILTER_MIRROR
  </label>

  <table id='filter_mirror' class='disabled'>
   <tr>
    <th><abbr title="Default: 0 (disabled)">FE2_MIRROR_HORIZONTAL</abbr></th>
    <td>
     <select name="filter:setParam:FE2_MIRROR_HORIZONTAL">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="Default: 0 (disabled)">FE2_MIRROR_VERTICAL</abbr></th>
    <td>
     <select name="filter:setParam:FE2_MIRROR_VERTICAL">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - MIRROR filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_OVERLAY' value='vfilter:'
          onchange="toggle_ftable('filter_overlay',this.checked)">
   FE2_FILTER_OVERLAY
  </label>

  <table id='filter_overlay' class='disabled'>
   <tr>
    <th>
     <abbr title="Currently searching <%=overlaydir%> for overlay images">FE2_OVERLAY_FILE</abbr>
    </th>
    <td>
<%
   'Get the file names from overlaydir
   Dim overlayDirectory As DirectoryInfo = New DirectoryInfo(overlaydir)
   If (overlayDirectory.Exists) Then
      'Code snippet for sorted directory listing
      Dim fileInfos() As FileInfo = overlayDirectory.GetFiles()
      Dim fileOne, fileTwo as Integer
      Dim buffer as FileInfo
      For fileOne = 1 To UBound(fileInfos)
         For fileTwo = (fileOne + 1) To UBound(fileInfos)
            If strComp(fileInfos(fileOne).Name,fileInfos(fileTwo).Name,0)=1 Then
               buffer = fileInfos(fileTwo)
               fileInfos(fileTwo) = fileInfos(fileOne)
               fileInfos(fileOne) = buffer
            end if
         Next
      Next

      'Output the sorted options
      Response.Write("<select name=""filter:setParamAsStr:FE2_OVERLAY_FILE"">" _
                     & vbLf)
      Response.Write("<option value=""""></option>" & vbLf)
      Dim overlayFile As FileInfo
      For Each overlayFile In fileInfos
         If ( (InStr(1, overlayFile.Name, ".bmp", CompareMethod.Text) > 0) _
            Or (InStr(1, overlayFile.Name, ".png", CompareMethod.Text) > 0)) Then
            Response.Write("<option value='" & overlaydir & overlayFile.Name _
                           & "'>" & overlayFile.Name & "</option>" & vbLf)
         End If
      Next
      Response.Write("</select>" & vbLf)
      Response.Write("<br>default: None, must be programmatically set to" _
                  & " absolute path of overlay input file, e.g., '" _
                  & overlaydir & "overlay.png'" & vbLf)
   Else
      Response.Write("WARNING couldn't open " & overlaydir _
                     & ": FolderExists() returned FALSE<br>" & vbLf)
   End If
%>

    </td>
   </tr>

   <tr>
    <th><abbr title="Default: FALSE">FE2_OVERLAY_MASK_XY</abbr></th>
    <td>
     <select name="filter:setParam:FE2_OVERLAY_MASK_XY">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_MASK_X</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_MASK_X'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_MASK_Y</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_MASK_Y'></td>
   </tr>

   <tr>
    <th><abbr title="Default: FALSE">FE2_OVERLAY_MASK_RGB</abbr></th>
    <td>
     <select name="filter:setParam:FE2_OVERLAY_MASK_RGB">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_MASK_R</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_MASK_R'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_MASK_G</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_MASK_G'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_MASK_B</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_MASK_B'></td>
   </tr>

   <tr>
    <th><abbr title="Default: TOP LEFT">FE2_OVERLAY_POS</abbr></th>
    <td>
     <select name="filter:setParam:FE2_OVERLAY_POS">
      <option value=""></option>
      <option value="<%=FE2_OVERLAY_POS_MODE_TOPLEFT%>">FE2_OVERLAY_POS_MODE_TOPLEFT</option>
      <option value="<%=FE2_OVERLAY_POS_MODE_BOTLEFT%>">FE2_OVERLAY_POS_MODE_BOTLEFT</option>
      <option value="<%=FE2_OVERLAY_POS_MODE_CENTER%>">FE2_OVERLAY_POS_MODE_CENTER</option>
      <option value="<%=FE2_OVERLAY_POS_MODE_TOPRIGHT%>">FE2_OVERLAY_POS_MODE_TOPRIGHT</option>
      <option value="<%=FE2_OVERLAY_POS_MODE_BOTRIGHT%>">FE2_OVERLAY_POS_MODE_BOTRIGHT</option>
      <option value="<%=FE2_OVERLAY_POS_MODE_XY%>">FE2_OVERLAY_POS_MODE_XY</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_POS_X</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_POS_X'></td>
   </tr>
   <tr>
    <th><abbr title="Default: 0">FE2_OVERLAY_POS_Y</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_OVERLAY_POS_Y'></td>
   </tr>

  </table>

 </td>
</tr>
<!-- END - OVERLAY filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_PNGEX' value='vfilter:'
          onchange="toggle_ftable('filter_pngex',this.checked)">
   FE2_FILTER_PNGEX
  </label>

  <table id='filter_pngex' class='disabled'>
   <tr>
    <th><abbr title="Default: output file directory">FE2_PNGEX_OUTPUT_DIRECTORY</abbr></th>
    <td><input type='text' name='filter:setParamAsStr:FE2_PNGEX_OUTPUT_DIRECTORY'></td>
   </tr>

   <tr>
    <th><abbr title="Default: none">FE2_PNGEX_FILENAME_PREFIX</abbr></th>
    <td><input type='text' name='filter:setParamAsStr:FE2_PNGEX_FILENAME_PREFIX'></td>
   </tr>

   <tr>
    <th><abbr title="Default: none">FE2_PNGEX_FILENAME_SUFFIX</abbr></th>
    <td><input type='text' name='filter:setParamAsStr:FE2_PNGEX_FILENAME_SUFFIX'></td>
   </tr>

   <tr>
    <th><abbr title="Default: input width">FE2_PNGEX_WIDTH</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_WIDTH'></td>
   </tr>

   <tr>
    <th><abbr title="Default: input height">FE2_PNGEX_HEIGHT</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_HEIGHT'></td>
   </tr>

   <tr>
    <th><abbr title="Default: FALSE">FE2_PNGEX_EXPORT_FIRST_FRAME_PNG</abbr></th>
    <td>
     <select name="filter:setParam:FE2_PNGEX_EXPORT_FIRST_FRAME_PNG">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="Default: FALSE">FE2_PNGEX_ENABLE_ALPHA</abbr></th>
    <td>
     <select name="filter:setParam:FE2_PNGEX_ENABLE_ALPHA">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="interval in ms; Default: disabled">FE2_PNGEX_EXPORT_INTERVAL</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_EXPORT_INTERVAL'></td>
   </tr>

   <tr>
    <th><abbr title="comma delimited, e.g. t0,t1,t2,...tn">FE2_PNGEX_EXPORT_TIME_STRING</abbr></th>
    <td><input type='text' name='filter:setParamAsStr:FE2_PNGEX_EXPORT_TIME_STRING'></td>
   </tr>

   <tr>
    <th><abbr title="Default: FALSE">FE2_PNGEX_EXPORT_CUE_POINTS</abbr></th>
    <td>
     <select name="filter:setParam:FE2_PNGEX_EXPORT_CUE_POINTS">
     <option value=""></option>
     <option value="<%=FE2_PNGEX_CP_ALL%>">All cue points (FE2_PNGEX_CP_ALL)</option>
     <option value="<%=FE2_PNGEX_CP_NAV%>">Only navigation cue points (FE2_PNGEX_CP_NAV)</option>
     <option value="<%=FE2_PNGEX_CP_EVENT%>">Only event cue points (FE2_PNGEX_CP_EVENT)</option>
     </select>
    </td>
   </tr>

   <tr>
    <th><abbr title="[-1,9] Default: -1 (Z_DEFAULT_COMPRESSION)">FE2_PNGEX_COMPRESSION_LEVEL</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_COMPRESSION_LEVEL'></td>
   </tr>

   <tr><th><b>Automatic PNG Export Options:</b></th><td></td></tr>

   <tr>
    <th>FE2_PNGEX_AUTO_EXPORT_COUNT</th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_AUTO_EXPORT_COUNT'></td>
   </tr>

   <tr>
    <th><abbr title="start time in ms; Default: 0">FE2_PNGEX_AUTO_EXPORT_START_TIME</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_AUTO_EXPORT_START_TIME'></td>
   </tr>

   <tr>
    <th><abbr title="stop time in ms; Default: <clip length>">FE2_PNGEX_AUTO_EXPORT_END_TIME</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_AUTO_EXPORT_END_TIME'></td>
   </tr>

   <tr>
    <th><abbr title="Default: 0">FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD'></td>
   </tr>

  </table>

 </td>
</tr>
<!-- END - PNGEX filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_ROTATE' value='vfilter:'
          onchange="toggle_ftable('filter_rotate',this.checked)">
   FE2_FILTER_ROTATE
  </label>

  <table id='filter_rotate' class='disabled'>
   <tr>
    <th><abbr title="Default: 0. valid: {0,90,180,270}">FE2_ROTATE_ANGLE</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_ROTATE_ANGLE'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - ROTATE filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_SCALE' value='vfilter:'
          onchange="toggle_ftable('filter_scale',this.checked)">
   FE2_FILTER_SCALE
  </label>

  <table id='filter_scale' class='disabled'>
   <tr>
    <th><abbr title="Default: input image width">FE2_SCALE_WIDTH</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_SCALE_WIDTH'></td>
   </tr>

   <tr>
    <th><abbr title="Default: input image height">FE2_SCALE_HEIGHT</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_SCALE_HEIGHT'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - SCALE filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_SHARPEN' value='vfilter:'
          onchange="toggle_ftable('filter_sharpen',this.checked)">
   FE2_FILTER_SHARPEN
  </label>

  <table id='filter_sharpen' class='disabled'>
   <tr>
    <th>(FE2_FILTER_SHARPEN defines no parameters)</th>
   </tr>
  </table>

 </td>
</tr>
<!-- END - SHARPEN filter parameters -->

<tr><th><b>Audio Filters</b></th></tr>

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_HIGHPASS' value='afilter:'
          onchange="toggle_ftable('filter_highpass',this.checked)">
   FE2_FILTER_HIGHPASS
  </label>

  <table id='filter_highpass' class='disabled'>
   <tr>
    <th><abbr title="Default: 0.707">FE2_HIGHPASS_Q</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_HIGHPASS_Q'></td>
   </tr>

   <tr>
    <th>FE2_HIGHPASS_CUTOFF</th>
    <td><input type='text' name='filter:setParam:FE2_HIGHPASS_CUTOFF'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - HIGHPASS filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_LOWPASS' value='afilter:'
          onchange="toggle_ftable('filter_lowpass',this.checked)">
   FE2_FILTER_LOWPASS
  </label>

  <table id='filter_lowpass' class='disabled'>
   <tr>
    <th><abbr title="Default: 0.707">FE2_LOWPASS_Q</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_LOWPASS_Q'></td>
   </tr>

   <tr>
    <th>FE2_LOWPASS_CUTOFF</th>
    <td><input type='text' name='filter:setParam:FE2_LOWPASS_CUTOFF'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - LOWPASS filter parameters -->

<tr>
 <td>
  <label>
   <input type='checkbox' class='filter'
          name='FE2_FILTER_RESAMPLE' value='afilter:'
          onchange="toggle_ftable('filter_resample',this.checked)">
   FE2_FILTER_RESAMPLE
  </label>

  <table id='filter_resample' class='disabled'>
   <tr>
    <th><abbr title="Default: 0">FE2_RESAMPLE_RATE</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_RESAMPLE_RATE'></td>
   </tr>

   <tr>
    <th><abbr title="Default: 0">FE2_RESAMPLE_CHANNELS</abbr></th>
    <td><input type='text' name='filter:setParam:FE2_RESAMPLE_CHANNELS'></td>
   </tr>
  </table>

 </td>
</tr>
<!-- END - RESAMPLE filter parameters -->

</table>
</fieldset>

<!-- ##MUXERS####################################################################### -->
<hr>
<fieldset class='collapsed' id="muxers">
<legend onclick='toggle_expand(this)'>Muxers</legend>
<table>

<tr>
 <td>
 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_3GP'
         onfocus="set_muxer_visible('tgptable')">
  FE2_MUXER_3GP&nbsp;
 </label>
 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_3G2'
         onfocus="set_muxer_visible('tg2table')">
  FE2_MUXER_3G2&nbsp;
 </label>
 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_MOV'
         onfocus="set_muxer_visible('movtable')">
  FE2_MUXER_MOV&nbsp;
 </label>
 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_MP4'
         onfocus="set_muxer_visible('mp4table')">
  FE2_MUXER_MP4&nbsp;
 </label>
 <br>

 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_FLV'
         onfocus="set_muxer_visible('flvtable',true)">
  FE2_MUXER_FLV&nbsp;
 </label>
 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_SWF'
         onfocus="set_muxer_visible('swftable',true)">
  FE2_MUXER_SWF
 </label>
 <br>

 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_FXM'
         onfocus="set_muxer_visible('fxmtable',true)">
  FE2_MUXER_FXM&nbsp;
 </label>
 <br>

 <label>
  <input type='radio' name='muxer:' value='FE2_MUXER_WEBM'
         onfocus="set_muxer_visible('webmtable',true)">
  FE2_MUXER_WEBM&nbsp;
 </label>
 </td>
</tr>

<tr>
 <td>
 <!-- 3GP muxer parameters -->
 <table id='tgptable' class='hidden'>
   <tr>
    <th><abbr title="Default: FALSE">FE2_ISOMEDIA_FASTSTART</abbr></th>
    <td>
     <select name="muxer:setParam:FE2_3GP_FASTSTART">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>
 </table>
 <!-- END - 3GP muxer parameters -->

 <!-- 3G2 muxer parameters -->
 <table id='tg2table' class='hidden'>
   <tr>
    <th><abbr title="Default: FALSE">FE2_ISOMEDIA_FASTSTART</abbr></th>
    <td>
     <select name="muxer:setParam:FE2_3G2_FASTSTART">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>
 </table>
 <!-- END - 3G2 muxer parameters -->

 <!-- FLV muxer parameters -->
 <table id='flvtable' class='hidden'>
  <tr>
   <th><abbr title="Format = cueptNAME '=' cueptTIME_SECONDS e.g. 'evtpt0=343.0'">
       FE2_FLV_CUEPT_EVENT</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_FLV_CUEPT_EVENT'></td>
  </tr>

  <tr>
      <th><abbr title="Format = cueptNAME '=' cueptTIME_SECONDS e.g. 'navpt0=343.0'">
       FE2_FLV_CUEPT_NAV</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_FLV_CUEPT_NAV'></td>
  </tr>

  <tr>
   <th><abbr title="e.g. 'cuept_name&amp;n0=v0&amp;n1=v1...'">
       FE2_FLV_CUEPT_PARAM</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_FLV_CUEPT_PARAM'></td>
  </tr>

  <tr>
    <th><abbr title="Select specific metadata entries to enable. Default for each item is provided.">
              FE2_FLV_METADATA_ENABLE</abbr></th>
    <td>
      <table id='flv_metadata_enable' class=''>
       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_DURATION'><abbr title="Default: Enabled">MD_DURATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_DURATION' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_DURATION' value='<%=MD_DURATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_DATASIZE'><abbr title="Default: Enabled">MD_DATASIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_DATASIZE' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_DATASIZE' value='<%=MD_DATASIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_SIZE'><abbr title="Default: Enabled">MD_AUDIO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_SIZE' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_SIZE' value='<%=MD_AUDIO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_SIZE'><abbr title="Default: Enabled">MD_VIDEO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_SIZE' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_SIZE' value='<%=MD_VIDEO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_DATARATE'><abbr title="Default: Enabled">MD_AUDIO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_DATARATE' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_DATARATE' value='<%=MD_AUDIO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_DATARATE'><abbr title="Default: Enabled">MD_VIDEO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_DATARATE' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_DATARATE' value='<%=MD_VIDEO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_CODECID'><abbr title="Default: Enabled">MD_AUDIO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_CODECID' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_AUDIO_CODECID' value='<%=MD_AUDIO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_CODECID'><abbr title="Default: Enabled">MD_VIDEO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_CODECID' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_VIDEO_CODECID' value='<%=MD_VIDEO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_WIDTH'><abbr title="Default: Enabled">MD_WIDTH</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_WIDTH' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_WIDTH' value='<%=MD_WIDTH%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_HEIGHT'><abbr title="Default: Enabled">MD_HEIGHT</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_HEIGHT' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_HEIGHT' value='<%=MD_HEIGHT%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_FRAMERATE'><abbr title="Default: Enabled">MD_FRAMERATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_FRAMERATE' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_FRAMERATE' value='<%=MD_FRAMERATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_CANSEEKTOEND'><abbr title="Default: Enabled">MD_CANSEEKTOEND</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_CANSEEKTOEND' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_CANSEEKTOEND' value='<%=MD_CANSEEKTOEND%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTTIMESTAMP'><abbr title="Default: Enabled">MD_LASTTIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTTIMESTAMP' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTTIMESTAMP' value='<%=MD_LASTTIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTKEYFRAMETIMESTAMP'><abbr title="Default: Disabled">MD_LASTKEYFRAMETIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTKEYFRAMETIMESTAMP' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTKEYFRAMETIMESTAMP' value='<%=MD_LASTKEYFRAMETIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTKEYFRAMELOCATION'><abbr title="Default: Disabled">MD_LASTKEYFRAMELOCATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTKEYFRAMELOCATION' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_LASTKEYFRAMELOCATION' value='<%=MD_LASTKEYFRAMELOCATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_KEYFRAMES'><abbr title="Default: Disabled">MD_KEYFRAMES</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_KEYFRAMES' name='muxer:setParam:FE2_FLV_METADATA_ENABLE:MD_KEYFRAMES' value='<%=MD_KEYFRAMES%>'></td>
       </tr>
      </table>
    </td>
  </tr>

  <tr>
    <th><abbr title="Select specific metadata entries to enable. Default for each item is provided.">
              FE2_FLV_METADATA_DISABLE</abbr></th>
    <td>
      <table id='flv_metadata_disable' class=''>
       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_DURATION'><abbr title="Default: Enabled">MD_DURATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_DURATION' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_DURATION' value='<%=MD_DURATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_DATASIZE'><abbr title="Default: Enabled">MD_DATASIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_DATASIZE' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_DATASIZE' value='<%=MD_DATASIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_SIZE'><abbr title="Default: Enabled">MD_AUDIO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_SIZE' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_SIZE' value='<%=MD_AUDIO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_SIZE'><abbr title="Default: Enabled">MD_VIDEO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_SIZE' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_SIZE' value='<%=MD_VIDEO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_DATARATE'><abbr title="Default: Enabled">MD_AUDIO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_DATARATE' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_DATARATE' value='<%=MD_AUDIO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_DATARATE'><abbr title="Default: Enabled">MD_VIDEO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_DATARATE' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_DATARATE' value='<%=MD_VIDEO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_CODECID'><abbr title="Default: Enabled">MD_AUDIO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_CODECID' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_AUDIO_CODECID' value='<%=MD_AUDIO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_CODECID'><abbr title="Default: Enabled">MD_VIDEO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_CODECID' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_VIDEO_CODECID' value='<%=MD_VIDEO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_WIDTH'><abbr title="Default: Enabled">MD_WIDTH</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_WIDTH' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_WIDTH' value='<%=MD_WIDTH%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_HEIGHT'><abbr title="Default: Enabled">MD_HEIGHT</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_HEIGHT' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_HEIGHT' value='<%=MD_HEIGHT%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_FRAMERATE'><abbr title="Default: Enabled">MD_FRAMERATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_FRAMERATE' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_FRAMERATE' value='<%=MD_FRAMERATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_CANSEEKTOEND'><abbr title="Default: Enabled">MD_CANSEEKTOEND</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_CANSEEKTOEND' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_CANSEEKTOEND' value='<%=MD_CANSEEKTOEND%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTTIMESTAMP'><abbr title="Default: Enabled">MD_LASTTIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTTIMESTAMP' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTTIMESTAMP' value='<%=MD_LASTTIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTKEYFRAMETIMESTAMP'><abbr title="Default: Enabled">MD_LASTKEYFRAMETIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTKEYFRAMETIMESTAMP' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTKEYFRAMETIMESTAMP' value='<%=MD_LASTKEYFRAMETIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTKEYFRAMELOCATION'><abbr title="Default: Enabled">MD_LASTKEYFRAMELOCATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTKEYFRAMELOCATION' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_LASTKEYFRAMELOCATION' value='<%=MD_LASTKEYFRAMELOCATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_KEYFRAMES'><abbr title="Default: Enabled">MD_KEYFRAMES</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_KEYFRAMES' name='muxer:setParam:FE2_FLV_METADATA_DISABLE:MD_KEYFRAMES' value='<%=MD_KEYFRAMES%>'></td>
       </tr>
      </table>
    </td>
  </tr>
 </table>
 <!-- END - FLV muxer parameters -->

 <!-- FXM muxer parameters -->
 <table id='fxmtable' class='hidden'>
  <tr>
   <th><abbr title="Format = cueptNAME '=' cueptTIME_SECONDS e.g. 'evtpt0=343.0'">
       FE2_FXM_CUEPT_EVENT</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_FXM_CUEPT_EVENT'></td>
  </tr>

  <tr>
      <th><abbr title="Format = cueptNAME '=' cueptTIME_SECONDS e.g. 'navpt0=343.0'">
       FE2_FXM_CUEPT_NAV</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_FXM_CUEPT_NAV'></td>
  </tr>

  <tr>
   <th><abbr title="e.g. 'cuept_name&amp;n0=v0&amp;n1=v1...'">
       FE2_FXM_CUEPT_PARAM</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_FXM_CUEPT_PARAM'></td>
  </tr>

  <tr>
    <th><abbr title="Select specific metadata entries to enable. Default for each item is provided.">
              FE2_FXM_METADATA_ENABLE</abbr></th>
    <td>
      <table id='fxm_metadata_enable' class=''>
       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_DURATION'><abbr title="Default: Enabled">MD_DURATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_DURATION' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_DURATION' value='<%=MD_DURATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_DATASIZE'><abbr title="Default: Enabled">MD_DATASIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_DATASIZE' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_DATASIZE' value='<%=MD_DATASIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_SIZE'><abbr title="Default: Enabled">MD_AUDIO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_SIZE' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_SIZE' value='<%=MD_AUDIO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_SIZE'><abbr title="Default: Enabled">MD_VIDEO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_SIZE' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_SIZE' value='<%=MD_VIDEO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_DATARATE'><abbr title="Default: Enabled">MD_AUDIO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_DATARATE' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_DATARATE' value='<%=MD_AUDIO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_DATARATE'><abbr title="Default: Enabled">MD_VIDEO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_DATARATE' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_DATARATE' value='<%=MD_VIDEO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_CODECID'><abbr title="Default: Enabled">MD_AUDIO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_CODECID' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_AUDIO_CODECID' value='<%=MD_AUDIO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_CODECID'><abbr title="Default: Enabled">MD_VIDEO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_CODECID' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_VIDEO_CODECID' value='<%=MD_VIDEO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_WIDTH'><abbr title="Default: Enabled">MD_WIDTH</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_WIDTH' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_WIDTH' value='<%=MD_WIDTH%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_HEIGHT'><abbr title="Default: Enabled">MD_HEIGHT</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_HEIGHT' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_HEIGHT' value='<%=MD_HEIGHT%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_FRAMERATE'><abbr title="Default: Enabled">MD_FRAMERATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_FRAMERATE' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_FRAMERATE' value='<%=MD_FRAMERATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_CANSEEKTOEND'><abbr title="Default: Enabled">MD_CANSEEKTOEND</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_CANSEEKTOEND' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_CANSEEKTOEND' value='<%=MD_CANSEEKTOEND%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTTIMESTAMP'><abbr title="Default: Enabled">MD_LASTTIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTTIMESTAMP' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTTIMESTAMP' value='<%=MD_LASTTIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTKEYFRAMETIMESTAMP'><abbr title="Default: Disabled">MD_LASTKEYFRAMETIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTKEYFRAMETIMESTAMP' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTKEYFRAMETIMESTAMP' value='<%=MD_LASTKEYFRAMETIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTKEYFRAMELOCATION'><abbr title="Default: Disabled">MD_LASTKEYFRAMELOCATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTKEYFRAMELOCATION' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_LASTKEYFRAMELOCATION' value='<%=MD_LASTKEYFRAMELOCATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_KEYFRAMES'><abbr title="Default: Disabled">MD_KEYFRAMES</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_KEYFRAMES' name='muxer:setParam:FE2_FXM_METADATA_ENABLE:MD_KEYFRAMES' value='<%=MD_KEYFRAMES%>'></td>
       </tr>
      </table>
    </td>
  </tr>

  <tr>
    <th><abbr title="Select specific metadata entries to enable. Default for each item is provided.">
              FE2_FXM_METADATA_DISABLE</abbr></th>
    <td>
      <table id='fxm_metadata_disable' class=''>
       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_DURATION'><abbr title="Default: Enabled">MD_DURATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_DURATION' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_DURATION' value='<%=MD_DURATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_DATASIZE'><abbr title="Default: Enabled">MD_DATASIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_DATASIZE' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_DATASIZE' value='<%=MD_DATASIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_SIZE'><abbr title="Default: Enabled">MD_AUDIO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_SIZE' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_SIZE' value='<%=MD_AUDIO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_SIZE'><abbr title="Default: Enabled">MD_VIDEO_SIZE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_SIZE' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_SIZE' value='<%=MD_VIDEO_SIZE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_DATARATE'><abbr title="Default: Enabled">MD_AUDIO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_DATARATE' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_DATARATE' value='<%=MD_AUDIO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_DATARATE'><abbr title="Default: Enabled">MD_VIDEO_DATARATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_DATARATE' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_DATARATE' value='<%=MD_VIDEO_DATARATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_CODECID'><abbr title="Default: Enabled">MD_AUDIO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_CODECID' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_AUDIO_CODECID' value='<%=MD_AUDIO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_CODECID'><abbr title="Default: Enabled">MD_VIDEO_CODECID</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_CODECID' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_VIDEO_CODECID' value='<%=MD_VIDEO_CODECID%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_WIDTH'><abbr title="Default: Enabled">MD_WIDTH</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_WIDTH' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_WIDTH' value='<%=MD_WIDTH%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_HEIGHT'><abbr title="Default: Enabled">MD_HEIGHT</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_HEIGHT' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_HEIGHT' value='<%=MD_HEIGHT%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_FRAMERATE'><abbr title="Default: Enabled">MD_FRAMERATE</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_FRAMERATE' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_FRAMERATE' value='<%=MD_FRAMERATE%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_CANSEEKTOEND'><abbr title="Default: Enabled">MD_CANSEEKTOEND</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_CANSEEKTOEND' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_CANSEEKTOEND' value='<%=MD_CANSEEKTOEND%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTTIMESTAMP'><abbr title="Default: Enabled">MD_LASTTIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTTIMESTAMP' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTTIMESTAMP' value='<%=MD_LASTTIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTKEYFRAMETIMESTAMP'><abbr title="Default: Disabled">MD_LASTKEYFRAMETIMESTAMP</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTKEYFRAMETIMESTAMP' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTKEYFRAMETIMESTAMP' value='<%=MD_LASTKEYFRAMETIMESTAMP%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTKEYFRAMELOCATION'><abbr title="Default: Disabled">MD_LASTKEYFRAMELOCATION</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTKEYFRAMELOCATION' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_LASTKEYFRAMELOCATION' value='<%=MD_LASTKEYFRAMELOCATION%>'></td>
       </tr>

       <tr>
        <th><label for='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_KEYFRAMES'><abbr title="Default: Disabled">MD_KEYFRAMES</abbr></label></th>
        <td><input type='checkbox' id='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_KEYFRAMES' name='muxer:setParam:FE2_FXM_METADATA_DISABLE:MD_KEYFRAMES' value='<%=MD_KEYFRAMES%>'></td>
       </tr>
      </table>
    </td>
  </tr>
 </table>
 <!-- END - FXM muxer parameters -->

 <!-- MOV muxer parameters -->
 <table id='movtable' class='hidden'>
   <tr>
    <th><abbr title="Default: FALSE">FE2_ISOMEDIA_FASTSTART</abbr></th>
    <td>
     <select name="muxer:setParam:FE2_MOV_FASTSTART">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>
 </table>
 <!-- END - MOV muxer parameters -->

 <!-- MP4 muxer parameters -->
 <table id='mp4table' class='hidden'>
   <tr>
    <th><abbr title="Default: FALSE">FE2_ISOMEDIA_FASTSTART</abbr></th>
    <td>
     <select name="muxer:setParam:FE2_MP4_FASTSTART">
     <option value=""></option>
     <option value="<%=on2false%>">FALSE</option>
     <option value="<%=on2true%>">TRUE</option>
     </select>
    </td>
   </tr>
 </table>
 <!-- END - MP4 muxer parameters -->

 <!-- SWF muxer parameters -->
 <table id='swftable' class='hidden'>
  <tr>
   <th><abbr title="Default: video width">FE2_SWF_WIDTH</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_WIDTH'></td>
  </tr>

  <tr>
   <th><abbr title="Default: video height">FE2_SWF_HEIGHT</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_HEIGHT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: video framerate">FE2_SWF_FRAMERATE</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_FRAMERATE'></td>
  </tr>

  <tr>
   <th>FE2_SWF_LOOP_COUNT</th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_LOOP_COUNT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: none">FE2_SWF_EMBEDDED_URL</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_SWF_EMBEDDED_URL'></td>
  </tr>

  <tr>
   <th><abbr title="Default: _self">FE2_SWF_EMBEDDED_URL_TARGET</abbr></th>
   <td>
    <select name='muxer:setParamAsStr:FE2_SWF_EMBEDDED_URL_TARGET'>
     <option value=""></option>
     <option value="_self">_self</option>
     <option value="_blank">_blank</option>
     <option value="_parent">_parent</option>
     <option value="_top">_top</option>
    </select>
    </td>
  </tr>

  <tr>
   <th><abbr title="Default: EmbeddedUrlIsLoadMovie">FE2_SWF_EMBEDDED_URL_TYPE</abbr></th>
   <td>
    <select name='muxer:setParam:FE2_SWF_EMBEDDED_URL_TYPE'>
     <option value=""></option>
     <option value="<%=EmbeddedUrlIsGetUrl%>">EmbeddedUrlIsGetUrl</option>
     <option value="<%=EmbeddedUrlIsLoadMovie%>">EmbeddedUrlIsLoadMovie</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="e.g. n0=v0&amp;n1=v1...">FE2_SWF_ADD_VARIABLE</abbr></th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_SWF_ADD_VARIABLE'></td>
  </tr>

  <tr><th><b>Preloader Settings:</b></th><td></td></tr>

  <tr>
   <th><abbr title="Default: SwfPreloaderNone">FE2_SWF_PRELOAD_TYPE</abbr></th>
   <td>
    <select name='muxer:setParam:FE2_SWF_PRELOAD_TYPE'>
     <option value=""></option>
     <option value="<%=SwfPreloaderNone%>">SwfPreloaderNone</option>
     <option value="<%=SwfFixedPreloader%>">SwfFixedPreloader</option>
     <option value="<%=SwfAdaptivePreloader%>">SwfAdaptivePreloader</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 20">FE2_SWF_FIXED_PRELOAD_PCT</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_FIXED_PRELOAD_PCT'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 1.1">FE2_SWF_ADAPTIVE_PRELOAD_BUFFER_FACTOR</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_ADAPTIVE_PRELOAD_BUFFER_FACTOR'></td>
  </tr>

  <tr><th><b>Start Settings:</b></th><td></td></tr>

  <tr>
   <th><abbr title="Default: SwfOnMovieStartAutomatically">FE2_SWF_ON_START_OPTION</abbr></th>
   <td>
    <select name='muxer:setParam:FE2_SWF_ON_START_OPTION'>
     <option value=""></option>
     <option value="<%=SwfOnMovieStartAutomatically%>">SwfOnMovieStartAutomatically</option>
     <option value="<%=SwfOnMovieStartOnClick%>">SwfOnMovieStartOnClick</option>
     <option value="<%=SwfOnMovieStartWait%>">SwfOnMovieStartWait</option>
     <option value="<%=SwfOnMovieStartEmbedSTOP%>">SwfOnMovieStartEmbedSTOP</option>
    </select>
   </td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_SWF_START_BLANK_FRAME</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_START_BLANK_FRAME'></td>
  </tr>

  <tr>
   <th><abbr title="Default: 0">FE2_SWF_START_WAIT_SEC</abbr></th>
   <td><input type='text' name='muxer:setParam:FE2_SWF_START_WAIT_SEC'></td>
  </tr>

  <tr><th><b>End Settings:</b></th><td></td></tr>

  <tr>
   <th><abbr title="Default: SwfOnMovieEndNothing">FE2_SWF_ON_END_OPTION</abbr></th>
   <td>
    <select name='muxer:setParam:FE2_SWF_ON_END_OPTION'>
     <option value=""></option>
     <option value="<%=SwfOnMovieEndNothing%>">SwfOnMovieEndNothing</option>
     <option value="<%=SwfOnMovieEndSTOP%>">SwfOnMovieEndSTOP</option>
     <option value="<%=SwfOnMovieEndLoop%>">SwfOnMovieEndLoop</option>
     <option value="<%=SwfOnMovieEndUnload%>">SwfOnMovieEndUnload</option>
     <option value="<%=SwfOnMovieEndLoadMovie%>">SwfOnMovieEndLoadMovie</option>
    </select>
   </td>
  </tr>

  <tr>
   <th>FE2_SWF_ON_END_URL</th>
   <td><input type='text' name='muxer:setParamAsStr:FE2_SWF_ON_END_URL'></td>
  </tr>
 </table>
 <!-- END - SWF muxer parameters -->

 <!-- WEBM muxer parameters -->
 <table id='webmtable' class='hidden'>
   <tr>
    <th>(FE2_MUXER_WEBM defines no parameters)</th>
   </tr>
 </table>
 <!-- END - WEBM muxer parameters -->

</table>
</fieldset>

<!-- ##END FORM######################################################### -->
<hr>
<p>
 <input type="submit" value="Start Encode">
 <input type='reset' value='Reset' onclick='reset_tables();'>
</p>
</form>
</div>
</body>
</html>

process_sample.aspx

<%@ Page Language="VB" Strict = "true"%>
<%@ Assembly Name = "Interop.flixengine_com"%>
<%@ Import Namespace="flixengine_com" %>
<%@ Import Namespace="System.Reflection" %>
<%@ Import Namespace="System.Runtime.InteropServices" %>
<%@ Import Namespace="System.IO" %>

<script runat="server">
'==========================================================================
'
'  Copyright (c) On2 Technologies Inc. All Rights Reserved.
'
'--------------------------------------------------------------------------
'
'  File:        $Workfile$
'               $Revision$
'
'  Last Update: $DateUTC$
'
'--------------------------------------------------------------------------

'process_sample.aspx
' Receive a form via post from flix2_sample.aspx, treating each name=value pair
' as a function/param pair.
' These map to the Flix Engine COM API and each function that has a valid
' param will be called.
' Once setup is complete, calls encode() to produce an output file located in outdir

'Global Variables
Dim flix As Flix
Dim codec, filter, muxer As IFlixPlgn
Dim prefix, outdir As String

'Prints the status codes of the Flix Engine object
Sub PrintEncoderStatus()
    Dim flixerr As FE2_errno
    Dim syserr As Integer

    flix.errno_(flixerr, syserr)
    Response.Write("<p>Encoder Status<br>" & vbLf)
    Response.Write("&nbsp;flix.getEncoderState: " & flix.getEncoderState() & "<br>" & vbLf)
    Response.Write("&nbsp;flix.errno_: flixerrno:" & flixerr _
                   & " syserrno:" & syserr & "</p>" & vbLf)
End Sub

'Handles a COMException object while processing any of the functions
'which are included in the HTML table when executed.
'errNum is passed in as the error value of the object
'in which the exception originated.
Sub HandleComException(ByVal e As COMException, ByVal errNum as Integer)
    Response.Write("<td align=""center"">" & errNum & "</td>" & vbLf)
    Response.Write("</tr></table><br>" & vbLf)
    PrintStackTrace(e)
End Sub

'Handles an Exception passed to it and calls Finish() to exit.
Sub PrintStackTrace(ByVal e As Exception)
    Response.Write("<br>" & e.ToString() & "<br>" & vbLf)
    Finish()
End Sub

'Parses parameters which have been passed as form items from flix2_sample.asp
Sub ParseParams()
    Response.Write("<table border='1' cellpadding='5'>" _
                    & "<caption>Flix Function Calls</caption>" & vbLf _
                    & "<tr><th>Function Name</th><th>Return Value</th></tr>" _
                    & vbLf)

    Dim x As Integer
    Dim name, value As String
    For x = 0 to (Request.Form.Count -1)
        name = Request.Form.GetKey(x)
        If (Len( CStr( Request.Form.Item(name))) > 0) Then
            value = Request.Form.Item(name)
            'Response.Write(name & " = " & value & "<br>" & vbLf)
            If (name = "setOutputFile") Then
                SimpleSet(name, outdir & value)
            ElseIf ((name = "vcodec:") Or (name = "acodec:")) Then
                InitCodec(value)
            ElseIf ((InStr(1, value, "afilter:") > 0) _
                    Or (InStr(1, value, "vfilter:") > 0)) Then
                InitFilter(name)
            ElseIf (name = "muxer:") Then
                InitMuxer(value)
            Else
                Dim temp() As String = Split(name, ":", -1)
                If (temp(0) = "codec") Then
                    CodecInterface(temp(1), temp(2), value)
                ElseIf (temp(0) = "filter") Then
                    FilterInterface(temp(1), temp(2), value)
                ElseIf (temp(0) = "muxer") Then
                    MuxerInterface(temp(1), temp(2), value)
                Else
                    SimpleSet(name, value)
                End If
            End If
        End If
    Next
End Sub

'Creates the Flix Engine Object and displays information about the object
Sub LoadEngine()
    '
    ' retrieve the main engine interface, IFlix
    '
    Try
        flix = New Flix()
    Catch e as COMException
        PrintStackTrace(e)
    End Try

    'Print Flix Version information
    Try
        Response.Write("Flix Engine COM library. Flix Engine v" _
                       & flix.version() & vbLf)
        Response.Write(" COM v" & flix.com_version() & "<br>" & vbLf & vbLf)
        Response.Write(Replace(flix.copyright(), vbLf, "<br>" & vbLf) _
                       & "<br>" & vbLf & vbLf)
    Catch e as COMException
        PrintStackTrace(e)
    End Try
End Sub

'Finishes the HTML page and ends execution
Sub Finish()
    'Release all global references
    codec = Nothing
    filter = Nothing
    muxer = Nothing

    If Not IsNothing(flix) Then
        PrintEncoderStatus()
        If (flix.isEncoderRunning = 1) Then
            Try
                flix.stopEncoding()
            Catch e as COMException
                Response.Write("flix.stopEncoding Error: " & vbLf _
                               & flix.flixerrno() & "<br>" & vbLf)
                Response.Write(e.ToString() & "<br>" & vbLf)
            End Try
            If (flix.isEncoderRunning = 1) Then
                Response.Write("Flix failed to stop encoding, but did not report an error!<br>" & vbLf)
            End if
        End If
        'Force the cleanup of IFlix.
        'Though this is not strictly necessary in this sample, as
        'it is about to exit, if the script is more involved it may be
        'necessary so the input file can be moved as destruction of
        'the underlying FLIX2HANDLE occurs within IFlix's destructor.
        'By explicitly defining a WeakReference and removing the strong
        'referenece to the flix object we are guaranteeing that it will
        'not survive the garbage collection.
        Dim wkref As WeakReference = New WeakReference(flix)
        flix = Nothing
        System.GC.Collect(System.GC.GetGeneration(wkref))
        System.GC.WaitForPendingFinalizers()
    End If

    'Close the html page
    Response.Write("</body>" & vbLf & "</html>" & vbLf)
    Response.End
End Sub

'Executes the method funcName with arguments args on object targetObject
'Requires System.Reflection
Function ExecuteMethod(ByRef targetObject as Object, ByVal funcName as String, _
                       ByVal args() as Object) As Object
    Dim objectType as Type = targetObject.GetType()
    Try
        ExecuteMethod = objectType.InvokeMember(funcName, BindingFlags.InvokeMethod, _
                                                Nothing, targetObject, args)
    Catch e as TargetInvocationException
        Throw e.InnerException
    End Try
End Function

'Reads property propName from object targetObject
'Requires System.Reflection
Function GetProp(ByRef targetObject as Object, ByVal propName as String) As Object
    Dim objectType as Type = targetObject.GetType()
    Try
        GetProp = objectType.InvokeMember(propName, BindingFlags.GetProperty, _
                                          Nothing, targetObject, Nothing)
    Catch e as TargetInvocationException
        Throw e.InnerException
    End Try
End Function

'Calls an IFlix function with a single parameter
Sub SimpleSet(ByVal func As String, ByVal arg as String)
    Response.Write("<tr><td>flix." & func & "( " & arg &  " )</td>" & vbLf)
    Try
        ExecuteMethod(CType(flix, Object), func,  New Object() {arg})
    Catch e As COMException
        HandleComException(e, flix.sc)
    End Try
    Response.Write("<td align=""center"">" & flix.sc & "</td></tr>" & vbLf)
End Sub

'Adds a codec, creating an IFlixPlgn object.
Sub InitCodec(ByVal name As String)
    'if name is a codec name, e.g. FE2_CODEC_VP6, add an instance
    'we'll assume all IFlixPlgn::setParam's relate to this codec until we
    'hit the next codec name
    Response.Write("<tr><td>flix.addCodec( " & name & " )</td>" & vbLf)
    Try
        codec = flix.addCodec(Cstr(GetProp(CType(flix, Object), name)))
    Catch e as COMException
        HandleCOMException(e, flix.sc)
    End Try
    Response.Write("<td align=""center"">" & flix.sc & "</td></tr>" & vbLf)
End Sub

'Calls a codec-related IFlixPlgn function.
'Assumes that a codec has been added in InitCodec.
Sub CodecInterface(ByVal funcname As String, ByVal name As String, _
                   ByVal value As String)
    Response.Write("<tr><td>codec." & funcname & "(" &  name & ", " _
                    & value & ")</td>" & vbLf)
    Try
        ExecuteMethod(CType(codec, Object), funcname, _
                      New String() {CStr(GetProp(CType(flix, Object), name)), _
                      value})
    Catch e as COMException
        HandleCOMException(e, codec.sc)
    End Try
    Response.Write("<td align=""center"">" & codec.sc & "</td></tr>" & vbLf)
End Sub

'Adds a filter, creating an IFlixPlgn object.
Sub InitFilter(ByVal name As String)
    'if name is a filter name, e.g. FE2_FILTER_CUT, add an instance
    'we'll assume all IFlixPlgn::setParam's relate to this filter until we
    'hit the next filter name
    Response.Write("<tr><td>flix.addFilter( " & name & " )</td>" & vbLf)
    Try
        filter = flix.addFilter(Cstr(GetProp(CType(flix, Object), name)))
    Catch e as COMException
        HandleCOMException(e, flix.sc)
    End Try
    Response.Write("<td align=""center"">" & flix.sc & "</td></tr>" & vbLf)
End Sub

'Calls a filter-related IFlixPlgn function.
'Assumes that a filter has been added in InitFilter.
Sub FilterInterface(ByVal funcname As String, ByVal name As String, _
                    ByVal value As String)

    Response.Write("<tr><td>filter." & funcname & "( " & name & ", "  _
                    & value & " )</td>" & vbLf)
    Try
        ExecuteMethod(CType(filter, Object), funcname, _
                      New String() {CStr(GetProp(CType(flix, Object), name)), _
                      value})
    Catch e as COMException
        HandleCOMException(e, filter.sc)
    End Try
    Response.Write("<td align=""center"">" & filter.sc & "</td></tr>" & vbLf)
End Sub

'Adds a muxer, creating an IFlixPlgn object.
Sub InitMuxer(ByVal name As String)
    'if name is a muxer name, e.g. FE2_MUXER_FLV, add an instance
    'we'll assume all IFlixPlgn::setParam's relate to this muxer until we
    'hit the next muxer name
    Response.Write("<tr><td>flix.addMuxer( " & name & " )</td>" & vbLf)
    Try
        muxer = flix.addMuxer(Cstr(GetProp(CType(flix, Object), name)))
    Catch e as COMException
        HandleCOMException(e, flix.sc)
    End Try
    Response.Write("<td align=""center"">" & flix.sc & "</td></tr>" & vbLf)
End Sub

'Calls a muxer-related IFlixPlgn function.
'Assumes that a muxer has been added in InitMuxer.
Sub MuxerInterface(ByVal funcname As String, ByVal name As String, _
                   ByVal value As String)
    Response.Write("<tr><td>muxer." & funcname & "( " & name & ", "  _
                    & value & " )</td>" & vbLf)
    Try
        ExecuteMethod(CType(muxer, Object), funcname, _
                      New String() {CStr(GetProp(CType(flix, Object), name)), _
                      value})
    Catch e as COMException
        HandleCOMException(e, muxer.sc)
    End Try
    Response.Write("<td align=""center"">" & muxer.sc & "</td></tr>" & vbLf)
End Sub

'Starts the encode and prints encoding updates.
Sub Encode()
    '
    ' start the encode
    '
    Response.Write("<tr><td>flix.encode( )</td>" & vbLf)
    Try
        flix.encode()
    Catch e as COMException
        HandleCOMException(e, flix.sc)
    End Try
    Response.Write("<td align=""center"">" & flix.sc & "</td></tr>" & vbLf)

    '
    ' retrieve the encoding status interface, IEncodingStatus
    '
    Response.Write("<tr><td>flix.encodingStatus( )</td>" & vbLf)
    Dim encStatus As IEncodingStatus
    Try
        encStatus = flix.encodingStatus()
    Catch e as COMException
        HandleCOMException(e, flix.sc)
    End Try
    Response.Write("<td align=""center"">" & flix.sc & "</td></tr>" & vbLf)

    Response.Write("</table>" & vbLf)

    Response.Write("<p>Encoding...(video frames encoded, percent complete). " _
                    & "Total frames will reset when doing 2pass.<br>" & vbLf)

    'Start the progress updates
    Dim isRunning As Integer
    Try
        Do
            isRunning = flix.isEncoderRunning()
            Response.Write("(" & encStatus.totalFrames())
            Response.Write(", " & encStatus.percentComplete() & "%)<br>" & vbLf)
            Threading.Thread.Sleep(1000) '1 second intervals
        Loop Until ((isRunning = 0) or (Response.IsClientConnected() = False))
    Catch e as COMException
        PrintStackTrace(e)
    End Try
    Response.Write("<br>Done!</p>" & vbLf)
End Sub

</script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Flix CGI Process Sample - ASP.NET</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
<body>

<%
' Increase script timeout to allow encodes of long files to complete,
' barring any further server side timeout settings
Server.ScriptTimeout = 43200 '= 12 hour timeout
Response.BufferOutput = False

Response.Write("<hr><p>process_sample.aspx version 1.1<br>" & vbLf)

prefix = "C:\Inetpub\"
outdir = prefix & "flixmedia\out\"

LoadEngine()

Try
    If Directory.Exists(outdir) Then
        Dim temp as StreamWriter = File.CreateText(outdir & "temp.dat")
        temp.Close
    End If
Catch e as Exception
    Response.Write("<p>****************************************<br>" & vbLf)
    Response.Write("<b>WARNING</b>: <i>'" & outdir & "'</i>" _
                   & " MUST exist and be writeable by" _
                   & " <i>flixengine_com.dll</i> as user " _
                   & System.Security.Principal.WindowsIdentity.GetCurrent().Name _
                   & ".<br>" & vbLf)

    Response.Write("Please make <i>'" & outdir & "'</i> accessible or modify" _
                   & " the <tt>outdir</tt> value defined in '" _
                   & Server.MapPath(Request.ServerVariables("SCRIPT_NAME")) _
                   & "'.<br>" & vbLf)
    Response.Write("****************************************</p>"&vbLf)
End Try
'If possible, delete the temp.dat file we created to check writability
Try
    File.Delete(outdir & "temp.dat")
Catch e as Exception
    'Ignore failure - Full Control access is not required for script operation
End Try

ParseParams()
Encode()
Finish()
%>

</body>
</html>

On2 Technologies, Inc Flix Engine Windows documentation, generated on Tue Nov 2 15:38:05 2010 by doxygen 1.6.1