77 autoProcessMedia.cfg
Clinton Hall edited this page 2022-07-15 09:17:44 +12:00

Copy the autoProcessMedia.cfg.spec file to autoProcessMedia.cfg and edit config parameters as described here.

[General]

version_notify = Enable/Disable (1/0) update notifications

auto_update = Enable/Disable (1/0) automatic updates

git_path = Set path to where your git executable is located

git_user = enter your git user if you have your own account. (optional)

git_branch = set this to master, dev, or nightly. If left blank, master is used as default.

force_clean = Enable/Disable (1/0) forceful cleaning of leftover files following postprocess success.

log_debug = Enable/Disable (1/0) logging debug messages to nzbtomedia.log

log_db = Enable/Disable (1/0) logging database messages to nzbtomedia.log

log_env = Enable/Disable (1/0) logging environment variables to nzbtomedia.log (debug) (helpful to track down errors calling external tools.)

log_git = Enable/Disable (1/0) logging git output to nzbtomedia.log (debug) (helpful to track down update failures.)

ffmpeg_path = Set to the parent directory where your ffmpeg/ffprobe executables are located (or the path to your avconv/avprobe executables if you have lib-av installed)

check_media = media file checking using ffprobe. (This will identify, mark as failed, and then delete any "corrupt" videos/fakes)

require_lan = Required media audio language for media to be deemed valid. Leave blank to disregard media audio language check. A comma separated list will allow you to accept videos as valid if they contain at least 1 or the required language. e.g. require_lan = eng,jap will accept any video that has at least and English or Japanese audio stream.

safe_mode = Enable/Disable (1/0) a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.

[Posix]

Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.

niceness = 10 Set the Niceness value for the nice command. These range from -20 (most favorable to the process) to 19 (least favorable to the process).

ionice_class = 2 Set the ionice scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle.

ionice_classdata = 4 Set the ionice scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data.

[Network]

mount_points = Enter Mount points as LocalPath,RemotePath and separate each pair with '|' e.g. MountPoints = /volume1/Public/,E:\|/volume2/share/,\\NAS\

[Nzb]

clientAgent = Supported clients: sabnzbd, nzbget

If using SABnzbd

  • sabnzbd_host = The address for SABnzbd access http://localhost

  • sabnzbd_port = The port which you use to access SABnzbd Web UI 8080

  • sabnzbd_apikey = Your SABnzbd api key (see SABnzbd, Config, General, API key)

default_downloadDirectory = Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.

no_manual = 0 default, will perform a manual scan. 1 will prevent a manual scan when invalid arguments received. Particularly helpful when wanting to prevent a manual scan (and re-processing) of an entire download directory. This applies only to nzbTo* scripts.

[Torrent]

clientAgent = Set to whatever torrent client you use. Supported values: utorrent, transmission, deluge, rtorrent, other

useLink = Set to hard for physical links, sym for symbolic links (in destination folder that point to the seeding files), move to move, move-sym to move and then sym-link back (for seeding), and no to not use links (copy)

outputDirectory = Default output directory (categories will be appended as sub directory to outputDirectory). outputDirectory is where TorrentToMedia moves files to. When set to move/copy/hard-link the script will process the files from the download directory to the output directory so that SC/SR/SB/CP etc can process those files from that location.

default_downloadDirectory = Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.

categories = Complete list of categories/labels used in your downloader. music_videos,pictures,software

noFlatten = Complete list of categories that you don't want flattened. i.e you want the directory structure preserved. Particularly useful for userscript. This will accept UNCAT for any downloads without a category assigned, but does not accept ALL. e.g. music,UNCAT

If using µtorrent:
  • uTorrentWEBui = http://localhost:8090/gui/

  • uTorrentUSR = your username for µTorrent's web UI

  • uTorrentPWD = your password µTorrent's web UI

