title=os.path.split(pout)[1]\r
title=os.path.splitext(title)[0]\r
duration="-fps 29.970030 "\r
- ffmpeg=configreader.getpath("ffmpeg")\r
- isdualaac=0\r
- ispentaaudio=0\r
if re.search("a",opt):\r
duration="-fps 23.976023 "\r
elif re.search("v",opt):\r
duration="-fps 23.976023 "\r
if re.search("d",opt):\r
- isdualaac=1\r
duration="-fps 29.970030 "##ffmpegが24fpsに対応していないための措置\r
elif re.search("5",opt):\r
- ispentaaudio=1\r
duration="-fps 29.970030 "##ffmpegが24fpsに対応していないための措置\r
exe = configreader.getpath("mp4box")\r
txt=""\r
os.environ['LANG']="ja_JP.UTF-8"\r
- if isdualaac==1:\r
- wineexe=configreader.getpath("wine")\r
- #pincap=pin.replace(".264",".srt")\r
- #try:\r
- # cap2ass=configreader.getpath("caption2ass")\r
- #except:\r
- # cap2ass=""\r
- pints=pin.replace(".264",".ts")\r
- #paac1=pin.replace(".264","_1.aac")\r
- #paac2=pin.replace(".264","_2.aac")\r
- #recdblist.printutf8(paac1)\r
- #if not os.path.exists(paac1):\r
- # paac1=pin.replace(".264","_1.mp3")\r
- #if not os.path.exists(paac2):\r
- # paac2=pin.replace(".264","_2.mp3")\r
- #e0=wineexe+u" "+cap2ass+u" -format srt \"Z:\\"+pints+"\" \"Z:\\"+pincap+"\""\r
- e1=exe +u" "+duration+" -add \""+pin+"\" -new \""+pout+"\""\r
- #e1a1=exe +u" -add \""+paac1+"\" \""+pout+"\""\r
- #e1a2=exe +u" -add \""+paac2+"\" \""+pout+"\""\r
- #e1s=exe +u" -add \""+pincap+"\" \""+pout+"\""\r
- #if os.path.isfile(cap2ass):\r
- # txt=txt+execcomd(e0)\r
- execmp4box(pin, pout, e1)\r
- #addmp4(paac1, pout, e1a1)\r
- #addmp4(paac2, pout, e1a2)\r
- addAudio(pints, pout, opt)\r
- addCaption(pints, pout)\r
- #if os.path.exists(pincap) and (os.path.getsize(pincap)>1000):\r
- # addmp4(pincap, pout, e1s)\r
- elif ispentaaudio==1:\r
- #wineexe=configreader.getpath("wine")\r
- #pincap=pin.replace(".264",".srt")\r
- #try:\r
- # cap2ass=configreader.getpath("caption2ass")\r
- #except:\r
- # cap2ass=""\r
- pints=pin.replace(".264",".ts")\r
- #paac1=pin.replace(".264","_1.aac")\r
- #paac2=pin.replace(".264","_2.aac")\r
- #recdblist.printutf8(paac1)\r
- #if not os.path.exists(paac1):\r
- # paac1=pin.replace(".264","_1.mp3")\r
- #if not os.path.exists(paac2):\r
- # paac2=pin.replace(".264","_2.mp3")\r
- #e0=wineexe+u" "+cap2ass+u" -format srt \"Z:\\"+pints+"\" \"Z:\\"+pincap+"\""\r
- e1=exe +u" "+duration+" -add \""+pin+"\" -new \""+pout+"\""\r
- #e1a1=exe +u" -add \""+paac1+"\" \""+pout+"\""\r
- #e1a2=exe +u" -add \""+paac2+"\" \""+pout+"\""\r
- #e1s=exe +u" -add \""+pincap+"\" \""+pout+"\""\r
- #if os.path.isfile(cap2ass):\r
- # txt=txt+execcomd(e0)\r
- execmp4box(pin, pout, e1)\r
- addAudio(pints, pout, opt)\r
- #addmp4(paac1, pout, e1a1)\r
- #addmp4(paac2, pout, e1a2)\r
- addCaption(pints, pout)\r
- #if os.path.exists(pincap) and (os.path.getsize(pincap)>1000):\r
- # addmp4(pincap, pout, e1s)\r
- else:\r
- #wineexe=configreader.getpath("wine")\r
- #pincap=pin.replace(".264",".srt")\r
- #try:\r
- # cap2ass=configreader.getpath("caption2ass")\r
- #except:\r
- # cap2ass=""\r
- pints=pin.replace(".264",".ts")\r
- #pinaac=pin.replace(".264",".aac")\r
- #e0=wineexe+u" "+cap2ass+u" -format srt \"Z:\\"+pints+"\" \"Z:\\"+pincap+"\""\r
- #e1=ffmpeg+" -i \""+pints+"\" -vn -f aac -acodec copy \""+pinaac+"\""\r
- e2=exe +u" "+duration+" -add \""+pin+"\" -new \""+pout+"\""\r
- #e2a=exe +u" -add \""+pinaac+"\" \""+pout+"\""\r
- #e2s=exe +u" -add \""+pincap+"\" \""+pout+"\""\r
- #if os.path.isfile(cap2ass):\r
- # txt=txt+execcomd(e0)\r
- #txttt=execcomd(e1)\r
- #recdblist.addlog(pin, txttt, "get_aac")\r
- execmp4box(pin, pout, e2)\r
- addAudio(pints, pout, opt)\r
- #addmp4(pinaac, pout, e2a)\r
- addCaption(pints, pout)\r
- #if os.path.exists(pincap) and (os.path.getsize(pincap)>1000):\r
- # addmp4(pincap, pout, e2s)\r
+ pints=pin.replace(".264",".ts")\r
+ e1=exe +u" "+duration+" -add \""+pin+"\" -new \""+pout+"\""\r
+ execmp4box(pin, pout, e1)\r
+ addAudio(pints, pout, opt)\r
+ addCaption(pints, pout)\r
recdblist.addlog(pout, txt, "mp4box-log")\r
if status.getSettings_auto_del_tmp()==1:\r
if os.path.exists(pout):\r
cap2ass=""\r
if os.path.isfile(cap2ass):\r
e0=wineexe+u" "+cap2ass+u" -format srt \"Z:\\"+pts+"\" \"Z:\\"+pincap+"\""\r
+ recdblist.printutf8(e0)\r
p0=subprocess.Popen(e0,shell=True)\r
time.sleep(120)\r
if p0.poll==-1:#実行中\r