# coding: UTF-8\r
# Rec10 TS Recording Tools\r
# Copyright (C) 2009-2011 Yukikaze\r
-import os\r
-import re\r
+\r
import commands\r
import os\r
import re\r
recdblist.addLog(pin, txt, u"Wav2aac_Lameログ-詳細")\r
def wav2mp3_lame(pin,pout):\r
os.environ['LANG']="ja_JP.UTF-8"\r
- lame="lame"\r
+ lame=configreader.getConfPath('lame')\r
exe=lame+" -b 128 \""+pin+"\" \""+pout+"\""\r
try:\r
txt=commands.getoutput(exe.encode('utf-8'))\r
def ts2single_audio(pts,opts):\r
paac=pts.replace(".ts",".aac")\r
ffmpeg=configreader.getConfPath("ffmpeg")\r
- e0=ffmpeg+" -i \""+pts+"\" -y -vn -f aac -acodec copy \""+paac+"\""\r
+ e0=ffmpeg+" -i \""+pts+"\" -y -vn -acodec copy \""+paac+"\""\r
p0=subprocess.Popen(e0,shell=True)\r
os.waitpid(p0.pid, 0)\r
if p0.poll==None:#実行中\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
ffpout22=ffpout2.replace(".wav",".mp3")\r
useNero=0\r
try:\r
- if configreader.getConfPath("useNeroAAC")=="1" and os.path.exists(configreader.getConfPath("NeroAAC")):\r
+ if os.path.exists(configreader.getConfPath("NeroAAC")):\r
useNero=1\r
except:\r
useNero=0\r
ffpout21=ffpout1.replace(".wav",".mp3")\r
useNero=0\r
try:\r
- if configreader.getConfPath("useNeroAAC")=="1" and os.path.exists(configreader.getConfPath("NeroAAC")):\r
+ if os.path.exists(configreader.getConfPath("NeroAAC")):\r
useNero=1\r
except:\r
useNero=0\r