{* * $Revision: 17614 $ * Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates *}

{g->text text="FFMPEG Settings"}

{if !empty($status)}

{if isset($status.saved)} {g->text text="Settings saved successfully"}
{/if} {if isset($status.added)} {g->text text="Watermark successfully added to movie thumbnails"} {/if} {if isset($status.removed)} {g->text text="Watermark successfully removed from movie thumbnails"} {/if}

{/if}

{g->text text="FFMPEG is a graphics toolkit that can be used to process video files that you upload to Gallery. You must install the FFMPEG binary on your server, then enter the path to it in the text box below. If you're on a Unix machine, don't forget to make the binary executable (chmod 755 ffmpeg in the right directory should do it)"}

{if !$AdminFfmpeg.canExec}

{g->text text="The exec() function is disabled in your PHP by the disabled_functions parameter in php.ini. This module cannot be used until that setting is changed."}

{else} {if $AdminFfmpeg.canWatermark} {/if} {g->text text="Path to FFMPEG:"} {g->autoComplete element="giFormPath"} {g->url arg1="view=core.SimpleCallback" arg2="command=lookupFiles" arg3="prefix=__VALUE__" htmlEntities=false} {/g->autoComplete} {if isset($form.error.path.missing)}
{g->text text="You must enter a path to your FFMPEG binary"}
{/if} {if isset($form.error.path.testError)}
{g->text text="The path you entered doesn't contain a valid FFMPEG binary. Use the 'test' button to check where the error is."}
{/if} {if isset($form.error.path.badPath)}
{g->text text="The path you entered isn't a valid path to a ffmpeg binary."}
{/if} {if isset($form.error.path.notExecutable)}
{g->text text="The ffmpeg binary is not executable. To fix it, run chmod 755 %s in a shell." arg1=$form.path}
{/if}

{g->text text="This module can automatically watermark the thumbnails for movies to help distinguish them from photos."} {if $AdminFfmpeg.canWatermark} {g->text text="See sample at right."} {/if}

{if $AdminFfmpeg.canWatermark}
{capture name="cbRemoveWatermark"} {/capture} {g->text text="%sAdd%s or %sRemove%s watermark from all existing movie thumbnails." arg1="" arg3="`$smarty.capture.cbRemoveWatermark`"} {else} {g->text text="Activate another graphics toolkit with watermark support to make this function available."} {/if}
{/if} {if $AdminFfmpeg.isConfigure} {else} {/if}
{if !empty($AdminFfmpeg.tests)}

{g->text text="FFMPEG binary test results"}

{foreach from=$AdminFfmpeg.tests item=test} {/foreach}
{g->text text="Binary Name"} {g->text text="Pass/Fail"}
{$test.name} {if ($test.success)}
{g->text text="Passed"}
{else}
{g->text text="Failed"}
{if ! empty($test.message)} {g->text text="Error messages:"}
{foreach from=$test.message item=line}
{$line}
{/foreach} {/if} {/if}
{if $AdminFfmpeg.mimeTypes || $AdminFfmpeg.mimeTypesEncoder}

{g->text text="Supported MIME Types"}

{if $AdminFfmpeg.mimeTypes}

{g->text text="The FFMPEG module can decode files of the following MIME types"}

{foreach from=$AdminFfmpeg.mimeTypes item=mimeType} {$mimeType}
{/foreach}

{/if} {if $AdminFfmpeg.mimeTypesEncoder}

{g->text text="The FFMPEG module can encode files to the following MIME types"}

{foreach from=$AdminFfmpeg.mimeTypesEncoder item=mimeType} {$mimeType} {if isset($AdminFfmpeg.encodeWarnings.$mimeType)}

{if isset($AdminFfmpeg.encodeWarnings.$mimeType.mute)} {g->text text="Missing required audio codec, encoded videos will not contain sound."} {/if}
{else}
{/if} {/foreach}

{/if}
{/if} {if $AdminFfmpeg.version}

{g->text text="Version Information"}

{foreach from=$AdminFfmpeg.version item=ver} {$ver}
{/foreach}

{/if} {if ($AdminFfmpeg.failCount > 0)}

{g->text one="Debug output (%d failed test)" many="Debug output (%d failed tests)" count=$AdminFfmpeg.failCount arg1=$AdminFfmpeg.failCount} +

{g->text text="We gathered this debug output while testing your Ffmpeg installation. If you read through this carefully you may discover the reason why Ffmpeg failed the tests."}

{/if} {/if}