<?xml version="1.0" encoding="utf-8"?>
<HmsTranscodingConfig version="2.12">
  <TranscoderList>
    <Transcoder>
      <Name>HMSMPEG</Name>
      <Path>hmsmpeg.exe</Path>
      <HomePage>http://www.ffmpeg.org/</HomePage>
      <Download></Download>
    </Transcoder>
    <Transcoder>
      <Name>HmsMPEG</Name>
      <Path>Hmsmpeg.exe</Path>
      <HomePage>http://www.ffmpeg.org/</HomePage>
      <Download></Download>
    </Transcoder>
    <Transcoder>
      <Name>hmsMPEG</Name>
      <Path>hmsmpeg.exe</Path>
      <HomePage>http://www.ffmpeg.org/</HomePage>
      <Download></Download>
    </Transcoder>
  </TranscoderList>
  <TranscodingProfileList>
    <Profile>
      <TranscoderName>HMSMPEG</TranscoderName>
      <TranscodingCondition></TranscodingCondition>
      <TranscodingConditionSyntaxType>Нет скрипта</TranscodingConditionSyntaxType>
      <TranscodingComment></TranscodingComment>
      <TranscodingFolder>Транскодирование с перекодированием видео</TranscodingFolder>
      <TranscodingMediaType>3</TranscodingMediaType>
      <TranscodingMimeType></TranscodingMimeType>
      <TranscodingMimeTypeScript>begin
  if SameText(cfgTranscodingFileFormat, &apos;MPEG (DVD)&apos;) then
    FileExt := &apos;mpg&apos;
  else if Pos(&apos;MPEGTS&apos;, cfgTranscodingFileFormat) &gt; 0 then
    FileExt := &apos;ts&apos;
  else if Pos(&apos;ASF&apos;, cfgTranscodingFileFormat) &gt; 0 then
    FileExt := &apos;wmv&apos;
  else if SameText(cfgTranscodingFileFormat, &apos;MP4&apos;) then
    FileExt := &apos;mp4&apos;
  else if SameText(cfgTranscodingFileFormat, &apos;MPEG1&apos;) then
    FileExt := &apos;mpeg&apos;
  else
    FileExt := &apos;&apos;;    
  if FileExt &lt;&gt; &apos;&apos; then
    MimeType := HmsGetMimeType(FileExt)    
  else            
    MimeType := &apos;&apos;
end.</TranscodingMimeTypeScript>
      <TranscodingMimeTypeSyntaxType>PascalScript</TranscodingMimeTypeSyntaxType>
      <TranscodingMode>0</TranscodingMode>
      <TranscodingParams>var
  s, sCrop, sVF: string; nH: Extended; nCrop: integer;
begin
  if mpHeight = 0 then HmsRetrieveProperties;
  if Trim(mpDVDAspectRatio) = &apos;&apos; then begin 
    mpDVDAspectRatio := &apos;16:9&apos;;
    CurrentMediaItem[mpiDVDAspectRatio] := mpDVDAspectRatio;
    HmsLogMessage(1, mpTitle+&apos;: &apos;+IntToStr(mpWidth)+&apos;x&apos;+IntToStr(mpHeight)+&apos;  &apos;+mpDVDAspectRatio);
  end;
  TranscodingParams := IfThen(mpInternetItem, 
     HmsTranscodingProfileParams(&apos;Интернет-телевидение&apos;),
     IfThen(mpSubItemsCount &gt; 0,
        HmsTranscodingDvdParams,    
        HmsTranscodingInputParams + HmsTranscodingVideoParams + 
        HmsTranscodingMapParams(mpAudioStreamNo)));
  // CROP ---------------------------------------------------------------------
  if mpHeight &gt; 0 then begin 
    nH := mpWidth / (16/9);
    sCrop := &apos;&apos;;
    if (nH &lt; mpHeight) then begin
      nCrop := Round(Round(mpHeight - nH)/2);
      sCrop := Format(&apos;crop=in_w:in_h-%d:0:%d,&apos;, [nCrop*2, nCrop]);
      sVF := Format(&apos;scale=%d:%d,pad=%d:%d:0:0:0x000000,setdar=16:9&apos;, [cfgTranscodingScreenWidth, cfgTranscodingScreenHeight-2, cfgTranscodingScreenWidth, cfgTranscodingScreenHeight]);
      If HmsRegExMatch(&apos;(-vf\s+".*?")&apos;, TranscodingParams, s) Then
        TranscodingParams := ReplaceStr(TranscodingParams, s, &apos;-vf "&apos;+sCrop+sVF+&apos;"&apos;);
    end;
  end;
  // --------------------------------------------------------------------------
end.</TranscodingParams>
      <TranscodingParamsSyntaxType>PascalScript</TranscodingParamsSyntaxType>
      <TranscodingProfile>Фильмы (основной) + AR16:9 CROP</TranscodingProfile>
      <TranscodingProfileActive>-1</TranscodingProfileActive>
      <TranscodingProfilePriority>6</TranscodingProfilePriority>
      <TranscodingProfileUuid>eeee735a-8d97-491f-b725-687c8b12a016</TranscodingProfileUuid>
    </Profile>
  </TranscodingProfileList>
</HmsTranscodingConfig>
