MCEBuddy - Advanced Settings, Commands and Tweaking

Advanced concepts to use MCEBuddy

Refer to the MCEBuddy Profiles Basics page to learn about basic Profiles creation

NOTE:

  • Advanced Conversion Parameters apply to profiles.conf
  • Do NOT edit mcebuddy.conf. As of v2.3.13 ALL Advanced Configuration Parameters (except FFmpegBackupRemux) in mcebuddy.conf can be accessed through the GUI, Settings → Expert Settings page
  • DO NOT REPLACE THE NEW CONFIGURATION FILES WITH THE OLD FILES AS PARAMETERS IN THE NEW FILES ARE ADDED/UPDATED WITH EACH RELEASE.

TABLE OF CONTENTS



MCEBuddy GUI Startup Options

MCEBuddy support the following options while starting the GUI (MCEBuddy.GUI.exe). Include these parameters by right clicking on the application short cut in the Start Menu and add them to the target path.

/startmin - Start the GUI minimized
/startengine - Force the engine to start (after connection with engine is established)

e.g. "C:\Program Files\MCEBuddy2x\MCEBuddy.GUI.exe" /startmin /startengine

Note: The parameters will come after the double quotes close and a space between each parameter

MCEBuddy Command Line Interface (CLI)

MCEBuddy provides a CLI with limited capability to interact with the MCEBuddy engine as an alternative to the GUI. This can be useful when used with custom commands and scripts. Run the MCEBuddy.UserCLI.exe without any parameters to get a list of supported commands and usage details.

Tuning Comskip Commercial Detection

See this topic of more information: Tuning Comskip and Custom Comskip INI's (Country / Channel specific)

Turning ShowAnalyzer Commercial Detection (v2.1.2+)

MCEBuddy supports ShowAnalyzer version 1.0 and greater. Once you download and install ShowAnalyzer it will show up as an option on the conversion profile settings page under commercial detection. See this topic for more information: Tuning ShowAnalyzer

Multiple Audio Tracks in Converted File (v2.3.12+)

This only works with FFMPEG based profiles and if the source file has multiple audio tracks. Handbrake and MEncoder do not support converting/copying multiple audio tracks.

Select <Default> as the Audio Language in the conversion options AND add -map 0:a -map 0:v to the ffmpeg-video section for the FFMPEG profile and it will copy/convert all audio tracks.

Filename and Showname Pattern Matching (v2.2.3+)

MCEBuddy supports multiple wildcard name matching to match shownames and filenames using the ; operator. E.g. once can specify *.wtv;*.avi*.mpg* as the name selection criteria or ncis*;house*.mpg* to match all names that start with ncis and house (ending with a .mpg).

If you want to specify a name avoid list, i.e. select all/abc files EXCEPT xyz, then prefix the name selection criteria with a ~ operator. E.g. ncis*;~ncis miami* will select all files that start with ncis but NOT those starting with ncis miami. E.g. *.*;~*.mp4;~*.avi will select all files except those starting with .mp4 and .avi

Name matching is case insensitive.

To select all default video types use the expression [video] which will match the following expression *.dvr-ms;*.wtv;*.asf;*.avi;*.divx;*.dv;*.flv;*.gxf;*.m1v;*.m2v;*.m2ts;*.m4v;*.mkv;*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;*.mpeg2;*.mpeg4;*.mpg;*.mts;*.mxf;*.ogm;*.ts;*.vob;*.wmv;*.ts

For advanced users MCEBuddy also supports REGEX expressions. To provide a regex expression prefix the regex matching pattern with regex: and then the regex pattern (this is a very advanced concept).

Multiple Conversion Tasks Customized by ShowName or FileName (v2.2.3+)

Refer to Filename and Showname Pattern Matching above to understand how to create patterns for filename and shownames.

You can create multiple conversions tasks in MCEBuddy. Each conversion task will process each file in the queue. Order of conversions tasks do not matter when creating filename and showname filters. If you want to create custom conversion tasks for different files/shows you can do so with the help of the Filenameor Shownamepattern matching filters in the Conversion Tasks Settings page, under Advanced Settings.

For e.g. if you want to create 3 tasks, one that processes all NCIS files, one that processes all Star Trek files and one that processes all other files (i.e. default). To do so you will first create 3 conversion tasks.

In the first conversion task, where you want to process NCIS, under Filenameor Showname filters (depending on what you want to filter based on, the name of the file or the name of the show taken from the metadata), you will enter NCIS*. This tell the conversion task to process only those files starting with NCIS.

In the second conversion task, where you want to process Star Trek files, under the Filename or Showname filter you will enter Star Trek*.

In the third conversion task, you want to process ALL other files (ie default), then you will enter the following *;~NCIS*;~Star Trek* . The first * tells the conversion task to process ALL files, the*~NCIS** tells the task NOT to process files starting with NCIS and ~Star Trek* tells the task NOT to process files starting with Star Trek, i.e. process all files except those which are being processed by the first two tasks.

Custom File Renaming Pattern (v2.1.6+)

MCEBuddy allows you to create your own custom file name and directory structure using the metadata stored in the file and downloaded from the internet.

