optt=opt
optt=optt.replace("8","MW8")
optt=optt.replace("9","MW9")
- pout = recpath + "/" + "m_"+title + ".mp4"
- tv2mp4.ts2mp4(pin, pout, optt)
+ poutt = recpath + "/" + "m_"+title + ".mp4"
+ shutil.move(os.path.join(recpath, title+".ts"),os.path.join(recpath, "m_"+title+".ts"))
+ tv2mp4.ts2mp4(os.path.join(recpath, "m_"+title+".ts"), poutt, optt)
+ shutil.move(os.path.join(recpath, "m_"+title+".ts"),os.path.join(recpath, title+".ts"))
else:
optt=opt
- optt=optt.replace("8","\\8")
- optt=optt.replace("9","\\9")
- pout = recpath + "/" + "m_"+title + ".mp4"
- tv2mp4.ts2mp4(pin, pout, optt)
+ optt=optt.replace("8","MW8")
+ optt=optt.replace("9","MW9")
+ poutt = recpath + "/" + "m_"+title + ".mp4"
+ shutil.move(os.path.join(recpath, title+".ts"),os.path.join(recpath, "m_"+title+".ts"))
+ tv2mp4.ts2mp4(os.path.join(recpath, "m_"+title+".ts"), poutt, optt)
+ shutil.move(os.path.join(recpath, "m_"+title+".ts"),os.path.join(recpath, title+".ts"))
recdb.del_reckey(typetxting, title, chtxt, btime)
time.sleep(10)
if re.search("E", opt):
elif quality==6:
x264preset=u"--preset slower"
if size == "WVGA_BASE" or size == "QVGA_BASE":
- x264profile=" --level 32 --profile base "
+ x264profile=" --level 32 --profile baseline "
else:
x264profile=" --level 41 --profile high "
x264crf=u"--crf "+str(crf)
elif quality==6:
x264preset=u"--preset slower"
if size == "WVGA_BASE" or size == "QVGA_BASE":
- x264profile=" --level 32 --profile base "
+ x264profile=" --level 32 --profile baseline "
else:
x264profile=" --level 41 --profile high "
x264crf=u"--crf "+str(crf)
time.sleep(10)
if os.path.isfile(tpraw) and os.path.getsize(tpraw)>10*1000:
raw2mkv(tpraw, tpmkv, opt)
+ time.sleep(10)
+ if os.path.exists(tpraw):
+ os.remove(tpraw)
def raw2mkv(pin,pout,opt):#x264
dir=os.path.split(pout)[0]
title=os.path.split(pout)[1]
time.sleep(10)\r
if os.path.isfile(tpraw) and os.path.getsize(tpraw)>10*1000:\r
raw2mp4(tpraw, tpmp4, opt)\r
+ time.sleep(10)\r
+ if os.path.exists(tpraw):\r
+ os.remove(tpraw)\r
def raw2mp4(pin,pout,opt):\r
dir=os.path.split(pout)[0]\r
title=os.path.split(pout)[1]\r