# Rec10 TS Recording Tools
# Copyright (C) 2009 Yukikaze
import tv2avi
-import status
-import os
import time
import re
-
+import commands
+import os
def ts2x264(pin,pout,opts):#sizeは"HD"か"SD"
pout = pout.encode('utf-8')
pin = pin.encode('utf-8')
"""
isAnime=0
size="SD"
-
- makemini=0
if re.search("a",opts):
isAnime=1
#print "isAnime"
else:
encvf=encvf+"scale=1280:720,harddup"
bitrate="bitrate="+tv2avi.Bitrate_HD
-
if dualpass==1:
pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto: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+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto -oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
pas1exe="nice -n 19 "+pas1exe
- os.system(pas1exe)
\ No newline at end of file
+ print pas1exe
+ commands.getoutput(pas1exe)
+
\ No newline at end of file