The following commands are currently supported by MCEBuddy

  • %originalfilename% - Name of the source file (without the path or extension)
  • %originalext% - Extension of the source file(without the .)
  • %relativesourcepath% - Relative folder path of the source file to the monitoring root path. (v2.4.6+)
  • %showname% - Showname / Title
  • %episodename% - Episode Name / Subtitle
  • %season%## - Season No, one # for each digit
  • %episode%## - Episode No, one # for each digit
  • %network% - Network channel on the show was recorded (v2.1.10+)
  • %rating% - Parental rating (v2.3.14+)
  • %premiereyear% - Series Premiere Year (v2.3.14+)
  • %premieremonth% - Series Premiere Month (v2.3.14+)
  • %premieremonthshort% - Series Premiere Month Name Abbreviation (v2.3.14+)
  • %premieremonthlong% - Series Premiere Month Full Name (v2.3.14+)
  • %premiereday% - Series Premiere Day (v2.3.14+)
  • %premieredayshort% - Series Premiere Day of Week Abbreviation (v2.3.14+)
  • %premieredaylong% - Series Premiere Day of Week Full Name (v2.3.14+)
  • %airyear% - Original Air Year
  • %airmonth% - Original Air Month
  • %airmonthshort% - Original Air Month Name Abbreviation (v2.3.11+)
  • %airmonthlong% - Original Air Month Full Name (v2.3.11+)
  • %airday% - Original Air Day
  • %airdayshort% - Original Air Day of Week Abbreviation (v2.3.11+)
  • %airdaylong% - Original Air Day of Week Full Name (v2.3.11+)
  • %airhour% - 24 Hour of air date (v2.3.6+)
  • %airhour12% - 12 Hour of air date (v2.4.2+)
  • %airhourampm% - Air date hour in AM/PM (v2.3.12+)
  • %airminute% - Minute of air date (v2.3.6+)
  • %recordyear% - Video Record Year
  • %recordmonth% - Video Record Month
  • %recordmonthshort% - Video Record Month Name Abbreviation (v2.3.11+)
  • %recordmonthlong% - Video Record Month Full Name (v2.3.11+)
  • %recordday% - Video Record Day
  • %recorddayshort% - Video Record Day of Week Abbreviation (v2.3.11+)
  • %recorddaylong% - Video Record Day of Week Full Name (v2.3.11+)
  • %recordhour% - 24 Video Record Hour (v2.1.10+)
  • %recordhour12% - 12 Video Record Hour (v2.4.2+)
  • %recordhourampm% - Video Record Hour in AM/PM (v2.1.12+)
  • %recordminute% - Video Record Minute (v2.1.10+)
  • %ismovie%<RenamePatternIfTrue,RenamePatternIfFalse> - If recording is a movie rename using True pattern, else rename using False pattern (v2.3.12+)
  • %issport%<RenamePatternIfTrue,RenamePatternIfFalse> - If recording is a sport show rename using True pattern, else rename using False pattern (v2.3.15+)
  • %ifseason%<RenamePatternIfTrue,RenamePatternIfFalse> - If season if greater than 0 rename using True pattern, else rename using False pattern (v2.4.2+)
  • %ifepisode%<RenamePatternIfTrue,RenamePatternIfFalse> - If episode if greater than 0 rename using True pattern, else rename using False pattern (v2.4.2+)
  • %ifpremieredate%<RenamePatternIfTrue,RenamePatternIfFalse> - If Series Premiere Date is present rename using True pattern, else rename using False pattern (v2.4.10+)
  • %ifairdate%<RenamePatternIfTrue,RenamePatternIfFalse> - If Original Air Date is present rename using True pattern, else rename using False pattern (v2.4.10+)
  • %ifrecorddate%<RenamePatternIfTrue,RenamePatternIfFalse> - If Video Record Date is present rename using True pattern, else rename using False pattern (v2.4.10+)
  • %imdbmovieid% - IMDb Movie ID (v2.5.8+)
  • %movieid% - TMDB Movie ID (v2.5.8+)
  • %seriesid% - TVDB Series ID (v2.5.8+)
  • %airingdbid% - sageDbId from the SageTV Airing tag (v2.4.1+)
  • %mediafiledbid% - sageDbId from the SageTV MediaFile tag (v.2.4.1+)
  • \ - Directory Separator

E.g.:

TVShows\%showname%\Season %season%\%showname% - S%season%##E%episode%## - %episodename% - %airyear%_%airmonth%_%airday%

Will produce:

TVShows\CSI\Season 1\CSI - S01E02 - Best of times - 2012_01_06.<ext>


E.g.:

Recording\%ismovie%<Movies\%showname%,TVShows\%showname%\Season %season%\%showname% - S%season%##E%episode%##>-Converted

Will produce:

Recording\Movies\Star Wars-Converted.<ext> (for a movie)

OR

Recording\TVShows\CSI\Season 1\CSI - S01E02-Converted.<ext> (for non movies)


The extension is added automatically depending upon the profile specifications.

The number of #'s at the end for Episode and Season indicates the number of digits in the written number. E.g. %season%## will give the output at 01 while %season%### will give the output at 001. #'s are optional, leaving them out will write the number without any formatting. i.e. %season% will give 1 as the output.

Audio Sync/Missing Issues

Sometimes the audio and video go out of sync due to corruption at the start of the video. To solve this problem add the parameter -ss 10 at the BEGINNING of the <encoder>-video parameter in the profile. DO NOT put this parameter in the general parameters section. (do not forget the - before the ss and make sure there is a space between ss and 10)

E.g. ffmpeg-video=-ss 10

This indicates that ffmpeg will skip the first 10 seconds of the video/audio after decoding it (if you put this in the general parameters section then the encoder will skip over first 10 which DOES NOT solve the problem, the video/audio need to be first decoded and then discarded to be put back in sync).

You can play with the number to find the right mix, it can be as low as 3 or as high as 30 depending upon the corruption. You’ll be surprised how many videos are corrupted at the start and FFMPEG is very sensitive to corruption as far as audio sync goes. You often cannot see the corruption while play the video (it will look okay), these are at the frame level and often ignored by players.

