3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009-2010 Yukikaze
16 def test_all_ch_encode(option,stime):
19 path= configreader.getpath("test")
20 tpath=os.path.join(path, "encode_test")
21 if not os.path.exists(tpath):
23 dnowt=datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")+"_"+option+""
24 tpatht=os.path.join(tpath,dnowt)
25 if not os.path.exists(tpatht):
30 pathname=os.path.join(tpatht,t['chtxt'])
32 tv2ts.tv2ts(pathname+".ts",t['ch'],t['csch'], stime)
33 tv2mp4.ts2mp4(pathname+".ts", pathname+".mp4", option)
35 if __name__ == "__main__":
38 parser=optparse.OptionParser(usage=usage,version=version)
39 parser.add_option("-e","--Encode",action="store",type="string",dest="encode_option",default="",metavar="TITLE",help="encode test(option)")
40 (opts,args)=parser.parse_args(sys.argv)
41 if opts.encode_option != "":##-sの場合
42 print "test_all_ch_encode"
43 test_all_ch_encode(opts.encode_option, "10")