size = "WVGA"\r
if re.search("MW1",opts):\r
size = "QVGA_BASE"\r
- crf=crf+4
+ crf=crf+4\r
sar=0\r
if re.search("MW2", opts):\r
size = "WVGA_BASE"\r
- crf=crf+2
+ crf=crf+2\r
sar=0\r
if re.search("v", opts):\r
is24fps=1\r
def getMovieBaseSize2(pin):##動画開始後すぐに解像度が変更されたときに対処\r
ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
- exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"
+ exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"\r
try:\r
recdblist.addCommandSelfLog(pin, exe)\r
except Exception, inst:\r
def getMoviePAR2(pin):\r
ffmpeg=configreader.getConfPath("ffmpeg")\r
os.environ['LANG']="ja_JP.UTF-8"\r
- exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"
+ exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"\r
try:\r
recdblist.addCommandSelfLog(pin, exe)\r
except Exception, inst:\r
tY=-1\r
return [tX,tY]\r
def getX264CoreVersion():\r
- x264=configreader.getConfPath("x264")
+ x264=configreader.getConfPath("x264")\r
#print x264\r
- t1=commands.getoutput(x264+" --help|grep core")
+ t1=commands.getoutput(x264+" --help|grep core")\r
#print t1\r
rT=re.compile(u"x264 core:(\d*)[\d]*.*\Z")\r
rM=rT.match(t1)\r
x264crf=u"--crf "+str(crf)\r
if interlaced==1:\r
x264interlaced="--tff --nal-hrd vbr"\r
- if bluray==1:
+ if bluray==1:\r
if getX264CoreVersion()<115:\r
- x264bluray="--weightp 1 --nal-hrd vbr --bframes 3 --b-pyramid none --open-gop bluray --slices 4 --aud --colorprim bt709 --transfer bt709 "\r
- x264_addline=""
+ x264bluray="--demuxer raw --weightp 1 --nal-hrd vbr --bframes 3 --b-pyramid none --open-gop bluray --slices 4 --aud --colorprim bt709 --transfer bt709 "\r
+ x264_addline=""\r
if fps=="24000/1001 --keyint 24" or fps =="24000/1001":\r
if x264streamsize=="1280x720":\r
x264bluray=u"--ref 6 "+x264bluray\r
if interlaced==0:\r
x264bluray=u"--ref 3 --fake-interlaced --pic-struct "+x264bluray\r
else:\r
- x264bluray=u"--ref 3 "+x264bluray
- elif getX264CoreVersion()>=115:
- x264bluray="--bluray-compat --open-gop --nal-hrd vbr --bframes 3 --b-pyramid none --aud --colorprim bt709 --transfer bt709 "
- x264_addline=""
+ x264bluray=u"--ref 3 "+x264bluray\r
+ elif getX264CoreVersion()>=115:\r
+ x264bluray="--demuxer raw --bluray-compat --open-gop --nal-hrd vbr --bframes 3 --b-pyramid none --aud --colorprim bt709 --transfer bt709 "\r
+ x264_addline=""\r
if fps=="24000/1001 --keyint 24" or fps =="24000/1001":\r
if x264streamsize=="1280x720":\r
x264bluray=u"--ref 6 "+x264bluray\r