add additional options to pass into ffmpeg. #1619

This commit is contained in:
clinton-hall 2019-06-06 21:46:56 +12:00
commit fd1149aea1
3 changed files with 12 additions and 1 deletions

View file

@ -414,8 +414,10 @@
externalSubDir = externalSubDir =
# hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg) # hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)
hwAccel = 0 hwAccel = 0
# generalOptions. Enter your additional ffmpeg options here with commas to separate each option/value (i.e replace spaces with commas). # generalOptions. Enter your additional ffmpeg options (these insert before the '-i' input files) here with commas to separate each option/value (i.e replace spaces with commas).
generalOptions = generalOptions =
# otherOptions. Enter your additional ffmpeg options (these insert after the '-i' input files and before the output file) here with commas to separate each option/value (i.e replace spaces with commas).
otherOptions =
# outputDefault. Loads default configs for the selected device. The remaining options below are ignored. # 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. # 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, mkv, mkv-bluray, mp4-scene-release # outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p, mkv, mkv-bluray, mp4-scene-release

View file

@ -211,6 +211,7 @@ VEXTENSION = None
OUTPUTVIDEOPATH = None OUTPUTVIDEOPATH = None
PROCESSOUTPUT = False PROCESSOUTPUT = False
GENERALOPTS = [] GENERALOPTS = []
OTHEROPTS = []
ALANGUAGE = None ALANGUAGE = None
AINCLUDE = False AINCLUDE = False
SLANGUAGES = [] SLANGUAGES = []
@ -513,6 +514,7 @@ def configure_transcoder():
global IGNOREEXTENSIONS global IGNOREEXTENSIONS
global OUTPUTFASTSTART global OUTPUTFASTSTART
global GENERALOPTS global GENERALOPTS
global OTHEROPTS
global OUTPUTQUALITYPERCENT global OUTPUTQUALITYPERCENT
global OUTPUTVIDEOPATH global OUTPUTVIDEOPATH
global PROCESSOUTPUT global PROCESSOUTPUT
@ -568,6 +570,11 @@ def configure_transcoder():
GENERALOPTS.append('-fflags') GENERALOPTS.append('-fflags')
if '+genpts' not in GENERALOPTS: if '+genpts' not in GENERALOPTS:
GENERALOPTS.append('+genpts') GENERALOPTS.append('+genpts')
OTHEROPTS = (CFG['Transcoder']['otherOptions'])
if isinstance(OTHEROPTS, str):
OTHEROPTS = OTHEROPTS.split(',')
if OTHEROPTS == ['']:
OTHEROPTS = []
try: try:
OUTPUTQUALITYPERCENT = int(CFG['Transcoder']['outputQualityPercent']) OUTPUTQUALITYPERCENT = int(CFG['Transcoder']['outputQualityPercent'])
except Exception: except Exception:

View file

@ -493,6 +493,8 @@ def build_commands(file, new_dir, movie_name, bitbucket):
if core.OUTPUTFASTSTART: if core.OUTPUTFASTSTART:
other_cmd.extend(['-movflags', '+faststart']) other_cmd.extend(['-movflags', '+faststart'])
if core.OTHEROPTS:
other_cmd.extend(core.OTHEROPTS)
command = [core.FFMPEG, '-loglevel', 'warning'] command = [core.FFMPEG, '-loglevel', 'warning']