+++ /dev/null
-def audio2ogg(pin,pout):
- pout = pout.encode('utf-8')
- pin = pin.encode('utf-8')
- """
- pinで指定されたファイルをpoutにoggでエンコードして書き出す
- """
-
- exe="mencoder \'"+pin+"\' -quiet -oac mp3lame -lameopts cbr:br=128 -o "+pout
-
- if dualpass==1:
- pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
- pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
- pas1exe="/usr/bin/nice -n 19 "+pas1exe
- pas2exe="/usr/bin/nice -n 19 "+pas2exe
- print pas2exe
- os.system(pas1exe)
- print "1pass終了"
- time.sleep(5)
- os.system(pas2exe)
- else:
- pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto -oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
- pas1exe="/usr/bin/nice -n 19 "+pas1exe
- os.system(pas1exe)
- status.setEncoding(status.getEncoding()-1)
\ No newline at end of file
[path]
recpt1=/usr/local/bin/recpt1
-recpt1-bak=/pt1-tools/recpt1/recpt1
-b25-BAK=/pt1-tools/b25/b25
b25=/usr/local/bin/b25
splitt=/pt1-tools/tstools/TsSplitter.exe
bontsdemux=/pt1-tools/tstools/BonTsDemux.exe
-tsepg2xml=/pt1-tools/tstools/tsEpg2xml/tsEpg2xml.exe
temppath=/home/ftpusr/ftp1/rec-temp
recpath-bak=/home/ftpusr/ftp3/Recording
recpath=/home/ftpusr/ftp1/rec-temp
-cmdow=/pt1-tools/tstools/cmdow.exe
-cmdwine=wine /pt1-tools/tstools/cmdow.exe /run /hid
epgdump=/pt1-tools/tstools/epgdump
gridserver_port=10910
wine=wine
# coding: UTF-8
# Rec10 TS Recording Tools
# Copyright (C) 2009 Yukikaze
-import epgdb
+import timerec
import chdate
-epgdb.updateall()
chdate
+timerec.task()
\ No newline at end of file
global REC_FIN_LOCAL
global REC_MISS_DECODE
global REC_TS_DECODING
+global REC_TS_RECORDING
REC_RESERVE="res"
REC_FINAL_RESERVE="rec"
REC_END="end"
REC_FIN_LOCAL="fin_local"
REC_MISS_DECODE="tsmiss"
REC_TS_DECODING="tsdecoding"
+REC_TS_RECORDING="tsrecording"
+
try:
db.execute('create table rectime (type TEXT,chtxt TEXT,title TEXT,btime TEXT,etime TEXT,deltatime TEXT,deltaday TEXT,opt TEXT,id INTEGER PRIMARY KEY,UNIQUE(type,chtxt,title,btime,deltaday))')
except:
timet="180"
if re.search(u'cs',bctype):
mode="/CS"
- timet="240"
+ timet="180"
elif re.search(u'bs',bctype):
mode="/BS"
timet="180"
else :
mode=chdb.bctypesearch(u'te'+ch)['ontv']
- tsepg2xml=configreader.getpath("tsepg2xml")
epgdump=configreader.getpath("epgdump")
if os.access(pout+".ts", os.F_OK):
os.remove(pout+".ts")
t=t+1
if t>10:
break
- #exe="export LANG=ja_JP.UTF-8 && /usr/bin/nice -n 19 wine "+tsepg2xml+" "+mode+" "+pout+".ts >"+pout
exe="export LANG=ja_JP.UTF-8 && /usr/bin/nice -n 15 "+epgdump+" "+mode+" "+pout+".ts "+pout
print exe
os.system(exe)
bitrate="bitrate="+tv2avi.Bitrate_HD
if dualpass==1:
- pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
- pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
+ pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
+ pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
pas1exe="/usr/bin/nice -n 19 "+pas1exe
pas2exe="/usr/bin/nice -n 19 "+pas2exe
print pas2exe
bitrate="bitrate="+tv2avi.Bitrate_HD
if dualpass==1:
- pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=1:turbo -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
- pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
+ pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=1:turbo -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
+ pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
pas1exe="/usr/bin/nice -n 19 "+pas1exe
pas2exe="/usr/bin/nice -n 19 "+pas2exe
print pas2exe
def dualaudiots2avi(pin, pout):
bontsdemux = configreader.getpath('bontsdemux')
wine = configreader.getpath('wine')
- cmdwine = configreader.getpath('cmdwine')
bonpin = "Z:\\" + pin[1:]
outf = os.path.splitext(pin)[0]
bonpout = "Z:\\" + outf[1:]
def dualaudio2sep(pin,pout,delay):
bontsdemux = configreader.getpath('bontsdemux')
wine = configreader.getpath('wine')
- cmdwine = configreader.getpath('cmdwine')
bonpin = "Z:\\" + pin[1:]
outf = os.path.splitext(pin)[0]
bonpout = "Z:\\" + outf[1:]
def pentaaudiots2avi(pin, pout):
bontsdemux = configreader.getpath('bontsdemux')
wine = configreader.getpath('wine')
- cmdwine = configreader.getpath('cmdwine')
bonpin = "Z:\\" + pin[1:]
outf = os.path.splitext(pin)[0]
bonpout = "Z:\\" + outf[1:]
#tsmix2ts(temp[0]+"mix."+temp[1],pout,csch)
#os.remove(temp[0]+"mix."+temp[1])
temp=pout.split(".")
+ ext=os.path.splitext(pout)[1]#ext=".なんたら"
#t=base64.b16encode(pout)
#t=t[0:30]
t=hashlib.md5(pout).hexdigest()
tempt=os.path.split(pout)
path=tempt[0]
tv2b25ts(pout+".b25",ch,time)
- b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
- tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
+ b252tsmix(pout+".b25",path+"/"+t+ext)
+ tsmix2ts(path+"/"+t+ext,pout,csch)
#os.remove(path+"/"+t+"."+temp[1])
if os.access(pout, os.F_OK):
try:
- os.remove(path+"/"+t+"."+temp[1])
+ os.remove(path+"/"+t+ext)
except:
""
def b252ts(pout,ch,csch):
temp=pout.split(".")
+ ext=os.path.splitext(pout)[1]#ext=".なんたら"
#m=hashlib.md5
#m.update(pout)
#t=m.hexdigest()
tempt=os.path.split(pout)
path=tempt[0]
#tv2b25ts(pout+".b25",ch,time)
- b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
- tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
+ b252tsmix(pout+".b25",path+"/"+t+ext)
+ tsmix2ts(path+"/"+t+ext,pout,csch)
#os.remove(path+"/"+t+"."+temp[1])
if os.access(pout, os.F_OK):
try:
- os.remove(path+"/"+t+"."+temp[1])
+ os.remove(path+"/"+t+ext)
except:
""
global flags,lastflag,xmldate
#string=str(date)
date=date.replace("\n","")
- date=date.replace(" ","")
- date=date.replace("(","[")
- date=date.replace(")","]")
- date=date.replace("(","[")
- date=date.replace(")","]")
+ #date=date.replace(" ","")
+ #date=date.replace("(","[")
+ #date=date.replace(")","]")
+ #date=date.replace("(","[")
+ #date=date.replace(")","]")
date=date.replace("\"","")
date=date.replace("\'","")
date=date.encode('utf-8')