OSDN Git Service

add demuxer option to x264 commandline.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 31 Dec 2011 09:27:02 +0000 (09:27 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 31 Dec 2011 09:27:02 +0000 (09:27 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@874 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/readme.txt
rec10/trunk/src/rec10.conf
rec10/trunk/src/ts2x264.py

index 8087507..f8dbd93 100644 (file)
@@ -99,6 +99,7 @@ keywordの重複チェックをより賢く
 logoのインポートに対応
 ArchLinuxサポートのための細かな変更
 新BSチャンネル対応
 logoのインポートに対応
 ArchLinuxサポートのための細かな変更
 新BSチャンネル対応
+lavf有効x264でのエラーに対応
 
 11/02/02 0.9.9
 BonTsDemuxを最新版へ(nogui化によりXvfbが不要)
 
 11/02/02 0.9.9
 BonTsDemuxを最新版へ(nogui化によりXvfbが不要)
index 0c1cc4b..482da6c 100644 (file)
@@ -62,7 +62,7 @@ x264_preset=4
 crf=24
 animation_crf=18
 x264_thread = 0
 crf=24
 animation_crf=18
 x264_thread = 0
-x264_addline =
+x264_addline = 
 remove_ts = 0
 
 [log]
 remove_ts = 0
 
 [log]
index 0cda375..ef46832 100644 (file)
@@ -37,11 +37,11 @@ def ts2x264(pin, pout, opts):#sizeは"HD"か"SD"
         size = "WVGA"\r
     if re.search("MW1",opts):\r
         size = "QVGA_BASE"\r
         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
         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
         sar=0\r
     if re.search("v", opts):\r
         is24fps=1\r
@@ -384,7 +384,7 @@ def getMovieBaseSize(pin):
 def getMovieBaseSize2(pin):##動画開始後すぐに解像度が変更されたときに対処\r
     ffmpeg=configreader.getConfPath("ffmpeg")\r
     os.environ['LANG']="ja_JP.UTF-8"\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
     try:\r
         recdblist.addCommandSelfLog(pin, exe)\r
     except Exception, inst:\r
@@ -441,7 +441,7 @@ def getMoviePAR(pin):
 def getMoviePAR2(pin):\r
     ffmpeg=configreader.getConfPath("ffmpeg")\r
     os.environ['LANG']="ja_JP.UTF-8"\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
     try:\r
         recdblist.addCommandSelfLog(pin, exe)\r
     except Exception, inst:\r
@@ -544,9 +544,9 @@ def getParSize(pin,y):
         tY=-1\r
     return [tX,tY]\r
 def getX264CoreVersion():\r
         tY=-1\r
     return [tX,tY]\r
 def getX264CoreVersion():\r
-    x264=configreader.getConfPath("x264")
+    x264=configreader.getConfPath("x264")\r
     #print 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
     #print t1\r
     rT=re.compile(u"x264 core:(\d*)[\d]*.*\Z")\r
     rM=rT.match(t1)\r
@@ -569,10 +569,10 @@ def getX264Commandline(preset,sar,fps,x264profile,x264tune,pout,pin,x264streamsi
         x264crf=u"--crf "+str(crf)\r
     if interlaced==1:\r
         x264interlaced="--tff --nal-hrd vbr"\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
         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 fps=="24000/1001 --keyint 24" or fps =="24000/1001":\r
                 if x264streamsize=="1280x720":\r
                     x264bluray=u"--ref 6 "+x264bluray\r
@@ -585,10 +585,10 @@ def getX264Commandline(preset,sar,fps,x264profile,x264tune,pout,pin,x264streamsi
                     if interlaced==0:\r
                         x264bluray=u"--ref 3 --fake-interlaced --pic-struct "+x264bluray\r
                     else:\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
             if fps=="24000/1001 --keyint 24" or fps =="24000/1001":\r
                 if x264streamsize=="1280x720":\r
                     x264bluray=u"--ref 6 "+x264bluray\r