corrections of the last commit
This commit is contained in:
@@ -52,7 +52,7 @@ def getDimensions(config, clip, bitrateProfiles):
|
||||
w, h = -2, 480
|
||||
# set the height by the bitrateProfile
|
||||
try:
|
||||
h = bitrateProfiles[config['bitrateProfile']]
|
||||
h = bitrateProfiles[config['bitrateProfile']]['height']
|
||||
except:
|
||||
pass
|
||||
# overwrite it with the scaling
|
||||
@@ -87,15 +87,17 @@ def twoPassEncode(inputFilename, clip):
|
||||
)
|
||||
|
||||
stream = ffmpeg.output(stream,
|
||||
clip['target'],
|
||||
# clip['target'],
|
||||
"/dev/null",
|
||||
vcodec=config['vcodec'],
|
||||
**{
|
||||
# "an":None,
|
||||
# "y": None,
|
||||
"an": None,
|
||||
"y": None,
|
||||
"f": "null",
|
||||
"pass": "1",
|
||||
"b:v": bitrateProfile[config['bitrateProfile']['bitrate']],
|
||||
"minrate": bitrateProfile[config['bitrateProfile']['minrate']],
|
||||
"maxrate": bitrateProfile[config['bitrateProfile']['maxrate']],
|
||||
"b:v": bitrateProfiles[config['bitrateProfile']]['bitrate'],
|
||||
"minrate": bitrateProfiles[config['bitrateProfile']]['minrate'],
|
||||
"maxrate": bitrateProfiles[config['bitrateProfile']]['maxrate'],
|
||||
"quality": config['quality'] if 'quality' in config else "best",
|
||||
}
|
||||
)
|
||||
@@ -124,17 +126,16 @@ def twoPassEncode(inputFilename, clip):
|
||||
h=clip['crop']['h']
|
||||
)
|
||||
|
||||
h, w = getDimensions(config, clip)
|
||||
h, w = getDimensions(config, clip, bitrateProfiles)
|
||||
|
||||
stream = ffmpeg.output(stream, audio,
|
||||
clip['target'],
|
||||
vcodec=config['vcodec'],
|
||||
**{
|
||||
# "y": None,
|
||||
"pass": "2",
|
||||
"b:v": bitrateProfile[config['bitrateProfile']['bitrate']],
|
||||
"minrate": bitrateProfile[config['bitrateProfile']['minrate']],
|
||||
"maxrate": bitrateProfile[config['bitrateProfile']['maxrate']],
|
||||
"b:v": bitrateProfiles[config['bitrateProfile']]['bitrate'],
|
||||
"minrate": bitrateProfiles[config['bitrateProfile']]['minrate'],
|
||||
"maxrate": bitrateProfiles[config['bitrateProfile']]['maxrate'],
|
||||
"quality": config['quality'] if 'quality' in config else "best",
|
||||
"acodec": config['acodec'],
|
||||
}
|
||||
@@ -172,7 +173,7 @@ for clip in clipDict:
|
||||
# @todo This is a very bad hack because the outtmpl options doesn't seem to be working if the file gets reencoded
|
||||
inputFilename = glob.glob(infoDict['id']+"*")[0]
|
||||
|
||||
w, h = getDimensions(config, clip)
|
||||
w, h = getDimensions(config, clip, bitrateProfiles)
|
||||
|
||||
# generate preview image for the video
|
||||
if 'poster' in clip:
|
||||
|
||||
Reference in New Issue
Block a user