diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index 81910290..8ebfa3b6 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -276,12 +276,14 @@ extractSubs = 0 # externalSubDir. set the directory where subs should be saved (if not the same directory as the video) externalSubDir = + # hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg) + hwAccel = 0 + # generalOptions. Enter your additional ffmpeg options here with commas to separate each option/value (i.e replace spaces with commas). + generalOptions = # outputDefault. Loads default configs for the selected device. The remaining options below are ignored. # If you want to use your own profile, leave this blank and set the remaining options below. # outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p outputDefault = - # hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg) - hwAccel = 0 #### Define custom settings below. outputVideoExtension = .mp4 outputVideoCodec = libx264 diff --git a/nzbtomedia/__init__.py b/nzbtomedia/__init__.py index 09a5e86f..d97c6120 100644 --- a/nzbtomedia/__init__.py +++ b/nzbtomedia/__init__.py @@ -132,6 +132,7 @@ IGNOREEXTENSIONS = [] VEXTENSION = None OUTPUTVIDEOPATH = None PROCESSOUTPUT = False +GENERALOPTS = [] ALANGUAGE = None AINCLUDE = False SLANGUAGES = [] @@ -189,7 +190,7 @@ def initialize(section=None): SABNZB_NO_OF_ARGUMENTS, SABNZB_0717_NO_OF_ARGUMENTS, CATEGORIES, TORRENT_CLIENTAGENT, USELINK, OUTPUTDIRECTORY, \ NOFLATTEN, UTORRENTPWD, UTORRENTUSR, UTORRENTWEBUI, DELUGEHOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, \ TRANSMISSIONHOST, TRANSMISSIONPORT, TRANSMISSIONPWD, TRANSMISSIONUSR, COMPRESSEDCONTAINER, MEDIACONTAINER, \ - METACONTAINER, SECTIONS, ALL_FORKS, TEST_FILE, \ + METACONTAINER, SECTIONS, ALL_FORKS, TEST_FILE, GENERALOPTS, \ __INITIALIZED__, AUTO_UPDATE, APP_FILENAME, USER_DELAY, APP_NAME, TRANSCODE, DEFAULTS, GIT_PATH, GIT_USER, \ GIT_BRANCH, GIT_REPO, SYS_ENCODING, NZB_CLIENTAGENT, SABNZBDHOST, SABNZBDPORT, SABNZBDAPIKEY, \ DUPLICATE, IGNOREEXTENSIONS, VEXTENSION, OUTPUTVIDEOPATH, PROCESSOUTPUT, VCODEC, VCODEC_ALLOW, VPRESET, \ @@ -372,6 +373,9 @@ def initialize(section=None): IGNOREEXTENSIONS = (CFG["Transcoder"]["ignoreExtensions"]) if isinstance(IGNOREEXTENSIONS, str): IGNOREEXTENSIONS = IGNOREEXTENSIONS.split(',') OUTPUTFASTSTART = int(CFG["Transcoder"]["outputFastStart"]) + GENERALOPTS = (CFG["Transcoder"]["generalOptions"]) + if isinstance(GENERALOPTS, str): GENERALOPTS = GENERALOPTS.split(',') + if GENERALOPTS == ['']: GENERALOPTS = [] try: OUTPUTQUALITYPERCENT = int(CFG["Transcoder"]["outputQualityPercent"]) except: pass diff --git a/nzbtomedia/transcoder/transcoder.py b/nzbtomedia/transcoder/transcoder.py index f9dbb716..220b0335 100644 --- a/nzbtomedia/transcoder/transcoder.py +++ b/nzbtomedia/transcoder/transcoder.py @@ -382,6 +382,8 @@ def buildCommands(file, newDir): map_cmd.extend(['-map', n]) n += 1 + if nzbtomedia.GENERALOPTS: + command.extend(nzbtomedia.GENERALOPTS) command.extend(map_cmd) command.extend(video_cmd) command.extend(audio_cmd)