diff --git a/transcoder/transcode_dvd.py b/transcoder/transcode_dvd.py index a3ad5da..eedbc0e 100755 --- a/transcoder/transcode_dvd.py +++ b/transcoder/transcode_dvd.py @@ -12,6 +12,7 @@ RAW_DIR = "raw" TRANSCODED_DIR = "transcoded" LOGFILE = "transcode.log" +NICE_HANDBRAKE_PROCESS = "True" HANDBRAKE_PRESET = "General/HQ 1080p30 Surround" HANDBRAKE_AUDIO_LANG_LIST = "de,en" OUT_VIDEO_FORMAT = ".m4v" @@ -26,7 +27,6 @@ def main(): for dvd_type in ("movie", "series"): for dvd in filter(is_dvd_files_not_locked, list_ripped_dvds(dvd_type)): print(f"Transcoding {dvd}") - # TOOD: nice transcoding process so it does not block server output_files = transcode_ripped_dvd(dvd) if output_files: mv_videos_from_tmp_to_transcoded_dir(output_files, dvd.dvd_type) @@ -88,7 +88,7 @@ class Dvd: return (series, episodes) def transcode_command_args_without_title_number(self, output_file): - return [ + args = [ "HandBrakeCLI", "--preset", HANDBRAKE_PRESET, @@ -100,6 +100,10 @@ class Dvd: "--output", output_file, ] + if NICE_HANDBRAKE_PROCESS: + args = ["nice"] + args + + return args def chdir_to_script_dir():