chadd('te21', '0406.ontvjapan.com', 'toukai', '21', '0')
chadd('te19', '0407.ontvjapan.com', 'chukyo', '19', '0')
chadd('te23', '0420.ontvjapan.com', 'aichi', '23', '0')
+chadd('te27', '0417.ontvjapan.com', 'mie', '27', '0')
if dtime > 120:
if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
ret = 1
- print "delete b25 is " + str(ret)
+ #print "delete b25 is " + str(ret)
return ret
def compareFilesize(pathbase, path, percentage):
"""
delpath.append(os.path.join(temppath,title+".ts.tsmix"))
delpath.append(os.path.join(temppath,title+".ts.log"))
delpath.append(os.path.join(temppath,title+".sa.avi"))
+ delpath.append(os.path.join(temppath,title+".sa.avi.log"))
delpath.append(os.path.join(temppath,title+".log"))
for dp in delpath:
try:
ff.append([p1['num'],p1['title'],time1])
if maxnum<p1['num']+1:
maxnum=p1['num']+1
+ detMultiDeltaDays(ff)
+def detMultiDeltaDays(num_with_title_with_dates):
+ maxnum=0
+ for ft in num_with_title_with_dates:
+ if maxnum<ft[0]+1:
+ maxnum=ft[0]+1
+ ff=num_with_title_with_dates
f3=[None]*maxnum
- print f3
fret={}
for i in range(0, maxnum, 1):
- print i
f3[i]=[]
for f2 in ff:
f3[f2[0]].append(f2)
for j in range(i+1,maxnum,1):
for ft3 in f3[i]:
for ft4 in f3[j]:
- for gdd in guessDeltaDay(i, ft3[2], j, ft4[2]):
+ for gdd in detSingleDeltaDay(i, ft3[2], j, ft4[2]):
print gdd
if fret.get(gdd[0])!=None:
print fret
else:
fret[gdd[0]]=gdd[1]
print fret
-def guessDeltaDay(num1,date1,num2,date2):
+ maxk=0
+ maxp=0
+ for i in range(maxnum):
+ if fret.get(i)!=None:
+ if maxp<fret[i]:
+ maxk=i
+ maxp=fret[i]
+ print maxk
+ print maxp
+ return maxk
+def detSingleDeltaDay(num1,date1,num2,date2):
dd=date1-date2
if date1<date2:
dd=date2-date1
#classify.detNameType("te#st#25")
#classify.detNameType("te#st#32 subtest")
#guess.detNameType("",recordedpath)
- #guess.detNum("よくわかる現代魔法",recordedpath+"アニメ/ひだまりスケッチ")
+ guess.detNum("よくわかる現代魔法",recordedpath+"アニメ/ファイト一発!充電ちゃん!!(Cmpl.)")
""
\ No newline at end of file
btime = bt.strftime("%Y-%m-%d %H:%M:%S")
etime = et.strftime("%Y-%m-%d %H:%M:%S")
recdb.rec_reckey(recdb.REC_ENCODE_QUE, title, chtxt, btime, etime, opt)
- print checker.checkB25Decode(recpath + "/" + title + ".ts.b25", recpath + "/" + title + ".ts")
+ #print checker.checkB25Decode(recpath + "/" + title + ".ts.b25", recpath + "/" + title + ".ts")
#if checker.checkB25Decode(recpath + "/" + title + ".ts.b25", recpath + "/" + title + ".ts") == 1:
#os.remove(recpath + "/" + title + ".ts.b25")
sys.exit()
outf = os.path.splitext(pin)[0]
bonpout = "Z:\\" + outf[1:]
xvfb = configreader.getpath('xvfb-run')
+ logpath=pin.replace("ts","log")
exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" -delay 167 -nd -sound 0 -o \"" + bonpout + "\" -start -quit"
#print exe
exe = xvfb + ' -a ' + exe
ffpin1 = pin.replace("ts", "wav")
ffpin2 = pin.replace("ts", "m2v")
exe = "ffmpeg -y -i \'" + ffpin1 + "\' -i \'" + ffpin2 + "\' -r 29.97 -vsync 200 -vcodec copy -acodec libmp3lame -async 200 -ab 128k -f avi \'" + pout + "\'"
- #print exe
+ print exe
#commands.getoutput(exe)
os.system(exe)
os.remove(ffpin1)
tch="0"
if csch!="0":
tch=csch
+ elif ch=="101":
+ tch="101"
+ elif ch=="102":
+ tch="102"
#else:
# tch=ch
tsmix2ts(pout + ".tsmix", pout, tch)
tch="0"
if csch!="0":
tch=csch
+ elif ch=="101":
+ tch="101"
+ elif ch=="102":
+ tch="102"
#else:
# tch=ch
tsmix2ts(pout + ".tsmix", pout, tch)