def set_size(cfg, key): txt = key.replace("_", " ") raw_skip_size = simple_input( title="Setup m2ts file %s:" % txt, pre_lable="m2ts file %s:" % txt, init_value=cfg[key], post_lable="(in Bytes)", ) cfg[key] = int(raw_skip_size)
if not files: files = askopenfilename2( title = "Choose the source file(s):", initialdir = cfg["last sourcedir"], multiple = True # filetypes = [('M2TS File','*.*')], ) assert isinstance(files, list) if PARAM_KEY not in cfg: cfg[PARAM_KEY] = ["-384, -down6"] new_values = simple_input( title="eac3to parameters", pre_lable="Please input the used parameters (separated by comma!):", init_value=cfg[PARAM_KEY][0], post_lable="last values: %r\nUse nothing for only demuxing!" % cfg[PARAM_KEY], ) parameters = [i.strip() for i in new_values.split(",")] parameters = [i for i in parameters if i] # delete emty items for fn in files: print fn out_fn = get_out_filename(fn, parameters) print out_fn cmd = [cfg["eac3to"], fn, out_fn] + parameters print "run '%s'..." % " ".join(cmd) process = subprocess.Popen(cmd, shell=True) process.wait() print
# print bluray.mpls # print bluray.m2ts # Read all movie mpls files ...\BDMV\mpls\*.mpls # Attach all m2ts files to the mpls object and calc the total filesize bluray.read_mpls_files() selected_mpls = select_mpls(cfg, bluray) print "Selected mpls:", selected_mpls for playlist in selected_mpls: stream_dict = select_streams(bluray, cfg, playlist) print "selected streams: %r" % stream_dict out_name_prefix = tk_tools.simple_input( title="Edit playlist file name", pre_lable="Change the prefix for output filenames, if you will:", init_value="%s %s" % (bluray.movie_name, playlist.filename), post_lable="(You can only use 'filename'-safe characters!)", ) print "Use filename prefix: %r" % out_name_prefix stream_cmd = eac3to.build_stream_out(out_name_prefix, bluray.out_dir, stream_dict) print "stream cmd: %r" % stream_cmd print print "Run eac3to:" run_eac3to(cfg, bluray.out_dir, playlist, stream_cmd)
if not files: files = askopenfilename2( title="Choose the source file(s):", initialdir=cfg["last sourcedir"], multiple=True # filetypes = [('M2TS File','*.*')], ) assert isinstance(files, list) if PARAM_KEY not in cfg: cfg[PARAM_KEY] = ["-384, -down6"] new_values = simple_input( title="eac3to parameters", pre_lable="Please input the used parameters (separated by comma!):", init_value=cfg[PARAM_KEY][0], post_lable="last values: %r\nUse nothing for only demuxing!" % cfg[PARAM_KEY], ) parameters = [i.strip() for i in new_values.split(",")] parameters = [i for i in parameters if i] # delete emty items for fn in files: print fn out_fn = get_out_filename(fn, parameters) print out_fn cmd = [cfg["eac3to"], fn, out_fn] + parameters print "run '%s'..." % " ".join(cmd) process = subprocess.Popen(cmd, shell=True) process.wait()