path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
recpath = "/home/ftpusr/ftp-tmp/Recording/"
ftpusr = "/home/ftpusr/ftp-tmp"
-recordedpath = "/home/ftpusr/ftp5/Series-Finish/"
if __name__ == "__main__":
- ""
\ No newline at end of file
+ tv2mp4.addCaption(recpath+"", recpath+"")
\ No newline at end of file
except:\r
cap2ass=""\r
if os.path.isfile(cap2ass):\r
+ print 1\r
e0=wineexe+u" "+cap2ass+u" -format srt \"Z:\\"+pts+"\" \"Z:\\"+pincap+"\""\r
recdblist.printutf8(e0)\r
+ print 2\r
p0=subprocess.Popen(e0,shell=True,env="LANG=ja_JP.UTF-8",stdout=subprocess.PIPE)\r
+ print 3\r
time.sleep(120)\r
+ print p0.poll\r
+ print 4\r
if p0.poll==None:#実行中\r
+ print "4a"\r
if os.path.getsize(pincap)<1000:#2mで1kb以下の場合自動で終了\r
+ print "5a"\r
os.kill(p0.pid,signal.SIGKILL)\r
else:\r
+ print "4b"\r
os.waitpid(p0.pid, 0)\r
- recdblist.addlog(pts,unicode(p0.communicate, "UTF-8"), "Caption-Log")\r
-\r
- if os.path.getsize(pincap)>1000:\r
- exe = configreader.getpath("mp4box")\r
- e1s=exe +u" -add \""+pincap+"\" \""+pout+"\""\r
- addmp4(pincap,pmp4,e1s)\r
+ print "5b"\r
+ logt=unicode(p0.communicate, "UTF-8")\r
+ recdblist.printutf8(logt)\r
+ recdblist.addlog(pts,logt, "Caption-Log")\r
+ print "6"\r
+ if os.path.getsize(pincap)>1000:\r
+ print "7"\r
+ exe = configreader.getpath("mp4box")\r
+ print "8"\r
+ e1s=exe +u" -add \""+pincap+"\" \""+pout+"\""\r
+ print "9"\r
+ addmp4(pincap,pmp4,e1s)\r
def addAudio(pts,pmp4,opt):#オプションに応じた音声の追加を行う\r
exe = configreader.getpath("mp4box")\r
if re.search("d",opt) or re.search("5",opt):#二カ国語放送/5.1ch放送の場合\r