From 099e3056ee7b7d6ff5a461544beb279fd83da30b Mon Sep 17 00:00:00 2001 From: Moreno Sint Hill Date: Wed, 8 Jan 2014 12:54:14 +0100 Subject: [PATCH] Added few comments & fixed result spelling --- autoProcess/Transcoder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autoProcess/Transcoder.py b/autoProcess/Transcoder.py index 91e58888..25cc981a 100644 --- a/autoProcess/Transcoder.py +++ b/autoProcess/Transcoder.py @@ -72,7 +72,7 @@ def Transcode_directory(dirName): outputVideoExtension = '-transcoded' + outputVideoExtension # adds '-transcoded.ext' newfilePath = os.path.normpath(name + outputVideoExtension) - command = [ffmpeg, '-loglevel', 'warning', '-i', filePath, '-map', '0'] + command = [ffmpeg, '-loglevel', 'warning', '-i', filePath, '-map', '0'] # -map 0 takes all input streams if useNiceness: command = ['nice', '-%d' % niceness] + command @@ -110,9 +110,9 @@ def Transcode_directory(dirName): if outputQualityPercent > 0: command.append('-q:a') command.append(str(outputQualityPercent)) - if len(outputSubtitleCodec) > 0: + if len(outputSubtitleCodec) > 0: # Not every subtitle codec can be used for every video container format! command.append('-c:s') - command.append(outputSubtitleCodec) + command.append(outputSubtitleCodec) # http://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/subtitle_options else: command.append('-sn') # Don't copy the subtitles over command.append(newfilePath) @@ -136,11 +136,11 @@ def Transcode_directory(dirName): except: Logger.exception("Transcoding of video %s has failed", filePath) if result == 0: - Logger.info("Transcoding of video %s to %s succeded", filePath, newfilePath) + Logger.info("Transcoding of video %s to %s succeeded", filePath, newfilePath) if duplicate == 0: # we get rid of the original file os.unlink(filePath) else: Logger.error("Transcoding of video %s to %s failed", filePath, newfilePath) - # this will be 0 (successful) it all are sucessful, else will return a positive integer for failure. + # this will be 0 (successful) it all are successful, else will return a positive integer for failure. final_result = final_result + result return final_result