Also try to play with the AudioDelay parameter (given above). Set to skip to see if that resolves the issue. If the Audio sync is still off, try setting the AudioDelay number to +ve or -ve to advance or retard the audio sync and see how it behaves. It is a trial and error process.

If you’re using FFMPEG or Handbrake as the encoder with your profile AND your output extension is .MP4 or .M4V AND your audio is going out of sync ONLY when you remove commercials (i.e. the Audio is in sync without commercials removal), try to use an alternative commercial stripping by using the command CutMP4Alternative=true in your profile.

If that doesn’t work try using UniversalCommercialRemover=true in your profile. See above for more details.

Sometimes the Audio gets cut out completely in between a video. Try using PreConversionCommercialRemover=true in your profile. See above for more details.

Using Custom Filenames and Custom Metadata (v2.3.12+)

See Metadata matching, extraction, renaming from files and downloading from the Internet for more details.

Also, if MCEBuddy finds an XML file created during the conversion process (e.g. from Comskip), it will copy the XML file to to the destination directory along with the converted file.

Using Custom EDL Files (v2.3.12+)

MCEBuddy looks for a EDL file along with the original source video (with the same source video filename). If it finds the EDL file with the source video it copies the EDL file to the output directory along with the converted file.

MCEBuddy gives preference to the Custom EDL file over Comskip/ShowAnalyzer generated EDL files.

Using Custom SRT Files (v2.1.8+)

MCEBuddy looks for a SRT file along with the original source video OR in the temp working directory (with the same source video filename). If it finds the SRT file in either place it copies the SRT file to the output directory along with the converted video (with preference given to a SRT file in the temp working directory).

If ExtractCC is enabled in the Conversion Task -> Advanced Settings it will trim the Custom SRT file to be in sync with the EDL file (commercial removal). MCEBuddy gives preference to the Custom SRT files over the CC generated SRT file.

Comskip can be set to generate SRT files (output_srt=1) or CCExtractor can be used using from Custom Commands (if the ExtractCC from the GUI fails to work) to generate SRT files during the conversion process. Once generated, MCEBuddy will copy them to the output directory along with the converted file.

MultiThreading Support (v2.1.2+)

MCEBuddy by default calculates how many threads are required for the programs to run optimally. However this can be overridden manually by specifying the threads in the general parameters in the profiles file for each profile and encoder type.





(profiles.conf) Advanced Conversion Parameters

(apply to each profile in profiles.conf)

Profile parameters, when specified, override any conversion task options (v2.3.14+)
e.g. SkipCropping and AutoDeInterlace

Inserting Special Commands (v2.3.12+)

You can get MCEBuddy to insert special commands in the 4 sections of the profile

  • <encoder>-general
  • <encoder>-video
  • <encoder>-audio
  • <encoder>-audioac3

The following special commands will be replaced by MCEBuddy at runtime:

  • <source_without_ext> - Source filename without extension
  • <source> - source filename
  • <converted_without_ext> - Output filename without extension
  • <converted> - Output filename

E.g. mencoder-general = -sub "<converted_without_ext>.srt" -ss 3

will be replaced at runtime with (assuming the output file is c:\temp\test file.avi):

mencoder-general = -sub "c:\temp\Test File.srt" -ss 3

NOTE: MCEBuddy does not put quotes around the replacement parameters, some commands expect quotes, be sure to put quotes where required.

ForceWTVStreamsRemuxing=true (v2.3.12+)

This parameter tells MCEBuddy to first use DirectShow to extract the audio and video streams from the WTV file and remux them into a TS file. This has the advantage that it uses Windows codecs, is fast and also supports encrypted/Copy Protected content. The disadvantage is that it only supports one audio and video stream in the WTV file.

NOTE: Streams remuxing is also used as the last option for WTV files if all else fails.

DisableDVRMSStreamsRemuxing=true (v2.4.9+)

This parameter tells MCEBuddy to skip DirectShow and instead fall back to the special FFMPEG remuxer to remux the audio and video streams from the DVRMS file into a TS file. Note that DirectShow has the advantage that it uses Windows codecs, is fast and also supports encrypted/Copy Protected content. Use this option if the Windows DirectShow codecs are having trouble remuxing the file.

NOTE: By default the DirectShow streams remuxer is used first followed by the special FFMPEG remuxer if the DirectShow remuxer fails for the DVRMS file.

AllowAllCopyRemuxing=true (v2.3.15+)

This parameter tells MCEBuddy to internally allow remuxing all video codec formats into a TS format without converting it to MPEG2 video first. This can be used when one wants to change the container format while retaining the original video without recoding it. E.g. from WMV to MP4 or WTV to MKV or WTV to TS, or even WMV to WMV and remove commercials etc.

NOTE: When using this option it possible that other underlying programs (like comskip, ccextractor) etc may not support the video codec being copied and may fail to function properly.

AllowH264CopyRemuxing=true (v2.3.12+)

This parameter tells MCEBuddy to internally allow remuxing H264 video into a TS format without converting it to MPEG2 video first. This can be used when one wants to change the container format while retaining the original H264 video without recoding it. E.g. from WTV to MP4 or WTV to MKV or WTV to TS, or even WTV to WTV and remove commercials etc.

