From 80038d4a845df383075a79a14303c46f095614bd Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Wed, 4 Dec 2013 22:00:28 +1030 Subject: [PATCH] add new ffmpeg options. fix #213 --- autoProcess/Transcoder.py | 8 ++++++++ autoProcessMedia.cfg.sample | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/autoProcess/Transcoder.py b/autoProcess/Transcoder.py index b5e98973..e71c0b65 100644 --- a/autoProcess/Transcoder.py +++ b/autoProcess/Transcoder.py @@ -49,6 +49,8 @@ def Transcode_directory(dirName): outputAudioCodec = config.get("Transcoder", "outputAudioCodec").strip() outputAudioBitrate = config.get("Transcoder", "outputAudioBitrate").strip() outputSubtitleCodec = config.get("Transcoder", "outputSubtitleCodec").strip() + outputFastStart = int(config.get("Transcoder", "outputFastStart")) + outputQualityPercent = int(config.get("Transcoder", "outputQualityPercent")) if useNiceness: niceness = int(config.get("Transcoder", "niceness")) @@ -104,6 +106,12 @@ def Transcode_directory(dirName): if len(outputSubtitleCodec) > 0: command.append('-c:s') command.append(outputSubtitleCodec) + if outputFastStart > 0: + command.append('-movflags') + command.append('+faststart') + if outputQualityPercent > 0: + command.append('-q:a') + command.append(outputQualityPercent) else: command.append('-sn') # Don't copy the subtitles over command.append(newfilePath) diff --git a/autoProcessMedia.cfg.sample b/autoProcessMedia.cfg.sample index ae596deb..0409806a 100644 --- a/autoProcessMedia.cfg.sample +++ b/autoProcessMedia.cfg.sample @@ -118,6 +118,10 @@ outputVideoBitrate = 800k outputAudioCodec = libmp3lame outputAudioBitrate = 128k outputSubtitleCodec = +# outputFastStart. 1 will use -movflags + faststart. 0 will disable this from being used. +outputFastStart = 0 +# outputQualityPercent. used as -q:a value. 0 will disable this from being used. +outputQualityPercent = 0 [WakeOnLan] ###### set wake = 1 to send WOL broadcast to the mac and test the server (e.g. xbmc) the host and port specified.