x264preset=""
x264tune=""
x264_bitrate="5000"
+ x264_thread="auto"
+ try:
+ xtt=configreader.getenv("x264_thread")
+ xtt=int(xtt)
+ if xtt>0:
+ x264_thread=str(xtt)
+ except:
+ x264_thread="auto"
x264_addline=configreader.getenv("x264_addline")
if is24fps==1:
ofps="-ofps 24000/1001"
streampath=os.path.join(os.path.dirname(pin),str(random.randint(10000, 999999)))
os.system(u"mkfifo "+streampath)
encexe=mencoder+u" \""+pin+u"\" -vfm ffmpeg -quiet -sws 9 "+encvf+u",format=i420 "+fps+" "+ofps+" -oac mp3lame -ovc raw -of rawvideo -o \""+streampath+"\" &"
- encexe=encexe+u" nice -n 19 "+x264+" "+x264crf+u" "+x264_addline+u" --threads auto"+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" "+streampath+" "+x264streamsize
+ encexe=encexe+u" nice -n 19 "+x264+" "+x264crf+u" "+x264_addline+u" --threads "+x264_thread+" "+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" "+streampath+" "+x264streamsize
encexe=u"nice -n 19 " +encexe
recdblist.printutf8(encexe)
txt=txt+"Cmd : "+encexe+"\n"
x264preset=""
x264tune=""
x264_bitrate="2500"
+ x264_thread="auto"
+ try:
+ xtt=configreader.getenv("x264_thread")
+ xtt=int(xtt)
+ if xtt>0:
+ x264_thread=str(xtt)
+ except:
+ x264_thread="auto"
x264_addline=configreader.getenv("x264_addline")
if size == "HD":
s = "-s 1280x720 "
txt=""
os.environ['LANG']="ja_JP.UTF-8"
exe=ffmpeg+u" -y -i \""+pin+"\" -vsync 400 -vcodec rawvideo -pix_fmt yuv420p "+s+fps+"-deinterlace -an -f rawvideo - |"
- exe=exe+u" nice -n 19 "+x264+" "+x264crf+u" "+x264_addline+u" --threads auto "+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" - "+x264streamsize
+ exe=exe+u" nice -n 19 "+x264+" "+x264crf+u" "+x264_addline+u" --threads "+x264_thread+" "+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" - "+x264streamsize
txt=txt+"Cmd : "+exe+"\n"
exe = "nice -n 19 " + exe
txt=txt+"Cmd : "+exe+"\n"