[History]
11/XX/XX 0.9.10
-ステレオ音声時のBonTsDemux仕様オプション追加("0")
+ステレオ音声時のBonTsDemux仕様オプション追加("b")
lameの実行パスチェックを実装
mencoderのコマンドラインを最新版対応へ
ffmpegのオプション追加
f.write(str+"\n")\r
f.close()\r
def addCommonlogEX(type,place,inst,txt,verbose_level=500,log_level=500):\r
- lt=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")+u":"\r
+ lt=unicode(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))+u":"\r
if txt=="":\r
lt=lt+u"["+type+u"] "+place+u" "+inst\r
else:\r
- lt=lt+u"["+type+u"] "+place+u" "+inst+u"\n"+txt\r
+ try:\r
+ lt=lt+u"["+type+u"] "+place+u" "+inst+u"\n"+txt\r
+ except:\r
+ print [type,place,inst,txt]\r
lt=lt.encode('utf-8')\r
logfname="/var/log/rec10"\r
mode="a"\r
if not os.path.exists(paac2) and not os.path.exists(pmp32):
tv2audio.ts2pentaaudio_BonTsDemux(os.path.join(recpath, title+".ts"), recdblist.BONTSDEMUX_DELAY, opt)
time.sleep(3)
- elif re.search("0", opt):
+ elif re.search("b", opt):
pin = recpath + "/" + title + ".m2v"
if not os.path.exists(pin) or os.path.getsize(pin)<100*1000:
paac2 = recpath + "/" + title + ".aac"
encodeFfmpegSar(tm2v,pout,size,is24fps,quality,crf,deinterlace)\r
elif re.search("5",opts):#5.1chの場合\r
encodeFfmpegSar(pin,pout,size,is24fps,quality,crf,deinterlace)\r
- elif re.search("0",opts):#BonTsDemuxを使いたい場合\r
+ elif re.search("b",opts):#BonTsDemuxを使いたい場合\r
tm2v=pin.replace(".ts",".m2v")\r
encodeFfmpegSar(tm2v,pout,size,is24fps,quality,crf,deinterlace)\r
else:\r
exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" "+delayt+" -nd -sound 0 -o \"" + bonpout + "\""\r
#recdblist.printutf8(exe)\r
recdblist.printutf8(exe)\r
- p=subprocess.Popen(exe.encode('utf-8'),shell=True)\r
- os.waitpid(p.pid, 0)\r
- logt=unicode(p.communicate()[0], "UTF-8")\r
- recdblist.addCommandLog(ots, u"BonTsDemux 音声取り出し", exe, logt)\r
+ txt=commands.getoutput(exe.encode('utf-8'))\r
+ recdblist.addCommandLog(pts, u"BonTsDemux 音声取り出し", exe, txt)\r
def ts2single_mp3_ffmpeg(pts):\r
pmp3=pts.replace(".ts",".mp3")\r
ffmpeg=configreader.getConfPath("ffmpeg")\r
pentaaudio = 1\r
if re.search("d", opt):\r
dualaudio = 1\r
- if re.search("0", opt):\r
+ if re.search("b", opt):\r
singleaudiosplit = 1\r
if re.search(u"\[二\]", pout):\r
dualaudio = 1\r
addmp4(paac1, pmp4, e1a1)\r
if os.path.exists(paac2):\r
addmp4(paac2, pmp4, e1a2)\r
- elif re.search("0",opts):#BonTsDemuxを使って音声をスプリットした場合\r
+ elif re.search("b",opts):#BonTsDemuxを使って音声をスプリットした場合\r
paac=pts.replace(".ts",".aac")\r
if not os.path.exists(paac):\r
paac=pts.replace(".ts",".mp3")\r