db[1].execute("\
ALTER TABLE timeline ADD epgexp VARCHAR(200)")
self.close_db(db)
- self.change_version_in_status("95")
\ No newline at end of file
+ self.change_version_in_status("95")
+ def update_db_95to96(self):
+ db = self.connect_db()
+ self.drop_in_settings()
+ self.new_in_settings()
+ self.close_db(db)
+ self.change_version_in_status("96")
\ No newline at end of file
time.sleep(5)
rec10d.rec10db.update_by_bctype_epg_ch(bctype)
except Exception, inst:
- recdblist.printutf8("error occurs in updatebc(epgdb)")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error","updatebc(epgdb.py)", str(type(inst)), str(inst))
xml2db_dom.xml2db_dom(tmppath + bctype + "epgdata.bak.xml", bctype)
rec10d.rec10db.update_status_by_bctype_epg_ch(bctype, "2")
def updatebc_bak(bctype):
rec10d.rec10db.update_db_93to94()
elif version==94:
rec10d.rec10db.update_db_94to95()
+ elif version==95:
+ rec10d.rec10db.update_db_95to96()
if __name__ == "__main__":
move()
###########################################
-# Rec10 for PT1 #
-# Ver.0.9.5 #
-# 2010/05/12 Yukikaze #
+# Rec10 -Ts Recording system. #
+# Ver.0.9.6 #
+# 2010/05/28 Yukikaze & long.inus #
# Copyright (C) 2009-2010 Yukikaze #
###########################################
[必要環境:Webインターフェース部分]
perl
-一部のperlモジュール( rectool.pl)
+一部のperlモジュール(rectool.pl,rec10webg2)
[必要環境:外部ツール]
jTsSplitter(included)
b25(non-included)
recpt1(recfriioでもいいはずです)(non-included)
+事前準備:
+pt1などのドライバーをインストールした上で、recpt1などのソフトを導入、
+b25をインストールしておいてください。
1:install.shを実行
2:表示にしたがって設定の変更(チャンネルなど)
yukikaze.jp@gmail.com
[History]
-0.9.5
+10/05/29 0.9.6 release
+バグ修正
+ログシステムの修正
+0.9.5(内部リリース)
b25自動削除機能の改善
自動仕分け機能のアップデート
Caption2Assやaac取り出しがうまくいかないときの自動復帰処理の実装
バグ修正
-
10/04/02 0.9.4 release
バグ修正
インストーラーの大幅な改善
"""
task names
"""
+import datetime
import os
import os.path
REC_AUTO_KEYWORD = "auto_keyword"
REC_BAYES_SUGGEST ="bayes_suggest"
-version = 95
+version = 96
def printutf8(unicode):
str=unicode.encode('utf-8')
print str
+def printuft8ex(unicode):
+ str=unicode.encode('utf-8')
+ print str
logfname="/var/log/rec10"
mode="a"
if os.path.exists(logfname):
f=open(logfname,mode)
f.write(str+"\n")
f.close()
+def Commonlogex(type,place,inst,txt):
+ lt=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")+u":"
+ lt=lt+u"["+type+u"] "+place+u" "+inst+u"\n"+txt
+ lt=lt.encode('utf-8')
+ logfname="/var/log/rec10"
+ mode="a"
+ print lt
+ if os.path.exists(logfname):
+ f=open(logfname,mode)
+ f.write(lt+"\n")
+ f.close()
+def addCommandLog(tspath,log_title,cmd,cmd_log):
+ addlog(tspath,cmd,log_title+u"ログ-コマンド")
+ addlog(tspath,cmd_log,log_title+u"ログ-詳細")
def addlog(tspath,txt,log_title):
logo=tspath
logo=logo.replace("_1.wav",".ts")
stxt=stxt+txt[s-800+st:]
else:
stxt=txt
- txtw="\n####"+log_title+"####\n"+stxt
+ txtw= datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+ txtw=txtw+"\n####"+log_title+"####\n"+stxt
f.write(txtw.encode('utf-8'))
f.close()
\ No newline at end of file
topt=status.getSettings_auto_opt()
recdb.recreserv(titlet,chtxtt, btimet, etimet,topt)
except Exception, inst:
- recdblist.printutf8("error occures in search_keyword_auto_jbk")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "search_keyword_auto_jbk(timerec.py)", str(type(inst)),str(inst))
else:
try:
recdb.add_auto_keyword(chtxtt, titlet, btimet, etimet)
except Exception, inst:
- recdblist.printutf8("error occures in search_keyword")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "search_keyword(timerec.py)", str(type(inst)),str(inst))
def type_reserve(typetxt,chtxt,title,bt,et,opt):
btime = bt.strftime("%Y-%m-%d %H:%M:%S")
etime = et.strftime("%Y-%m-%d %H:%M:%S")
auto_rec.add_key("ALL", titlen,exp+" "+longexp)
recdblist.printutf8(u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
except Exception, inst:
- recdblist.printutf8("Error happened in Oikake DB")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst))
else:
recdblist.printutf8(u"追いかけ機能エラー:番組データが見付かりません。")
else:
recdb.rec_reclog(titlen, chtxtn, btimen, etimen, opt, exp, longexp, category)
auto_rec.add_key(chtxt, titlen,exp+" "+longexp)
auto_rec.add_key("ALL", titlen,exp+" "+longexp)
- recdblist.printutf8(u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
+ #recdblist.printutf8(u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
+ recdblist.Commonlogex(u"通常", "Oikake (timerec.py)",u"追いかけ機能実行中",u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
except Exception, inst:
- recdblist.printutf8("Error happened in Oikake DB")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst))
elif dt <= 20 * 60:
try:
recdb.del_reckey(typetxtnow, title, chtxt, btime)
recdb.rec_reckey(typetxtfinal, title, chtxt, btime, etime, opt)
except Exception, inst:
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst))
def type_final(typetxt,chtxt,title,bt,et,opt):
btime = bt.strftime("%Y-%m-%d %H:%M:%S")
etime = et.strftime("%Y-%m-%d %H:%M:%S")
newtime=bt
newtitle=newtitle+u"_"+iff+newtime.strftime("%Y-%m-%dT%H-%M-%S")
recdb.rec_reckey(typetxting, newtitle, chtxt, btime, etime, opt)
- recdblist.printutf8(u"録画開始 "+newtitle+" "+btime+" "+etime)
+ recdblist.Commonlogex(u"通常","timerec.py",u"録画開始 "+newtitle+" "+btime+" "+etime)
tv2avi.timetv2b25(recpath + "/" + newtitle + ".avi", chtxt, btime, etime, opt)
recdb.del_reckey(typetxting, newtitle, chtxt, btime)
if not re.search("R", opt):
recdb.rec_reclog(titlet, chtxtt, btimet, etimet, opt, exp,longexp,category)
auto_rec.add_key(chtxt, titlet,exp+" "+longexp)
auto_rec.add_key("ALL", titlet,exp+" "+longexp)
- recdblist.printutf8(u"key "+title+u" : "+titlet+u" "+btimet+u" "+etimet)
+ recdblist.Commonlogex(u"通常","timerec.py",u"key "+title+u" : "+titlet+u" "+btimet+u" "+etimet,"")
#except Exception, inst:
# recdblist.printutf8("Error happened in REC_KEYWORD DB")
# recdblist.printutf8(type(inst))
try:
shutil.copy(os.path.join(recpath,title+".ts"), os.path.join(movepath,title+".ts"))
except Exception, inst:
- errtxt="Error happened in type_decode_que in timerec.\n"
- errtxt=errtxt+"move ts error.\n"
- errtxt=errtxt+str(type(inst))+"\n"
- errtxt=errtxt+str(inst)
- recdblist.addlog(os.path.join(recpath,title+".ts"), errtxt, "timerec-move(Decode) error")
+ errtxt1="move ts error.\n"
+ errtxt2=str(type(inst))+"\n"
+ errtxt2=errtxt2+str(inst)
+ recdblist.Commonlogex("Error", "type_decode_que(timerec.py)", errtxt1,errtxt2)
recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
else:
recdb.del_reckey(typetxtnow, title, chtxt, btime)
elif os.path.exists(os.path.join(recpath,title+".mkv")):
shutil.copy(os.path.join(recpath,title+".mkv"), os.path.join(movepath,title+".mkv"))
except Exception, inst:
- errtxt="Error happened in type_encode_que in timerec.\n"
- errtxt=errtxt+"move mkv/mp4 error.\n"
- errtxt=errtxt+str(type(inst))+"\n"
- errtxt=errtxt+str(inst)
- recdblist.addlog(os.path.join(recpath,title+".ts"), errtxt, "timerec-move(Encode) error")
+ errtxt1="move mkv/mp4 error."
+ errtxt2=str(type(inst))+"\n"
+ errtxt2=errtxt2+str(inst)
+ recdblist.Commonlogex("Error", "type_encode_que(timerec.py)", errtxt1,errtxt2)
recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
recdb.rec_reckey(typetxtfin, title, chtxt, btime, etime, opt)
sys.exit()
"""
指定された時間分tsを取得してepgの入ったxmlとして書き出す
"""
- recdblist.printutf8(u"Ts-EPG XML書き出し処理開始")
- recdblist.printutf8(u"CH:"+ch)
+ recdblist.Commonlogex(u"通常","write_time(ts2epg.py)",u"Ts-EPG XML書き出し処理開始" ,u"CH:"+ch)
timet = times
if re.search(u'CS', ch):
mode = "/CS"
tv2ts.tv2tsmix(pout + ".ts", ch, timet)
exe = "export LANG=ja_JP.UTF-8 && nice -n 15 " + epgdump + " " + mode + " " + pout + ".ts " + pout
recdblist.printutf8(exe)
+ recdblist.Commonlogex(u"通常", "write_time(ts2epg.py)", exe,"")
os.system(exe)
time.sleep(10)
tm2v=pin.replace(".ts",".m2v")
encode(tm2v, pout,size,is24fps,quality,crf)
except Exception, inst:
- recdblist.printutf8("error occures in ts2x264.py encode")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst))
else:
try:
encode(pin, pout,size,is24fps,quality,crf)
except Exception, inst:
- recdblist.printutf8("error occures in ts2x264.py encode")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst))
def encode(pin,pout,size,is24fps,quality,crf):
mencoder=configreader.getpath("mencoder")
x264=configreader.getpath("x264")
encexe=encexe+u" nice -n 19 "+x264+" "+x264crf+u" "+x264_addline+u" --threads "+x264_thread+" "+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" "+streampath+" "+x264streamsize
encexe=u"nice -n 19 " +encexe
recdblist.printutf8(encexe)
- txt=txt+"Cmd : "+encexe+"\n"
- txtt=""
+ txt=""
try:
- txtt=unicode(commands.getoutput(encexe.encode('utf-8')),'utf-8')
+ txt=unicode(commands.getoutput(encexe.encode('utf-8')),'utf-8')
except:
""
os.system("rm "+streampath)
- txt=txt+txtt
- recdblist.addlog( pin, txt, "mencoder-log")
+ recdblist.addCommandLog(pin, u"Mencoder", encexe, txt)
def encode_ffmpeg(pin,pout,size,is24fps,quality,crf):
"""
os.environ['LANG']="ja_JP.UTF-8"
exe=ffmpeg+u" -y -i \""+pin+"\" -vsync 400 -vcodec rawvideo -pix_fmt yuv420p "+s+fps+"-deinterlace -an -f rawvideo - |"
exe=exe+u" nice -n 19 "+x264+" "+x264crf+u" "+x264_addline+u" --threads "+x264_thread+" "+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" - "+x264streamsize
- txt=txt+"Cmd : "+exe+"\n"
exe = "nice -n 19 " + exe
- txt=txt+"Cmd : "+exe+"\n"
- txtt=""
+ txt=""
recdblist.printutf8(exe)
try:
- txtt=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8')
+ txt=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8')
except:
""
- txt=txt+txtt
- recdblist.addlog( pin, txt, "dual audio ffmpeg-log")
+ recdblist.addCommandLog(pin, u"FFmpeg動画エンコード", exe, txt)
\ No newline at end of file
os.environ['LANG']="ja_JP.UTF-8"
neroaac=configreader.getpath('NeroAAC')
exe=neroaac+" -br 128000 -2pass -if \""+pin+"\" -of \""+pout+"\""
- txt=u"Cmd : "+exe+"\n"
try:
- txt=txt+commands.getoutput(exe.encode('utf-8'))
- recdblist.addlog(pin, txt, "Wav2aac_Nero log")
+ txt=commands.getoutput(exe.encode('utf-8'))
+ recdblist.addlog(pin, exe, u"Wav2aac_Neroログ-コマンド")
+ recdblist.addlog(pin, txt, u"Wav2aac_Neroログ-詳細")
except:
if not os.path.exists(pout):
lame="lame"
exe=lame+" -b 128 \""+pin+"\" \""+pout+"\""
- txt=u"Cmd : "+exe+"\n"
- txt=txt+commands.getoutput(exe.encode('utf-8'))
- recdblist.addlog(pin, txt, "Wav2aac_Lame log")
+ txt=commands.getoutput(exe.encode('utf-8'))
+ recdblist.addlog(pin, exe, u"Wav2aac_Lameログ-コマンド")
+ recdblist.addlog(pin, txt, u"Wav2aac_Lameログ-詳細")
def wav2mp3_lame(pin,pout):
os.environ['LANG']="ja_JP.UTF-8"
lame="lame"
exe=lame+" -b 128 \""+pin+"\" \""+pout+"\""
- txt=u"Cmd : "+exe+"\n"
try:
- txt=txt+commands.getoutput(exe.encode('utf-8'))
+ txt=commands.getoutput(exe.encode('utf-8'))
except:
""
- recdblist.addlog(pin, txt, "Wav2aac_Lame log")
+ recdblist.addlog(pin, exe, u"Wav2aac_Lameログ-コマンド")
+ recdblist.addlog(pin, txt, u"Wav2aac_Lameログ-詳細")
def ts2single_audio(pts):
paac=pts.replace(".ts",".aac")
ffmpeg=configreader.getpath("ffmpeg")
tv2audio.wav2mp3_lame(ain,aout)
else:
logt=unicode(p0.communicate()[0], "UTF-8")
- recdblist.addlog(pts,logt, "FFmpeg-getAudio-Log")
+ recdblist.addlog(pts,e0, "FFmpeg音声取り出しログ-コマンド")
+ recdblist.addlog(pts,logt, "FFmpeg音声取り出しログ-詳細")
if os.path.exists(pts.replace(".ts",".mp3")) and os.path.getsize(paac)<1000:#1mで1kb以下の場合自動で終了
ts2singlewav(pts)
useNero=0
recdblist.printutf8(exe)
p=subprocess.Popen(exe.encode('utf-8'),shell=True)
os.waitpid(p.pid, 0)
+ logt=unicode(p.communicate()[0], "UTF-8")
+ recdblist.addCommandLog(ots, u"BonTsDemux 音声取り出し", exe, logt)
if singleaudiosplit ==1:
singleaudio2sep(aviin)
except Exception, inst:
- recdblist.printutf8("Error happened in b252ts in tv2avi")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex("Error", "b252ts(tv2avi.py)", str(type(inst)), str(inst))
status.changeB25Decoding(-1)
def ts2avi(pin, pout, opt):
status.changeEncoding(1)
exe = xvfb + ' -a ' + exe
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "dualaudio-sep1 BontsDemux")
+ recdblist.addCommandLog(pin, u"BonTsDemux 第一音声取り出し", exe, txt)
except:
""
ffpin = pin.replace(".ts", "")
exe = xvfb + ' -a ' + exe
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "dualaudio-sep1 BontsDemux")
+ recdblist.addCommandLog(pin, u"BonTsDemux 第二音声取り出し", exe, txt)
except:
""
#os.system(exe)
recdblist.printutf8(exe)
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "pentaaudio-sep1 BontsDemux")
+ recdblist.addCommandLog(pin, u"BonTsDemux5.1ch 第一音声取り出し", exe, txt)
except:
""
ffpin = pin.replace(".ts", "")
recdblist.printutf8(exe)
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "pentaaudio-sep2(raw aac) ffmpeg")
+ recdblist.addCommandLog(pin, u"FFmpeg 5.1ch 第二音声(raw AAC)取り出し", exe, txt)
except:
""
ffpout21=ffpout1.replace(".wav",".mp3")
recdblist.printutf8(exe)
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "pentaaudio-sep Downmix (5.1ch error) BontsDemux")
+ recdblist.addCommandLog(pin, u"BonTsDemux 修正版第二音声(2chDownmix)取り出し", exe, txt)
except:
""
shutil.move(ffpin1, ffpout1)
recdblist.printutf8(exe)
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "singleaaudio-sep1 BontsDemux")
+ recdblist.addCommandLog(pin, u"BonTsDemux 音声(wav化)取り出し", exe, txt)
except:
""
ffpin = pin.replace(".ts", "")
recdblist.printutf8(exe)
txt=commands.getoutput(exe.encode('utf-8'))
try:
- recdblist.addlog(pin, txt, "singleaudio-sep2(raw aac) ffmpeg")
+ recdblist.addCommandLog(pin, u"FFmpeg 音声(raw AAC)取り出し", exe, txt)
except:
""
ffpout21=ffpout1.replace(".wav",".mp3")
execmp4box(pin, pout, e1)\r
addAudio(pints, pout, opt)\r
addCaption(pints, pout)\r
- recdblist.addlog(pout, txt, "mp4box-log")\r
+ #recdblist.addlog(pout, txt, "mp4boxログ-コマンド")\r
+ #recdblist.addlog(pout, txt, "mp4boxログ-詳細")\r
if status.getSettings_auto_del_tmp()==1:\r
if os.path.exists(pout):\r
if re.search(opt,"MW8") or re.search(opt,"MW9"):\r
txt=txt+execcomd(exe3)+"\n"\r
except:\r
""\r
- recdblist.addlog(pin, txt, "MKV2MP4-log")\r
+ recdblist.addlog(pin, txt, u"MKV2MP4-log")\r
txt = "\n####MKV2MP4-log####\n"+txt\r
time.sleep(10)\r
if status.getSettings_auto_del_tmp()==1:\r
#else:\r
os.waitpid(p0.pid, 0)\r
logt=unicode(p0.communicate()[0], "UTF-8")\r
- recdblist.addlog(pts,logt, "Caption-Log")\r
+ recdblist.addlog(pts,e0, u"Captionログ-コマンド")\r
+ recdblist.addlog(pts,logt, u"Captionログ-詳細")\r
if os.path.getsize(pincap)>1000:\r
exe = configreader.getpath("mp4box")\r
e1s=exe +u" -add \""+pincap+"\" \""+pmp4+"\""\r
txt= "error occures in execmp4box\n"\r
txt=txt+ str(type(inst))+"\n"\r
txt=txt+str(inst)\r
- recdblist.addlog(pin, txt, "MP4Box-log")\r
+ recdblist.addlog(pin, cmdn, u"MP4Boxログ-コマンド")\r
+ recdblist.addlog(pin, txt, u"MP4Boxログ-詳細")\r
time.sleep(5)\r
shutil.move(ptin,pin)\r
shutil.move(ptout,pout)\r
txt= "error occures in addmp4\n"\r
txt=txt+ str(type(inst))+"\n"\r
txt=txt+str(inst)\r
- recdblist.addlog(pout, txt, "MP4Box-log-add")\r
+ recdblist.addlog(pout, cmdn, u"MP4Box追加ログ-コマンド")\r
+ recdblist.addlog(pout, txt, u"MP4Box追加ログ-詳細")\r
time.sleep(5)\r
os.remove(ptoutb)\r
shutil.move(ptadd,padd)\r
try:
tv2b25ts(pout + ".b25", ch, time)
except Exception, inst:
- recdblist.printutf8("error occures in tv2ts.py tv2ts")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex(u"Error",u"tv2ts(tv2ts.py)", str(type(inst)),str(inst))
if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
status.changeBSCSRecording(-1)
else:
try:
doexe = exe + ' ' + ch + ' ' + time + ' \'' + pout + '\''
recdblist.printutf8(doexe)
- recdblist.addlog(pout, unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8'), u"recpt1-log")
+ recdblist.addlog(pout, doexe, u"recpt1ログ-コマンド")
+ recdblist.addlog(pout, unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8'), u"recpt1ログ-詳細")
except Exception, inst:
- recdblist.printutf8("error occures in tv2ts.py tv2b25ts")
- recdblist.printutf8(str(type(inst)))
- recdblist.printutf8(str(inst))
+ recdblist.Commonlogex(u"Error",u"tv2b25ts(tv2ts.py)", str(type(inst)),str(inst))
if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
status.changeBSCSRecording(-1)
else:
try:
exe = configreader.getpath('b25_env')+" && "
except:
- recdblist.printutf8(u"b25_remoteがオンになっていますが、b25_envが設定されていないかコメントアウトされています。")
+ inst=u"b25_remoteがオンになっていますが、b25_envが設定されていないかコメントアウトされています。"
+ recdblist.Commonlogex(u"Error",u"b252tsmix(tv2ts.py)", "",inst)
exe = exe + "nice -n 17 " + configreader.getpath('b25')
doexe = exe + u' \"' + pin + u'\" \"' + pout + u'\"'
recdblist.printutf8(doexe)
txt = unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8')
- recdblist.addlog(pin, txt, u"b25-log")
+ recdblist.addlog(pin, doexe, u"b25ログ-コマンド")
+ recdblist.addlog(pin, txt, u"b25ログ-詳細")
def tsmix2ts(pin, pout, csch):#csch=0ならcsの処理をしない
doexe = configreader.getpath("tssplitter") + " \""+ pin + "\" \""+ pout + "\" " + str(csch)
doexe = "nice -n 18 " + doexe
os.environ['LANG']="ja_JP.UTF-8"
txt = unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8')
- txt = doexe+"\n\n"+txt
- recdblist.addlog(pin, txt, "tssplit-log")
+ recdblist.addlog(pin, doexe, u"TsSplitログ-コマンド")
+ recdblist.addlog(pin, txt, u"TsSplitログ-詳細")
time.sleep(1)
if os.access(pout, os.F_OK) and os.path.getsize(pout)>10*1000*1000:
os.remove(pin)