import configreader\r
import status\r
import tv2audio\r
-\r
+path = str(os.path.dirname(os.path.abspath(__file__))) + "/"\r
+tmppath = configreader.getConfPath("tmp")+"/"\r
+if tmppath=="/":\r
+ tmppath=path\r
+if not os.path.exists(tmppath):\r
+ os.mkdir(tmppath)\r
def ts2mp4(pin, pout, opt):\r
dir=os.path.split(pout)[0]\r
title=os.path.split(pout)[1]\r
duration="-fps 23.976023 "\r
if re.search("I",opt):\r
duration="-fps 29.970030 "\r
- exe = configreader.getConfPath("mp4box")\r
+ exe = configreader.getConfPath("mp4box")+u" -tmp "+tmppath\r
txt=""\r
os.environ['LANG']="ja_JP.UTF-8"\r
pints=pin.replace(".264",".ts")\r
recdblist.addCommandLogZip(pts, "mp4box_caption", "mp4box_caption", e0, logt)\r
if os.path.exists(pincap):\r
if os.path.getsize(pincap)>1000:\r
- exe = configreader.getConfPath("mp4box")\r
+ exe = configreader.getConfPath("mp4box")+u" -tmp "+tmppath\r
e1s=exe +u" -add \""+pincap+"\" \""+pmp4+"\""\r
addmp4(pincap,pmp4,e1s)\r
def addAudio(pts,pmp4,opts):#オプションに応じた音声の追加を行う\r
- exe = configreader.getConfPath("mp4box")\r
+ exe = configreader.getConfPath("mp4box")+u" -tmp "+tmppath\r
if re.search("d",opts) or re.search("5",opts):#二カ国語放送/5.1ch放送の場合\r
paac1=pts.replace(".ts","_1.aac")\r
paac2=pts.replace(".ts","_2.aac")\r