OSDN Git Service

fix some error.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 24 Jan 2010 14:00:25 +0000 (14:00 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 24 Jan 2010 14:00:25 +0000 (14:00 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@407 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/ts2x264.py

index 5e9f35e..8485020 100644 (file)
@@ -74,15 +74,15 @@ def encode(pin,pout,size,isvfr,is2pass,is24fps,islight):
         x264enc1=":no8x8dct:b-adapt=0:bframes=0:no-cabac:no-deblock:me=dia:partitions=i8x8,i4x4:frameref=1:subme=1:trellis=0:scenecut=0"
         x264enc2=":no8x8dct:b-adapt=0:bframes=0:no-cabac:no-deblock:me=dia:partitions=i8x8,i4x4:frameref=1:subme=1:trellis=0:scenecut=0"
     if size == "HD":
-        encvf = encvf + ",scale=1280:720::0:4"+harddup
+        encvf = encvf + ",scale=1280:720::0:3"+harddup
         bitrate = "bitrate=" + str(tv2avi.Bitrate_HD*bm)
         crf="crf=20"
     elif size == "SD":
-        encvf = encvf + ",scale=720:480::0:4"+harddup
+        encvf = encvf + ",scale=720:480::0:3"+harddup
         bitrate = "bitrate=" + str(tv2avi.Bitrate_SD*bm)
         crf="crf=20"
     elif size == "FHD":
-        encvf = encvf + ",scale=1920:1080::0:4"+harddup
+        encvf = encvf + ",scale=1920:1080::0:3"+harddup
         bitrate = "bitrate=" + str(tv2avi.Bitrate_FHD*bm)
         crf="crf=22"
     elif size == "Short":
@@ -90,11 +90,11 @@ def encode(pin,pout,size,isvfr,is2pass,is24fps,islight):
         bitrate = "bitrate=" + str(tv2avi.Bitrate_Short*bm)
         crf="crf=20"
     elif size == "LowHD":
-        encvf = encvf + ",scale=1280:720::0:4"+harddup
+        encvf = encvf + ",scale=1280:720::0:3"+harddup
         bitrate = "bitrate=" + str(tv2avi.Bitrate_LowHD*bm)
         crf="crf=22"
     else:
-        encvf = encvf + ",scale=1280:720::0:4"+harddup
+        encvf = encvf + ",scale=1280:720::0:3"+harddup
         bitrate = "bitrate=" + str(tv2avi.Bitrate_HD*bm)
         crf="crf=22"
     if is2pass == 1:
@@ -172,12 +172,15 @@ def encode_ffmpeg(pin,pout,size,is2pass):
         exe2=ffmpeg+" -y -i \""+pin+"\" -pass 2 -vsync 400 -vcodec libx264 -b "+bitrate+"k "+vf2+s+"-deinterlace -an -passlogfile \'" + pin + ".log\' \"" +pout+"\"" #aviにすべきかどうか
         txt=txt+exe1+"\n"+exe2+"\m"
         recdblist.printutf8(exe1)
+        exe1 = "nice -n 19 " + exe1
+        exe2 = "nice -n 19 " + exe2
         os.system(exe1.encode('utf-8'))
         os.system(exe2.encode('utf-8'))
     else:
         os.environ['LANG']="ja_JP.UTF-8"
         exe=ffmpeg+" -y -i \""+pin+"\" -vsync 400 -vcodec libx264 -b "+bitrate+"k "+vf2+s+"-deinterlace -an \"" +pout+"\""
         txt=txt+exe+"\n"
+        exe = "nice -n 19 " + exe
         os.system(exe.encode('utf-8'))
     logo=pin
     logo=logo.replace(".m2v",".ts")