"""\r
\r
"""\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
fps=u"-r 29.970030 "\r
x264fps="30000/1001"\r
x264streamsize=""\r
""\r
recdblist.addCommandLog(pin, u"FFmpeg動画エンコード", exe, txt)\r
def getMovieBaseSize(pin):\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
exe=ffmpeg+u" -i \""+pin+"\" 2>&1"\r
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')\r
sizeMaxY=tY\r
return [sizeMaxX,sizeMaxY]\r
def getMovieBaseSize2(pin):##動画開始後すぐに解像度が変更されたときに対処\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"\r
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')\r
os.remove(pin+".size.ts")\r
return [sizeMaxX,sizeMaxY]\r
def getMoviePAR(pin):\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
exe=ffmpeg+u" -i \""+pin+"\" 2>&1"\r
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')\r
pary=tEY\r
return [parx,pary]\r
def getMoviePAR2(pin):\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"\r
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')\r
os.remove(pin+".size.ts")\r
return [parx,pary]\r
def getMovieDAR(pin):\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
exe=ffmpeg+u" -i \""+pin+"\" 2>&1"\r
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')\r
dary=tEY\r
return [darx,dary]\r
def getMovieDAR2(pin):\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"\r
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')\r
tY=-1\r
return [tX,tY]\r
def getX264CoreVersion():\r
- x264=configreader.getPathSetting("x264")\r
+ x264=configreader.getConfPath("x264")\r
t1=commands.getoutput(x264+" --help|grep core")\r
rT=re.compile(u"x264 core:(\d*)[\d]*.*\Z")\r
rM=rT.match(t1)\r
v=int(rM.group(1))\r
return v\r
def getX264Commandline(preset,sar,fps,x264profile,x264tune,pout,pin,x264streamsize,crf=-1,bitrate=0):\r
- x264=configreader.getPathSetting("x264")\r
+ x264=configreader.getConfPath("x264")\r
os.environ['LANG']="ja_JP.UTF-8"\r
x264_sar="--sar "+sar\r
x264preset=u"--preset "+preset\r
recdblist.addLog(pin, txt, u"Wav2aac_Lameログ-詳細")\r
def ts2single_audio(pts,opts):\r
paac=pts.replace(".ts",".aac")\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
e0=ffmpeg+" -i \""+pts+"\" -y -vn -f aac -acodec copy \""+paac+"\""\r
p0=subprocess.Popen(e0,shell=True)\r
os.waitpid(p0.pid, 0)\r
if not os.path.exists(pts.replace(".ts",".mp3")):\r
ts2single_fp_BonTsDemux(pts,opts)\r
def ts2singlewav(pts,opts):\r
- bontsdemux = configreader.getPathSetting('bontsdemux')\r
+ bontsdemux = configreader.getConfPath('bontsdemux')\r
bonpin = "Z:\\" + pts[1:]\r
outf = os.path.splitext(pts)[0]\r
bonpout = "Z:\\" + outf[1:]\r
recdblist.addCommandLog(ots, u"BonTsDemux 音声取り出し", exe, logt)\r
def ts2single_mp3_ffmpeg(pts):\r
pmp3=pts.replace(".ts",".mp3")\r
- ffmpeg=configreader.getPathSetting("ffmpeg")\r
+ ffmpeg=configreader.getConfPath("ffmpeg")\r
e0=ffmpeg+" -i \""+pts+"\" -y -vn -ab 128k \""+pmp3+"\""\r
p0=subprocess.Popen(e0,shell=True)\r
os.waitpid(p0.pid, 0)\r
def ts2single_fp_BonTsDemux(pts,opts):\r
useNero=0\r
try:\r
- if configreader.getPathSetting("useNeroAAC")=="1" and os.path.exists(configreader.getPathSetting("NeroAAC")):\r
+ if configreader.getConfPath("useNeroAAC")=="1" and os.path.exists(configreader.getConfPath("NeroAAC")):\r
useNero=1\r
except:\r
useNero=0\r
"""\r
delay is string\r
"""\r
- bontsdemux = configreader.getPathSetting('bontsdemux')\r
- wine = configreader.getPathSetting('wine')\r
+ bontsdemux = configreader.getConfPath('bontsdemux')\r
+ wine = configreader.getConfPath('wine')\r
bonpin = "Z:\\" + pin[1:]\r
outf = os.path.splitext(pin)[0]\r
bonpout = "Z:\\" + outf[1:]\r
ffpout22=ffpout2.replace(".wav",".mp3")\r
useNero=0\r
try:\r
- if configreader.getPathSetting("useNeroAAC")=="1" and os.path.exists(configreader.getPathSetting("NeroAAC")):\r
+ if configreader.getConfPath("useNeroAAC")=="1" and os.path.exists(configreader.getConfPath("NeroAAC")):\r
useNero=1\r
except:\r
useNero=0\r
os.remove(ffpout1)\r
os.remove(ffpout2)\r
def ts2pentaaudio_BonTsDemux(pin, delay,opts):\r
- bontsdemux = configreader.getPathSetting('bontsdemux')\r
- wine = configreader.getPathSetting('wine')\r
+ bontsdemux = configreader.getConfPath('bontsdemux')\r
+ wine = configreader.getConfPath('wine')\r
bonpin = "Z:\\" + pin[1:]\r
outf = os.path.splitext(pin)[0]\r
bonpout = "Z:\\" + outf[1:]\r
ffpout21=ffpout1.replace(".wav",".mp3")\r
useNero=0\r
try:\r
- if configreader.getPathSetting("useNeroAAC")=="1" and os.path.exists(configreader.getPathSetting("NeroAAC")):\r
+ if configreader.getConfPath("useNeroAAC")=="1" and os.path.exists(configreader.getConfPath("NeroAAC")):\r
useNero=1\r
except:\r
useNero=0\r
except:
""
def tv2b25ts(pout, ch, time):
- exe = configreader.getPathSetting('recpt1')
+ exe = configreader.getConfPath('recpt1')
if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
status.changeBSCSRecording(1)
else:
else:
status.changeTERecording(-1)
def tv2b25ts_b25(pout, ch, time):
- exe = configreader.getPathSetting('recpt1')
+ exe = configreader.getConfPath('recpt1')
doexe = exe + ' --b25 ' + ch + ' ' + time + ' \'' + pout + '\''
os.system(doexe)
def b252tsmix(pin, pout):
if not (os.path.exists(pout) and os.path.getsize(pin)>os.path.getsize(pout)*0.95 and os.path.getsize(pin)<os.path.getsize(pout)*1.05):
exe=""
- if configreader.getPathSetting('b25_remote')=="1":
+ if configreader.getConfPath('b25_remote')=="1":
try:
- exe = configreader.getPathSetting('b25_env')+" && "
+ exe = configreader.getConfPath('b25_env')+" && "
except:
inst=u"b25_remoteがオンになっていますが、b25_envが設定されていないかコメントアウトされています。"
recdblist.addCommonlogEX(u"Error",u"b252tsmix(tv2ts.py)", "",inst)
- exe = exe + "nice -n 17 " + configreader.getPathSetting('b25')
+ exe = exe + "nice -n 17 " + configreader.getConfPath('b25')
doexe = exe + u' \"' + pin + u'\" \"' + pout + u'\"'
recdblist.printutf8(doexe)
txt = unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8')
recdblist.addLog(pin, doexe, u"b25ログ-コマンド")
recdblist.addLog(pin, txt, u"b25ログ-詳細")
def tsmix2ts(pin, pout, csch):#csch=0ならcsの処理をしない
- doexe = configreader.getPathSetting("tssplitter") + " \""+ pin + "\" \""+ pout + "\" " + str(csch)
+ doexe = configreader.getConfPath("tssplitter") + " \""+ pin + "\" \""+ pout + "\" " + str(csch)
doexe = "nice -n 18 " + doexe
os.environ['LANG']="ja_JP.UTF-8"
txt = unicode(commands.getoutput(doexe.encode('utf-8')),'utf-8')