NOTE: By default this is enabled, also keep in mind that the free version of Comskip is SLOW to detect H264 commercials. Upgrade to the latest version of MCEBuddy or use the Donator version of Comskip (http://www.comskip.org/) or use ShowAnalyzer to speed up the H264 commercial detection.

(v2.3.12 - v2.3.13) NOTE: By default this is disabled. The limitation on this is that free version of Comskip included in these builds of MCEBuddy does not support H264 commercial detection, however ShowAnalyzer can be used in it’s place.

AllowH265CopyRemuxing=true (v2.4.10+)

This parameter tells MCEBuddy to internally allow remuxing H265 video into a TS format without converting it to MPEG2 video first. This can be used when one wants to change the container format while retaining the original H265 video without recoding it. E.g. from MKV to MP4 or MP4 to TS, or even MKV to MKV and remove commercials etc.

NOTE: By default this is enabled, also keep in mind that ShowAnalyzer does not support H.265 and the free version of Comskip is SLOW to detect H265 commercials. Upgrade to the latest version of MCEBuddy or use the Donator version of Comskip (http://www.comskip.org/) to speed up the H265 commercial detection.

AllowAV1CopyRemuxing=true (v2.6.2+)

This parameter tells MCEBuddy to internally allow remuxing AV1 video into a TS format without converting it to MPEG2 video first. This can be used when one wants to change the container format while retaining the original AV1 video without recoding it. E.g. from MKV to MP4 or MP4 to TS, or even MKV to MKV and remove commercials etc.

NOTE: By default this is enabled, also keep in mind that ShowAnalyzer and the free version of Comskip do not support AV1 . Upgrade to the latest version of MCEBuddy or use the Donator version of Comskip (http://www.comskip.org/) to speed up the AV1 commercial detection.

UseWTVRemuxsupp=true (v2.3.11+)

This parameter tells MCEBuddy to use Remuxsupp FIRST to remux WTV files before trying other remuxers. This can help with some videos (rare) that not remuxed properly with FFMPEG or other remuxers but work with Remuxsupp. Usually Remuxsupp does not work well with many videos.

NOTE: This only helps in certain situations where files remuxed by FFMPEG are not able to be converted by MEncoder.

ForceEDL=true (v2.1.4+)

This is only effective when Comskip is enabled and Custom EDL files are not provided. When the commercial removal option is set to Comskip it tells MCEBuddy to force use the EDL file instead of the EDLP file from Comskip. EDL/EDLP files indicate the sections (timestamps) of the video to cut (commercials), however the timestamps differ slight for each video format, some use EDL and others EDLP. If your video/show is getting cut before/after commercials by a few seconds then try using this parameter.

NOTE: By default MCEBuddy uses EDL for .TS files and EDLP for all others

ForceEDLP=true (v2.1.4+)

This is only effective when Comskip is enabled and Custom EDL files are not provided. When the commercial removal option is set to Comskip it tells MCEBuddy to use the EDLP file instead of the EDL file from Comskip. EDL/EDLP files indicate the sections (timestamps) of the video to cut (commercials), however the timestamps differ slight for each video format, some use EDL and others EDLP. If your video/show is getting cut before/after commercials by a few seconds then try using this parameter.

NOTE: By default MCEBuddy uses EDL for .TS files and EDLP for all others

FixedResolution=true (v2.1.4+)

This tells MCEBUddy not to change source video resolution while converting (keep source resolution). When this parameter is set, MCEBuddy ignores the Max Width slider on the Conversion Task -> Advanced Settings page.

(v2.3.13+) When this is set, it also fixes the bitrate to what is specified in the profile. Normally MCEBuddy will adjust the bitrate as specified in the profile (which is optimized for 720 pixel width) to compensate for the change in converted video resolution (up or down) as limited by the Max Width slider. If the user does not want to limit the resolution then they should increase the Max Width slider in the Conversion Task Settings -> Advanced Settings page all the way to the right.

SkipCropping=true (v2.1.4+)

This tells MCEBuddy not to autodetect crop information and skip cropping the video. This helps when the video edges are being cut off or if you have a video with no black bars on the sides to be removed, it will speed up the conversion process. Auto cropping can also sometimes skew the aspect ratio, so setting this will make MCEBuddy skip cropping.

SubtitleBurn=true (v2.4.1+)

This parameter works only with ffmpeg and handbrake profiles. If this is enabled, MCEBuddy looks for a valid SRT (subtitle) file and if it finds one during the conversion process, it will use that SRT file to burn the subtitles into the video during conversion. This only works if the video is being encoded (i.e. copy codec is NOT being used). This only works if there is a valid SRT file. So ensure that you have a SRT file along with the original video (MCEBuddy will copy it) or you have enabled Extract Closed Caption in Conversion Task settings. Once the subtitles have been successfully burnt the SRT file is deleted and not copied to the output.

2ChannelAudio=true (v2.1.5 - v2.1.9, v2.2.13+)

When this parameter is set MCEBuddy limits the output audio to 2 channels irrespective of number of inputs channels
This can be useful to when specialized devices/software can read only 2 channels (stereo)

NOTE: By default MCEBuddy sets the output channels to the number of input channels

(As of 2.1.10, this can also be set in the Conversion Task GUI - profile overrides GUI)

MEncoderEDLSkip=true (v2.1.4+)

This parameter tells MCEBuddy not to use the EDL command with MEncoder to remove commercials from the video during conversion (which can save time but sometime cause the audio to go out of sync in rare cases).

If this parameter is set then MCEBuddy will remove the commercials AFTER the conversion is completed by using MP4Box to cut the commercials. Please do not set CutMP4Alternative=true when using this parameter.

This can be used to if converting with Mencoder is causing your Audio to go out of sync while removing commercials (it has no impact if commercial stripping is disabled) and none of the other parameters (-ss 30 or mencoder-audiodelay=skip) do not work.

UniversalCommercialRemover=true (v2.3.11+)

When is parameter is set it tells MCEBuddy to use the Universal Commercial Remover after the conversion is complete (where as the default are very specific commercials remover functions for each file type, but they can sometimes fail as they are very sensitive to errors and sync issues). This helps when the standard profile is failing or causing audio issues during the commercial removal stage. While this cutter can leave some artifacts where the video is cut, however it works on ALL file types and will work successfully without any audio sync issues.

The other advantage of UniversalCommercialRemover=true is that it support files with multiple audio tracks and preserves them where as other mechanisms may or may not support depending up the file type.

(v2.3.12+) Setting UniversalCommercialRemover=true will force all commercials to be cut post conversion, unless PreConversionCommercialRemover=true is set. This can be used an option if commercial removal are failing or if a new file format is being used which is not natively supported by MCEBuddy.

PreConversionCommercialRemover=true (v2.3.12+)

When is parameter is set it tells MCEBuddy to use the Universal Commercial Remover to remove the commercials before the conversion (rather than the usual case of removing commercials after conversion). This helps when the conversion is failing during the commercial removal stage. While this cutter can leave some artifacts where the video is cut, however it works on ALL file types and will work successfully without any audio sync issues. This option is independent of UniversalCommercialRemover. If the preconversion commercial removal fails, it will automatically fall back to the post conversion commercial remover.

CommercialMergeTool=ffmpeg/avidemux (v2.3.14+)

There are two tools used to merge video segments after removing the commercials. This parameter can be set to force use of the tool. By default MCEBuddy will determine the best tool to use, however if the conversion is hanging or if you want this can be changed. The tools are ffmpeg and avidemux. avidemux is great for single audio tracks and for most general purposes but it can sometimes cause MCEBuddy to hang due to bugs in it. ffmpeg is a very stable tool, supports multiple audio tracks but sometimes it leaves artifacts when merging segments at the frame the segments are merged. Occasionally ffmpeg can fail the merging but will not hang MCEBuddy.

e.g. CommercialMergeTool=ffmpeg

NOTE: If using CommercialMergeTool=avidemux for non-TS profiles, then PreConversionCommercialRemover=true should also be set.

CutMP4Alternate=true (v2.1.4+)

When is parameter is set it tells MCEBuddy to use an alternative mechanism for remove commercials from MP4 and M4V files after the conversion is complete. By default MCEBuddy uses MP4Box to remove commercials during the last step, if this parameter is set it will use MEncoder to remove commercials. This helps sometime when the Audio Goes out of sync with the video after using Comskip/ShowAnalyzer but is in sync without Comskip.

NOTE: This parameter is only effective when using using FFMPEG or Handbrake encoders. When using mEncdoder as the encoder, this parameter has NO effect as the commercial will always be stripped during the conversion itself (unlike FFMPEG and Handbrake, who’s commercials are stripped out AFTER the conversion is complete).

CommercialSkipCut=true (v2.1.4+)

If this parameter is set, it tells MCEBuddy to do the Commercial Scan but NOT to cut the commercials. Instead it will copy the generated EDL file to the output directory along with the converted file.
Comskip generates 2 types of files, EDL and EDLP. Use the ForceEDL and ForceEDLP command to specify which file to use. See above for more details.

NOTE: When this parameter is set, the Closed Caption/SRT files generated will NOT be trimmed to match the EDL file.

CopyPropertiesFile=true (v2.3.15+)

If this parameter is set, it tells MCEBuddy to copy the SageTV properties file if found along with the original video. The properties file is copied along with the converted file to the output directory.

CopyLogFile=true (v2.3.14+)

If this parameter is set, it tells MCEBuddy to copy the log file generated by Comskip during commercial detection. The log file is copied along with the converted file to the output directory.

AutoDeinterlace=true (v2.3.14+)

If this parameter is set it tells MCEBuddy to automatically detect the scan type (interlaced, progressive or telecine) of the video and override the profile parameters to optimize the quality of the video.

<encoder>-AudioDelay=xxx/auto/skip (v2.1.2-2.2.18, 2.2.19+)

This parameter is set for each encoder type, e.g. ffmpeg, mencoder or handbrake

When xxx is set to skip then it tells MCEBuddy to skip auto correction of audio delay (sync). This is useful for some file formats such as AVI where audio gets skewed on auto correction.

If this parameter is set to a numerical value, then this parameter is used to manually specify the audio delay correction to correct audio sync, xxx is a +ve or a -ve number in seconds.
A value of 0 means that MCEBuddy will skip any delay correction.

If the value is equal to auto, it adds or subtracts the delay specified to the auto calculated audio delay for the video.

By default this this parameter is set to skip.

E.g. mencoder-AudioDelay=0.85

<encoder>-AudioOptimized=true (v2.4.1+)

This parameter is set for each encoder type, e.g. ffmpeg, mencoder or handbrake
When set this tells MCEBuddy that the audio parameters profile (<encoder>-audio) has been optimized and fixed and that MCEBuddy should not change any parameters within that section of the profile. This means MCEBuddy will not adjust any audio parameters like DRC, audio language selection, volume adjustment, channel selection etc.

<encoder>-VideoOptimized=true (v2.4.1+)

This parameter is set for each encoder type, e.g. ffmpeg, mencoder or handbrake
When set this tells MCEBuddy that the video parameters profile (<encoder>-video) has been optimized and fixed and that MCEBuddy should not change any parameters within that section of the profile. This means MCEBuddy will not adjust any audio parameters like cropping, scaling, bitrate, interlacing etc.

<encoder>-unsupported=<(optional) extension + (optional) video codec + (optional) audio codec> (v2.3.3+)

e.g. mencoder-unsupported=ts+h264,wtv+h264+ac3,mpeg2+aac,dts,h265,wmv

For each encoder in the order one can specify an unsupported combination of container, video and audio codec each separated by a +. Multiple conditions are separated by a , If the source video contains any of these combinations the conversion will be forcefully failed for the particular encoder and it will continue trying to convert using the next encoder specified in the order parameter.
This can be useful when you’re trying to separate encoder and file formats, e.g. you want to use ffmpeg for WTV HD recordings and MEncoder for everything else.

<encoder>-UsingHardwareEncoding=<true/false> (v.2.3.15)+

e.g. handbrake-UsingHardwareEncoding=true

When true, this flag will tell MCEBuddy NOT to detect/auto adjust the hardware encoder codec or any hardware encoding related settings as this profile has been already optimized for hardware encoding.

Currently MCEBuddy only supports auto hardware enabling/tuning for handbrake, so this setting only applied to handbrake profiles. FFMpeg and MEncoder profiles needs to be manually written/optimized to handle hardware encoding.

<encoder>-DisableSoftwareEncoderFallback=<true/false> (v.2.4.3)+

e.g. handbrake-DisableSoftwareEncoderFallback=true

When true, this flag will tell MCEBuddy NOT to fallback to the software encoder for that encoder tool if hardware encoding fails.

DisableEncoderReordering=<true/false> (v.2.4.3)+

e.g. DisableEncoderReordering=true

When true, this flag will tell MCEBuddy NOT to change the order of the encoders specified the profile. By default MCEBuddy will look at the hardware encoding capabilities of the encoders specified in the order (for that system and job at hand) and will reorder the encoders to use the best hardware encoders first to optimize hardware encoding if available.

Running Custom Commands (v2.1.8+)

MCEBuddy can provide the user with an option to run a single command at the following points in this order during the conversion process:

Refer to the Conversion Process Overview to understand the exact location of each Custom Command.

1. (v2.3.14+) At the very beginning of the conversion process just BEFORE extracting the metadata from the source file (before the remuxing or commercial detection or conversion). This custom command can executed with the following parameters. To do so the first 4 parameters need to be defined for the profile for which a pre conversion custom command needs to be run.

NOTE: Since this is run before the MetaData extraction, the only information available is about the original/source filenames/paths and conversion parameters like profiles/task name etc. There is no information about the recording metadata.

PreMetaCustomCommandPath=<Full Path/Relative of the executable>
PreMetaCustomCommandParameters=<Optional parameters to be passed - see below for list>
PreMetaCustomCommandHangPeriod=<0 or +ve number of seconds>
PreMetaCustomCommandCritical=<true or false>
PreMetaCustomCommandUISession=<true or false>
PreMetaCustomCommandShowWindow=<true or false>
PreMetaCustomCommandExitCodeCheck=<true or false>

2. (v2.3.13+) At the beginning of the conversion process just after extracting the metadata from the source file (before the remuxing or commercial detection or conversion). This custom command can executed with the following parameters. To do so the first 4 parameters need to be defined for the profile for which a pre conversion custom command needs to be run.

PreCustomCommandPath=<Full Path/Relative of the executable>
PreCustomCommandParameters=<Optional parameters to be passed - see below for list>
PreCustomCommandHangPeriod=<0 or +ve number of seconds>
PreCustomCommandCritical=<true or false>
PreCustomCommandUISession=<true or false>
PreCustomCommandShowWindow=<true or false>
PreCustomCommandExitCodeCheck=<true or false>

3. (v2.3.15+) After remuxing, closed caption extraction and commercial detection is complete, just before cutting the commercials. This custom command can executed with the following parameters. To do so the first 4 parameters need to be defined for the profile for which a pre conversion custom command needs to be run.

PreCommercialRemovalCustomCommandPath=<Full Path/Relative of the executable>
PreCommercialRemovalCustomCommandParameters=<Optional parameters to be passed - see below for list>
PreCommercialRemovalCustomCommandHangPeriod=<0 or +ve number of seconds>
PreCommercialRemovalCustomCommandCritical=<true or false>
PreCommercialRemovalCustomCommandUISession=<true or false>
PreCommercialRemovalCustomCommandShowWindow=<true or false>
PreCommercialRemovalCustomCommandExitCodeCheck=<true or false>

4. (v.2.1.8+) At the end of the conversion process just after the file is renamed and before it is moved to the destination directory. To do so the first 4 parameters need to be defined for the profile for which a post conversion custom command needs to be run.

CustomCommandPath=<Full Path/Relative of the executable>
CustomCommandParameters=<Optional parameters to be passed - see below for list>
CustomCommandHangPeriod=<0 or +ve number of seconds>
CustomCommandCritical=<true or false>
CustomCommandUISession=<true or false>
CustomCommandShowWindow=<true or false>
CustomCommandExitCodeCheck=<true or false>

5. (v.2.3.14+) At the very end of the conversion process after all the files are moved to the destination directory. To do so the first 4 parameters need to be defined for the profile for which a post conversion custom command needs to be run.

PostCustomCommandPath=<Full Path/Relative of the executable>
PostCustomCommandParameters=<Optional parameters to be passed - see below for list>
PostCustomCommandHangPeriod=<0 or +ve number of seconds>
PostCustomCommandCritical=<true or false>
PostCustomCommandUISession=<true or false>
PostCustomCommandShowWindow=<true or false>
PostCustomCommandExitCodeCheck=<true or false>

In the PreMetaCustomCommandParameters, PreCustomCommandParameters, PreCommercialRemovalCustomCommand, CustomCommandParameters and PostCustomCommandParameters you can use the following parameters:

  • %convertedfile% - will be replaced with the full name and path of the (empty for PreMetaCustom) (v2.4.3+ expected destination filename for PreCommercialRemovalCustom and PreCustom) (converted and renamed file for Custom) (moved/destination converted filename for PostCustom) as part of the parameters passed to the custom program.
  • %convertedfilename% - Name of the converted file (without the path or extension) (v2.4.9+)
  • %convertedext% - Extension of the converted file (without the .) (v2.4.1+)
  • %destinationpath% - Full path of the destination folder where the converted file is kept (v2.3.15+)
  • %convertedfilesizemb% - will be replaced with size of the converted video in MB with 2 decimal numbers. (-1 if there is an error, 0 if file doesn’t exist) (v2.4.4+)
  • %sourcefile% - will be replaced with the name and path of the original source video.
  • %originalfilepath% - Full path of the source file
  • %originalfilename% - Name of the source file (without the path or extension)
  • %originalext% - Extension of the source file (without the .) (v2.4.1+)
  • %relativesourcepath% - Relative folder path of the source file to the monitoring root path. (v2.4.6+)
  • %sourcefilesizemb% - will be replaced with size of the original source video in MB with 2 decimal numbers. (-1 if there is an error, 0 if file doesn’t exist) (v2.4.4+)
  • %remuxfile% - will be replaced with the name and path of the intermediary .TS file generated in the temp working directory if the source video is a WTV or DVR-MS file. Please note this will be blank if the source video is not a WTV or DVR-MS file. The following data is extracted from the Source Video metadata when available
  • %workingpath% - Full path to the temp folder where the converted file is kept (v2.3.12+)
  • %srtfile% - Full path to SRT file, if it exists, otherwise blank (v2.3.12+)
  • %edlfile% - Full path to EDL file, if it exists, otherwise blank (v2.3.12+)
  • %taskname% - Name of the task being used (v2.3.13+)
  • %profile% - Name of profile being used (v2.3.13+)
  • %showname% - Title of the show
  • %episodename% - Subtitle of the show
  • %episodedescription% - Description of the show
  • %season%## - Season no, one # for each digit
  • %episode%## - Episode no, one # for each digit
  • %bannerfile% - Full path to downloaded banner file
  • %bannerurl% - URL to banner file
  • %genre% - Genre
  • %ismovie% - True or False if the video is a movie
  • %issport% - True or False if the video is a sport show (v2.3.15+)
  • %premiereyear% - Series Premiere Year (v2.3.14+)
  • %premieremonth% - Series Premiere Month (v2.3.14+)
  • %premieremonthshort% - Series Premiere Month Name Abbreviation (v2.3.14+)
  • %premieremonthlong% - Series Premiere Month Full Name (v2.3.14+)
  • %premiereday% - Series Premiere Day (v2.3.14+)
  • %premieredayshort% - Series Premiere Day of Week Abbreviation (v2.3.14+)
  • %premieredaylong% - Series Premiere Day of Week Full Name (v2.3.14+)
  • %airyear% - Year of air date
  • %airmonth% - Month of air date
  • %airmonthshort% - Month of air date abbreviation (v2.3.11+)
  • %airmonthlong% - Month of air date full name (v2.3.11+)
  • %airday% - Day of air date (v2.3.6+)
  • %airdayshort% - Day of air date abbreviation (v2.3.11+)
  • %airdaylong% - Day of air date full name (v2.3.11+)
  • %airhour% - 24 Hour of air date (v2.3.6+)
  • %airhour12% - 12 Hour of air date (v2.4.2+)
  • %airhourampm% - Hour of air date in AM/PM (v2.3.12+)
  • %airminute% - Minute of air date (v2.3.6+)
  • %recordyear% - Year of video record date
  • %recordmonth% - Month of video record date
  • %recordmonthshort% - Month of video record date abbreviation (v2.3.11+)
  • %recordmonthlong% - Month of video record date full name (v2.3.11+)
  • %recordday% - Day of video record date (v2.3.11+)
  • %recorddayshort% - Day of week from video record date abbreviation (v2.3.11+)
  • %recorddaylong% - Day of week from video record date full name (v2.3.11+)
  • %recordhour% - 24 Hour of video record date (v2.3.12+)
  • %recordhour12% - 12 Hour of video record date (v2.4.2+)
  • %recordhourampm% - Hour of video record date in AM/PM (v2.3.12+)
  • %recordminute% - Minute of video record date
  • %network% - Network channel on the show was recorded
  • %rating% - Parental rating (v2.3.14+)
  • %imdbmovieid% - IMDb Movie ID
  • %movieid% - TMDB Movie ID
  • %seriesid% - TVDB Series ID
  • %airingdbid% - SageDbId from the SageTV Airing tag (v2.4.1+)
  • %mediafiledbid% - SageDbId from the SageTV MediaFile tag (v.2.4.1+)

CustomCommandParameters are CASE SENSITIVE.

e.g. CustomCommandPath = C:\Test 1\test.exe

e.g. CustomCommandParameters = /i "%convertedfile%" /o "%sourcefile%" -t

In the above example, %convertedfile% will be replaced by the full path and filename of the converted file. The %sourcefile% will be replaced with the full path and name of the original source video.

If your CustomCommandXXX line starts with a double quote and ends with a double quote, then you MUST enclose the ENTIRE line in an additional double quotes otherwise MCEBuddy will not be able to read it.

e.g.

if you want the parameters passed to be: "%convertedfile%" "D:\Media\TV Shows"

then you must write it as:
CustomCommandParameters = ""%convertedfile%" "D:\Media\TV Shows""

(v2.1.4 - v2.3.12) MCEBuddy encloses the parameters in DOUBLE QUOTES.

(v2.3.12+) MCEBuddy does NOT enclose the parameters in DOUBLE QUOTES. Some applications required the parameters to be in DOUBLE QUOTES, so YOU need to ADD the DOUBLE QUOTES around the parameters in the as shown in the example above.

(v2.3.15+) MCEBuddy can accept relative paths (relative to the directory MCEBuddy is installed in) for the CustomCommandPath, prior to which you must be full path paths only.

The number of #'s at the end for Episode and Season indicates the number of digits in the written number. E.g. %season%## will give the output at 01 while %season%### will give the output at 001. #'s are optional, leaving them out will write the number without any formatting. i.e. %season% will give 1 as the output.

NOTE: While running a custom command, the output is redirected to the log file with a debug log status. Also note that not all parameters will have valid values for PreMetaCustomCommandParameters and PreCustomCommandParameters since this command is run at the beginning of the conversion process (e.g. %convertedfile%, %remuxfile% will return blank since they don’t exist yet or %airday% will return blank for PreMetaCustomCommandParameterssince the data has not been extracted yet).

CustomCommandHangPeriod represents the number of SECONDS MCEBuddy will wait during which if no output is detected and logged to the log file and it determines the process to be hung and kills it. Set it to 0 to DISABLE hang detection. Please note that if hang detection is disabled, MCEBuddy will wait endlessly for the process to finish before proceeding (or the task is deleted/stopped).

CustomCommandCritical, when this is set to true, MCEBuddy will fail the entire conversion if the custom command is invalid or if the process is terminated (due to hang detection). If it is set to false then MCEBuddy will continue with the conversion processing irrespective of the custom command failure/success UNLESS the converted file has been renamed or deleted. By default the value is false.

CustomCommandUISession (v2.3.15+) is set to true if you want your program to run in UI space (Session 1) instead of Kernel/Service space (Session 0) (this does NOT create a UI interface, just runs the program in UI space). This is useful ONLY if you’re running a program that accesses hardware enabling API’s (such as QuickSync, CUDA, DirectX etc) and since MCEBuddy runs as a service in kernel space and some operating systems do not allow direct access to hardware API’s from a kernel space. Use this parameter ONLY WHEN REQUIRED. It has other implications, like, Unicode filenames will not work and MCEBuddy mapped network shares are not available (since this is a UI session and MCEBuddy maps the shares in Service session) etc.

CustomCommandShowWindow (v2.3.15+) is set to true if you want MCEBuddy to show the window for the program it is running, false to hide the window.

CustomCommandExitCodeCheck(v2.4.1+) is set to true if you want MCEBuddy to check the Exit Code of the custom command application. If the return code is 0 (default) it is considered a success, if not 0 (+ve or -ve) then it is considered a failure. If the Exit Code fails MCEBuddy will stop further processing and fail the conversion.

NOTE: MCEBuddy will fail the conversion process if the custom command deletes or renames the converted file (%convertedfile%). Also note, Custom Command will fail if it cannot find the file specified (avoid using executables files on network drives since MCEBuddy uses the Windows Service account to access network drives and sometimes these are not mapped correctly due to credential issues)





(mcebuddy.conf) Advanced Configuration Parameters

NOTE: As of v2.3.13 ALL Advanced Configuration Parameters (except FFmpegBackupRemux) in MCEBuddy.conf can be accessed through the GUI, Settings -> Expert Settings page. You DO NOT need to manually edit the mcebuddy.conf file.


FFMpegBackupRemux (v2.1.12+)

This is a special section in the configuration file that stores the command parameters for the ReMux operations which are carried out using FFMPEG if the main ReMuxSupp application fails/not used to remux the video. First the CopyRemux is used, if that fails then the SlowRemux is used. CopyRemux is used first for MPEG2 video files to stream copy the video without recoding the video. If the original video is not MPEG2 or CopyRemux fails then SlowRemux parameters are used to remux the video. THESE SHOULD NOT BE CHANGED UNLESS THE BACKUP REMUX IS COMPLETELY FAILING. Each of these entries will have a number after them like CopyRemux0, CopyRemux1, SlowRemux0, SlowRemux1 etc. These numbers indicate successive remux parameters to be tried if the previous one fails, i.e. if SlowRemux0 fails then MCEBuddy will look for SlowRemux1 and if that fails then it looks for SlowRemux2 etc.

You can also specify -i <source> in the remux parameters as a placeholder for the input filename which MCEBuddy will replace at runtime. This can be useful if you want to specify parameters before the input file in the FFMPEG parameter command.

E.g. CopyRemux0 = -fflags +genpts -i <source> -map 0:a -map 0:v -vcodec copy -acodec copy

MCEBuddy automatically detects the frame rate of the video through the use of -r auto in the FFMPEG Remux parameters in CopyRemux and SlowRemux. This can be disabled by removing -r auto. It can also be overridden by manually specifying the frame rate to use (which can be useful if the average rate of dropped and/or duplicate frames is very high leading to stuttering videos).

E.g. -r auto
E.g. -r 25
E.g. -r 30*1000/1001

MCEBuddy monitors the Average Rate of Dropped frames and Average Rate of Duplicate frames, the key is average rate and not absolute value. If this exceeds a threshold then the auto detected frame rate is incorrect and needs to be corrected. These thresholds can be specified in the parameters RemuxDropThreshold and RemuxDuplicateThreshold. If that threshold is exceeded you may need to manually specify the frame rate (see above).

E.g. RemuxDropThreshold=3.0
E.g. RemuxDuplicateThreshold=3.0

[FFMpegBackupRemux]
CopyRemux0=<FFMPEG Remux parameters>
SlowRemux0=<FFMPEG Remux parameters>
SlowRemux1=<FFMPEG Remux parameters>
RemuxDropThreshold=<Average Rate of Dropped Frames threshold>
RemuxDuplicateThreshold=<Average Rate of Duplicate Frames threshold>