If using Transmission (see Transmission's settings.json)

  • TransmissionHost = The address for Transmission access localhost

  • TransmissionPort = Transmission's rpc port 8084

  • TransmissionUSR = your username for Transmission rpc access

  • TransmissionPWD = your password for Transmission rpc access

If using Deluge:

  • DelugeHost = The address for Deluge access localhost

  • DelugePort = The port for Deluge access 58846

  • DelugeUSR = your username for Deluge access

  • DelugePWD = your password for Deluge access

deleteOriginal = Enable/Disable (1/0) deletion of the original files and Torrent from the torrent client.

chmodDirectory = 0 disables. Otherwise set the 3 digit integer with a leading 0, to apply file and folder permissions in the outPutDirectory. e.g set 0755 to achieve rwxr-xr-x permissions.

no_manual = 0 default, will perform a manual scan. 1 will prevent a manual scan when invalid arguments received. Particularly helpful when wanting to prevent a manual scan (and re-processing) of an entire download directory. This applies only to TorrentToMedia script.

[CouchPotato]

This should match the category passed to the downloader by CouchPotatoServer, all other options go below this category section.
Note. This can be [[couchpotato]] but NOT [[CouchPotato]]. The same applies for all sections [SickBeard], [HeadPhones] etc. [[movie]]

enabled = Enable/Disable (1/0). Enable the appropriate category for CouchPotato.

Enter the api key used for CouchPotatoServer. Found in CouchPotatoServer->settings->general (addvanced setting)
apikey = 1234567890ABCDEF

host = localhost

port = 5050

Set this to 1 if you access CouchPotatoServer via ssl (https) otherwise leave this as 0 for http.
ssl = 0

Set this to the web_root value specified in CouchPotatoServer for Apache Reverse Proxy. (optional)
web_root = ""

Torrent_NoLink = Enable/Disable (0/1) linking of torrents for this category. If set to 1 all copying/linking is disabled and will leave the files in place for default application processing.

delay = 65

method = renamer

  • method renamer is the default which will cause CouchPotatoserver to move and rename downloaded files as specified in the CouchPotatoServer renamer settings. This will also add the movie to the manage list and initiate any configured notifications. In this case your nzb client must extract the files to the "from" folder as specified in your CouchPotatoServer renamer settings. Renamer must be enabled but automatic scan can be disabled by setting "Run Every" to "0".

  • method manage will make CouchPotatoServer update the list of managed movies if manager is enabled but renamer is not enabled. In this case your nzb client must extract the files directly to your final movies folder (as configured in CouchPotatoServer manage settings) and Manage must be enabled.

delete_failed = Set this to 1 if you want this script to delete all files and folders related to a download that has failed. setting this to 0 will not delete any files. note. this is not given as an option for SickBeard since the failed_fork in SickBeard supports this feature.

wait_for = Set this to the number of minutes you want the script to keep checking with CouchPotato for verification of change of status. Default is 2, if you are moving files from one drive to another, or transferring across network shares you may need to increase this value. The renamer.scan call will also use this time as the timeout if it doesn't get a response from CouchPotato. So increase this if you get timeout errors.

extract = Enable/Disable (1,0) extraction of archives for this category.

minSize = Set this to minimum required size to consider a media file valid (in MB). 0

delete_ignored = Enable/Disable (1/0) deletion of ignored files (samples and invalid media files)

remote_path = Enable (1) if Couchpotato is on a remote server for this category. 0 is Disabled.

watch_dir = Set to path where download client places completed downloads locally for this category. Used for manual execution of these scripts.

no_status_check = Enable (1) if you want to stop a download being marked as failed because we were unable to confirm the movie has been renamed. This is particularly relevant when you are using hard-links in CP (so we can't confirm if files have been moved) and the release was not snatched by CP (and/or we don't have an imdb id) so we are unable to confirm the release status has changed.

[SickBeard]

This should match the category passed to the downloader by SickBeard, all other options go below this category section.
[[tv]]

enabled = Enable/Disable (1/0). Enable the appropriate category for SickBeard.

host=localhost

port=8081

username = Set this to the user name required to log on to the SickBeard web GUI. (optional)

password = Set this to the password required to log on to the SickBeard web GUI. (optional)

api = Used for SiCKRAGE fork only.

ssl = Set this to 1 if you access SickBeard via ssl (https) otherwise leave this as 0 for http.

web_root = Set this to the web_root value specified in SickBeard for Apache Reverse Proxy. (optional)

delay = 0 set the number of seconds to wait before calling post-processor in SickBeard.

wait_for = 2 Change this value to the number of minutes to wait for processing to complete. It will timeout after this time if SickBeard doesn't return a status by url. This needs to be increased significantly if processing across network shares or across hard-disks.

watch_dir = Should be the same as outputDirectory. Only needed for manual run, or if SickBeard and the downloader are on different systems. (optional)

fork = auto... For manual fork entry see SickBeard Forks. (optional)

nzbExtractionBy = Downloader. Set this to Destination if you want to pass rar files direct to SickBeard and not use NZBGet or SABnzbd extraction. This only works with a SB fork that supports extraction.

Torrent_NoLink = 0. If set to 1, this will bypass all linking (copying/moving) and extracting in TorrentToMedia. This allows you to specify if you want SickBeard/SickRage to do the linking and extraction. It also bypasses the process_method and uses the SickBeard defined method. This only works with a SB fork that supports extraction. i.e. This just passes the download directly to SickBeard without doing any processing.

process_method. set this to move, copy, hardlink, symlink as appropriate if you want to over-ride SB defaults (for NZB downloads and Torrents when Torrent_NoLink = 0). Leave blank to always use SB default.

force = set 1 to force the processing of already processed content when running a manual scan. (SickRage only)

[HeadPhones]

This should match the category passed to the downloader by HeadPhones, all other options go below this category section.
[[music]]

enabled = Enable/Disable (1/0). Enable the appropriate category for HeadPhones.

apikey = Enter the api key used for HeadPhones.

host = localhost

port = 8181

ssl = Set this to 1 if you access HeadPhones via ssl (https) otherwise leave this as 0 for http.

web_root = Set this to the web_root value specified in HeadPhones for Apache Reverse Proxy. (optional)

[Mylar]

This should match the category passed to the downloader by Mylar, all other options go below this category section.
[[comics]]

enabled = Enable/Disable (1/0). Enable the appropriate category for Mylar.

host = localhost

port = 8090

username = Set this to the user name required to log on to the Mylar web GUI. (optional)

password = Set this to the password required to log on to the Mylar web GUI. (optional)

ssl = Set this to 1 if you access Mylar via ssl (https) otherwise leave this as 0 for http.

web_root = Set this to the web_root value specified in Mylar for Apache Reverse Proxy. (optional)

[Gamez]

This should match the category passed to the downloader by Gamez, all other options go below this category section.
[[games]]

enabled = Enable/Disable (1/0). Enable the appropriate category for Gamez.

apikey = Enter the api key used for Gamez.

host = localhost

port = 8085

ssl = Set this to 1 if you access Gamez via ssl (https) otherwise leave this as 0 for http.

web_root = Set this to the web_root value specified in Gamez for Apache Reverse Proxy. (optional)

[LazyLibrarian]

This should match the category passed to the downloader by LazyLibrarian, all other options go below this category section.
[[books]]

enabled = Enable/Disable (1/0). Enable the appropriate category for LazyLibrarian.

apikey = Enter the api key used for LazyLibrarian.

host = localhost

port = 5299

ssl = Set this to 1 if you access LazyLibrarian via ssl (https) otherwise leave this as 0 for http.

web_root = Set this to the web_root value specified in LazyLibrarian for Apache Reverse Proxy. (optional)

[Extensions]

compressedExtensions = .zip, .rar, .7z, .gz, .bz, .tar, .arj, .1, .01, .001

mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .vob, .iso, .m4v Note. This is required if using Transcoder

audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac

metaExtensions = .nfo,.sub,.srt,.jpg,.gif

[Transcoder]

getsubs = Enable/Disable (1/0) download of subtitles.

subLanguages = list of languages in the order you want them in your subtitles. eng,spa,fra

transcode = Enable/Disable (1/0) transcoding of video files.

duplicate = 1 will create a new file. 0 will replace the original file.

ignoreExtensions = List of extensions that will not be transcoded. avi,.mkv,.mp4

outputFastStart = Enable/Disable (1/0) the use of -movflags + faststart.

outputQualityPercent = used as -q:a value. 0 will disable this from being used.

outputVideoPath = Set path you want transcoded videos moved to. Leave blank to disable.

processOutput = 1 will send the outputVideoPath to SickBeard/CouchPotato. 0 will send original files.

audioLanguage = set the 3 letter language code you want as your primary audio track. eng

allAudioLanguages = Enable/Disable (1/0) all other audio tracks/languages. (uses AudioCodec3)

allSubLanguages = Enable/Disable (1/0) all existing sub languages. (additional to the subLanguages list).

embedSubs = Enable/Disable (1/0) embedding of external sub/srt subs into your video if this is supported.

burnInSubtitle = Enable/Disable (1/0) the burning of the default sub language into your video (needed for players that don't support subs)

extractSubs = Enable/Disable (1/0) extraction of subs from the video file. These are saved as external srt files.

externalSubDir = set the directory where subs should be saved (if not the same directory as the video).

hwAccel = Enable/Disable (1/0) hardware acceleration (this requires a recent ffmpeg)

generalOptions = Enter your additional ffmpeg options here (those that would usually appear before -i) with commas to separate each option/value (i.e replace spaces with commas).

  • to allow ffmpeg to transcode audio where there may not be continuous frame sync (-async 1) enter -async,1
  • to allow ffmpeg to generate parity frames for sync on variable framerate videos ( -fflags +genpts) enter -fflags,+genpts
  • for both enter -async,1,-fflags,+genpts

outputDefault = Loads the default configs for the selected device. The remaining options below are ignored. profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, Roku-1080p, Roku-720p, Roku-480p, mkv, mp4-scene-release

If you want to use your own profile, leave this blank and set the remaining options below Any Blank setting will use defaults for the filetype.

outputVideoExtension = The file type you want to transcode to. .mp4

outputVideoCodec = The video codec you want to transcode to. libx264

VideoCodecAllow = Video codecs that can be used by your device (and file extension). These tracks will just be copied if they exist in the original video. libx264,h264,h.264,AVC,avc,mpeg4,msmpeg4,MPEG-4

outputVideoPreset = The "quality" to use. low, medium, high

outputVideoCRF = The video Constant Rate Factor used to define the bitrate/quality 19-21

outputVideoLevel = The H.264 Level to use. 3.1

outputVideoFramerate = The video frame rate to use. 24

outputAudioChannels = The number of channels to use for the primary audio track. 2 for stereo, 6 for 5.1

outputVideoBitrate = The video bitrate to use. 800000 or 800k

outputAudioCodec = The output audio codec to use for the primary audio track. ac3

AudioCodecAllow = Audio codecs that can be used by your device (and file extension). These tracks will just be copied if they exist in the original video. libfaac,aac,ac3,mp3

outputAudioBitrate = The audio bitrate to use. 160000 or 160k

outputAudioTrack2Codec = The output audio codec to use for the second audio track ( leave blank for None) libfaac. (Useful to make a file that can have DTS for playback on one system, but still include aac for playback on a tablet etc)

AudioCodec2Allow = Audio codecs that can be used for the secondary track libfaac,aac

outputAudioTrack2Channels = The number of channels to use for the secondary track. 2 for stereo, 6 for 5.1

outputAudioTrack2Bitrate = The audio bitrate to use. 128000

outputAudioOtherCodec = he output audio codec to use for all other audio tracks ( leave blank for None) libmp3lame

AudioOtherCodecAllow = Audio codecs that can be used for other tracks. libmp3lame,mp3

outputAudioOtherChannels = The number of channels to use for other tracks. 2 for stereo, 6 for 5.1

outputAudioOtherBitrate = The audio bitrate to use. 128000

outputSubtitleCodec = The Subtitle codec to use for embedded subs. mov_text

[WakeOnLan]

wake = Enable/Disable (1,0) Waking of another system before processing.

host = IP address of system to wake. 192.168.1.37

port = Port to use for WOL command 80

mac = MAC address of the system to be woken 00:01:2e:2D:64:e1

[UserScript]

This should match the category to have the userscript run, all other options go below this category section.
[[ALL]] ALL will process userscript for all DEFINED* Categories. UNCAT will process for non-category downloads.

*defined categories are those in the [Torrent] categories list.

enabled = Enable/Disable (1,0) this subsection category

Torrent_NoLink = Enable/Disable (0/1) linking of torrents for this category. If set to 1 all copying/linking is disabled.

extract = Enable/Disable (1,0) extraction of archives for this category.

remote_path = Enable/Disable (1,0) sending commands to a remote server for this category.

user_script_mediaExtensions = .mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg (use ALL for all extensions, otherwise only those in this list will have the script applied)

user_script_path = /media/test/script/script.sh (full path for the script to be run)

user_script_param = Arguments to be passed to the script. Comma-separated list in order. Options are FN = filename, FP = absolute path and name for each file, DN = absolute path for the directory, TN = Torrent/download Name, TL = Torrent Label/Category. e.g. DN,TN

user_script_runOnce = 0. If set to 1 this will only let the userScript run once (presumably on the entire directory and you will only be passing DN and not FN, FP etc).

user_script_successCodes = 0 (a comma separated list of success codes that are returned by the script)

user_script_clean = 1 removes the output directory id the processed files have been removed, 0 will leave any leftover files in place.

delay = the delay before checking and cleaning the outputDirectory. 120

unique_path = Enable/Disable (1/0) putting each download into a unique directory (based on torrent name)

watch_dir =Set to path where download client places completed downloads locally for this category. Used for Manual TorrentToMedia.py execution.

[ASCII]

convert = 0 (default won't do anything). 1 will to convert any "foreign" characters to ASCII (utf-8) before passing to SB/CP etc. Additionally, if using SABnzbd, enable Special > sanitize_safe and Switches > Naming > Replace Illegal Characters in Folder Names.

[passwords]

Just create a list of passwords to attempt to use for extraction of password protected archives.

PassWordFile = /full/path/to/passwords.txt

In this file, each password needs to be on a separate line.