From: gn64_jp Date: Sat, 31 Dec 2011 09:27:02 +0000 (+0000) Subject: add demuxer option to x264 commandline. X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=commitdiff_plain;h=e34d6df7961fb24611cc60c60846d2d9f4dd75ed add demuxer option to x264 commandline. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@874 4e526526-5e11-4fc0-8910-f8fd03428081 --- diff --git a/rec10/trunk/src/readme.txt b/rec10/trunk/src/readme.txt index 8087507..f8dbd93 100644 --- a/rec10/trunk/src/readme.txt +++ b/rec10/trunk/src/readme.txt @@ -99,6 +99,7 @@ keywordの重複チェックをより賢く logoのインポートに対応 ArchLinuxサポートのための細かな変更 新BSチャンネル対応 +lavf有効x264でのエラーに対応 11/02/02 0.9.9 BonTsDemuxを最新版へ(nogui化によりXvfbが不要) diff --git a/rec10/trunk/src/rec10.conf b/rec10/trunk/src/rec10.conf index 0c1cc4b..482da6c 100644 --- a/rec10/trunk/src/rec10.conf +++ b/rec10/trunk/src/rec10.conf @@ -62,7 +62,7 @@ x264_preset=4 crf=24 animation_crf=18 x264_thread = 0 -x264_addline = +x264_addline = remove_ts = 0 [log] diff --git a/rec10/trunk/src/ts2x264.py b/rec10/trunk/src/ts2x264.py index 0cda375..ef46832 100644 --- a/rec10/trunk/src/ts2x264.py +++ b/rec10/trunk/src/ts2x264.py @@ -37,11 +37,11 @@ def ts2x264(pin, pout, opts):#sizeは"HD"か"SD" size = "WVGA" if re.search("MW1",opts): size = "QVGA_BASE" - crf=crf+4 + crf=crf+4 sar=0 if re.search("MW2", opts): size = "WVGA_BASE" - crf=crf+2 + crf=crf+2 sar=0 if re.search("v", opts): is24fps=1 @@ -384,7 +384,7 @@ def getMovieBaseSize(pin): def getMovieBaseSize2(pin):##動画開始後すぐに解像度が変更されたときに対処 ffmpeg=configreader.getConfPath("ffmpeg") os.environ['LANG']="ja_JP.UTF-8" - 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" try: recdblist.addCommandSelfLog(pin, exe) except Exception, inst: @@ -441,7 +441,7 @@ def getMoviePAR(pin): def getMoviePAR2(pin): ffmpeg=configreader.getConfPath("ffmpeg") os.environ['LANG']="ja_JP.UTF-8" - 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" try: recdblist.addCommandSelfLog(pin, exe) except Exception, inst: @@ -544,9 +544,9 @@ def getParSize(pin,y): tY=-1 return [tX,tY] def getX264CoreVersion(): - x264=configreader.getConfPath("x264") + x264=configreader.getConfPath("x264") #print x264 - t1=commands.getoutput(x264+" --help|grep core") + t1=commands.getoutput(x264+" --help|grep core") #print t1 rT=re.compile(u"x264 core:(\d*)[\d]*.*\Z") rM=rT.match(t1) @@ -569,10 +569,10 @@ def getX264Commandline(preset,sar,fps,x264profile,x264tune,pout,pin,x264streamsi x264crf=u"--crf "+str(crf) if interlaced==1: x264interlaced="--tff --nal-hrd vbr" - if bluray==1: + if bluray==1: if getX264CoreVersion()<115: - x264bluray="--weightp 1 --nal-hrd vbr --bframes 3 --b-pyramid none --open-gop bluray --slices 4 --aud --colorprim bt709 --transfer bt709 " - 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 " + x264_addline="" if fps=="24000/1001 --keyint 24" or fps =="24000/1001": if x264streamsize=="1280x720": x264bluray=u"--ref 6 "+x264bluray @@ -585,10 +585,10 @@ def getX264Commandline(preset,sar,fps,x264profile,x264tune,pout,pin,x264streamsi if interlaced==0: x264bluray=u"--ref 3 --fake-interlaced --pic-struct "+x264bluray else: - 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 + elif getX264CoreVersion()>=115: + x264bluray="--demuxer raw --bluray-compat --open-gop --nal-hrd vbr --bframes 3 --b-pyramid none --aud --colorprim bt709 --transfer bt709 " + x264_addline="" if fps=="24000/1001 --keyint 24" or fps =="24000/1001": if x264streamsize=="1280x720": x264bluray=u"--ref 6 "+x264bluray