more transcoder fixes. #474 #473

This commit is contained in:
clinton-hall 2014-07-11 10:26:01 +09:30
commit 9cc807b62b
2 changed files with 7 additions and 3 deletions

View file

@ -345,8 +345,12 @@ def initialize(section=None):
IGNOREEXTENSIONS = (CFG["Transcoder"]["ignoreExtensions"])
if isinstance(IGNOREEXTENSIONS, str): IGNOREEXTENSIONS = IGNOREEXTENSIONS.split(',')
OUTPUTFASTSTART = int(CFG["Transcoder"]["outputFastStart"])
try:
OUTPUTQUALITYPERCENT = int(CFG["Transcoder"]["outputQualityPercent"])
except: pass
try:
NICENESS = int(CFG["Transcoder"]["niceness"])
except: pass
OUTPUTVIDEOPATH = CFG["Transcoder"]["outputVideoPath"]
PROCESSOUTPUT = int(CFG["Transcoder"]["processOutput"])
ALANGUAGE = CFG["Transcoder"]["audioLanguage"]

View file

@ -201,7 +201,7 @@ def buildCommands(file, newDir):
if audio4: # right language and codec.
map_cmd.extend(['-map', '0:' + str(audio4[0]["index"])])
a_mapped.extend([audio4[0]["index"]])
bitrate = int(audio3[0]["bit_rate"])/1000
bitrate = int(audio4[0]["bit_rate"])/1000
audio_cmd.extend(['-c:a:' + str(used_audio), 'copy'])
if nzbtomedia.ABITRATE2 and not (nzbtomedia.ABITRATE2 * 0.9 < bitrate < nzbtomedia.ABITRATE2 * 1.1):
audio_cmd.extend(['-b:a' + str(used_audio), str(nzbtomedia.ABITRATE2)])