OSDN Git Service

make it to rec10 0.5.9.0
[rec10/rec10-git.git] / rec10 / trunk / src / ts2xvid.py
index 516eaf3..04bbf50 100644 (file)
@@ -2,11 +2,10 @@
 # coding: UTF-8
 # Rec10 TS Recording Tools
 # Copyright (C) 2009 Yukikaze
-import os
 import time
 import re
-import status
 import tv2avi
+import commands
 def ts2xvid(pin,pout,opts):#sizeは"HD"か"SD"
     """
     pinで指定されたファイルをpoutにx264でエンコードして書き出す
@@ -15,7 +14,6 @@ def ts2xvid(pin,pout,opts):#sizeは"HD"か"SD"
     pin = pin.encode('utf-8')
     isAnime=0
     size="SD"
-    
     makemini=0
     if re.search("a",opts):
         isAnime=1
@@ -56,13 +54,18 @@ def ts2xvid(pin,pout,opts):#sizeは"HD"か"SD"
         pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
         pas1exe="nice -n 19 "+pas1exe
         pas2exe="nice -n 19 "+pas2exe
+        print pas1exe
+        commands.getoutput(pas1exe)
+        #os.system(pas1exe)
         print pas2exe
-        os.system(pas1exe)
-        print "1pass終了"
         time.sleep(5)
-        os.system(pas2exe)
+        commands.getoutput(pas2exe)
+        #os.system(pas2exe)
     else:
         pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2 -oac mp3lame -lameopts cbr:br=128  -o \'"+pout+"\'"
         pas1exe="nice -n 19 "+pas1exe
-        os.system(pas1exe)
+        print pas1exe
+        commands.getoutput(pas1exe)
+        #os.system(pas1exe)
+        
     
\ No newline at end of file