Fixed the AVConv code too

Fixed the code in ffmpeg
This commit is contained in:
Sergio Costas 2016-10-18 00:45:37 +02:00
parent 55cd22a949
commit 50ee33b2c3
2 changed files with 20 additions and 13 deletions

View file

@ -221,6 +221,9 @@ class avconv(devedeng.avbase.avbase):
vcd = False vcd = False
maxrate = int(file_project.video_rate_final * 1500)
minrate = int(file_project.video_rate_final * 666.66)
if (self.config.disc_type == "divx"): if (self.config.disc_type == "divx"):
self.command_var.append("-vcodec") self.command_var.append("-vcodec")
self.command_var.append("mpeg4") self.command_var.append("mpeg4")
@ -262,10 +265,14 @@ class avconv(devedeng.avbase.avbase):
self.command_var.append("30000/1001") self.command_var.append("30000/1001")
self.command_var.append("-pix_fmt") self.command_var.append("-pix_fmt")
self.command_var.append("yuv420p") self.command_var.append("yuv420p")
self.command_var.append("-maxrate") self.command_var.append("-maxrate:v")
self.command_var.append("9000000") if maxrate > 9000000:
self.command_var.append("-minrate") maxrate = 9000000
self.command_var.append("1500000") self.command_var.append(str(maxrate))
self.command_var.append("-minrate:v")
if minrate < 15000000:
minrate = 15000000
self.command_var.append(str(minrate))
self.command_var.append("-bufsize") self.command_var.append("-bufsize")
self.command_var.append("1835008") self.command_var.append("1835008")
self.command_var.append("-packetsize") self.command_var.append("-packetsize")
@ -354,9 +361,13 @@ class avconv(devedeng.avbase.avbase):
self.command_var.append("-pix_fmt") self.command_var.append("-pix_fmt")
self.command_var.append("yuv420p") self.command_var.append("yuv420p")
self.command_var.append("-maxrate:v") self.command_var.append("-maxrate:v")
self.command_var.append("2516000") if maxrate > 2516000:
maxrate = 2516000
self.command_var.append(str(maxrate))
self.command_var.append("-minrate:v") self.command_var.append("-minrate:v")
self.command_var.append("1145000") if minrate < 1145000:
minrate = 1145000
self.command_var.append(str(minrate))
self.command_var.append("-bufsize") self.command_var.append("-bufsize")
self.command_var.append("1835008") self.command_var.append("1835008")
self.command_var.append("-packetsize") self.command_var.append("-packetsize")

View file

@ -217,7 +217,6 @@ class ffmpeg(devedeng.executor.executor):
maxrate = int(file_project.video_rate_final * 1500) maxrate = int(file_project.video_rate_final * 1500)
minrate = int(file_project.video_rate_final * 666.66) minrate = int(file_project.video_rate_final * 666.66)
if (self.config.disc_type == "divx"): if (self.config.disc_type == "divx"):
self.command_var.append("-vcodec") self.command_var.append("-vcodec")
self.command_var.append("mpeg4") self.command_var.append("mpeg4")
@ -354,17 +353,14 @@ class ffmpeg(devedeng.executor.executor):
self.command_var.append("480x480") self.command_var.append("480x480")
self.command_var.append("-pix_fmt") self.command_var.append("-pix_fmt")
self.command_var.append("yuv420p") self.command_var.append("yuv420p")
self.command_var.append("-maxrate:v")
if maxrate > 2516000: if maxrate > 2516000:
maxrate = 2516000 maxrate = 2516000
self.command_var.append(str(maxrate)) self.command_var.append(str(maxrate))
self.command_var.append("-minrate") self.command_var.append("-minrate:v")
if minrate < 1145000: if minrate < 1145000:
minrate = 1145000 minrate = 1145000
self.command_var.append(str(minrate)) self.command_var.append(str(minrate))
self.command_var.append("-maxrate:v")
self.command_var.append("2516000")
self.command_var.append("-minrate:v")
self.command_var.append("1145000")
self.command_var.append("-bufsize") self.command_var.append("-bufsize")
self.command_var.append("1835008") self.command_var.append("1835008")
self.command_var.append("-packetsize") self.command_var.append("-packetsize")