import os.path
import re
import random
+import time
import recdblist
def ts2x264(pin, pout, opts):#sizeは"HD"か"SD"
os.environ['LANG']="ja_JP.UTF-8"
random.seed(pin)
random.jumpahead(10)
- streampath=os.path.join(os.path.dirname(pin),str(random.randint(10000, 999999)))
+ temptime=int(time.time())
+ temptime=temptime % 9697
+ random.jumpahead(temptime)
+ streampath=os.path.join(os.path.dirname(pin),str(random.randint(10000, 99999999)))
os.system(u"mkfifo "+streampath)
encexe=mencoder+u" \""+pin+u"\" -vfm ffmpeg -quiet "+encvf+u",format=i420 "+fps+" "+ofps+" -oac mp3lame -ovc raw -of rawvideo -o \""+streampath+"\" &"
encexe=encexe+u" nice -n 19 "+x264+" "+x264_sar+" "+x264crf+u" "+x264_addline+u" --threads "+x264_thread+" "+x264profile+x264preset+" "+x264tune+" "+x264fps+" -o \""+pout+"\" "+streampath+" "+x264streamsize