Now uses the right minimum and maximum bitrate
Now sets the right file extension with Matroska and DivX files
This commit is contained in:
parent
c3f8d3531d
commit
27828d2dc5
9 changed files with 987 additions and 928 deletions
|
|
@ -1,4 +1,8 @@
|
|||
## History of versions ##
|
||||
* version 4.8.6 (2016-12-14)
|
||||
* Now ensures that the average bitrate is never smaller than the minimum bitrate
|
||||
* Now the matroska and divx files have the right extension
|
||||
|
||||
* version 4.8.5 (2016-11-24)
|
||||
* Fixed a bug when loading a project file (thanks to RecursiveProgrammer)
|
||||
* Updated the german translation
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.18.3 -->
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<object class="GtkDialog" id="dialog_create">
|
||||
|
|
@ -62,9 +62,11 @@
|
|||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="width_request">380</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Choose the folder where Devede will create the files and a name for it. Do not use a folder in a VFAT/FAT32 drive. Characters /, | and \ are not accepted and will be replaced by underscores.</property>
|
||||
<property name="justify">fill</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<object class="GtkDialog" id="done">
|
||||
<property name="width_request">640</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<object class="GtkDialog" id="dialog_error">
|
||||
<property name="width_request">640</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<object class="GtkListStore" id="liststore_elements">
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
<property name="width_request">480</property>
|
||||
<property name="height_request">360</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
|
|
@ -56,6 +57,7 @@
|
|||
<object class="GtkLabel" id="label_message">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="justify">fill</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -64,7 +64,7 @@ except:
|
|||
setup(
|
||||
name='devedeng',
|
||||
|
||||
version='4.8.5',
|
||||
version='4.8.6',
|
||||
|
||||
description='A video DVD creator',
|
||||
long_description = "A program that allows to create video DVDs",
|
||||
|
|
|
|||
|
|
@ -231,6 +231,12 @@ class avconv(devedeng.avbase.avbase):
|
|||
self.command_var.append("libmp3lame")
|
||||
self.command_var.append("-f")
|
||||
self.command_var.append("avi")
|
||||
self.command_var.append("-maxrate:v")
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < (devedeng.project.devede_project.divx_min_bps * 1000):
|
||||
minrate = devedeng.project.devede_project.divx_min_bps * 1000
|
||||
self.command_var.append(str(minrate))
|
||||
elif (self.config.disc_type == "mkv"):
|
||||
self.command_var.append("-vcodec")
|
||||
self.command_var.append("h264")
|
||||
|
|
@ -238,8 +244,13 @@ class avconv(devedeng.avbase.avbase):
|
|||
self.command_var.append("libmp3lame")
|
||||
self.command_var.append("-f")
|
||||
self.command_var.append("matroska")
|
||||
else:
|
||||
if (self.config.disc_type=="dvd"):
|
||||
self.command_var.append("-maxrate:v")
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < (devedeng.project.devede_project.mkv_min_bps * 1000):
|
||||
minrate = devedeng.project.devede_project.mkv_min_bps * 1000
|
||||
self.command_var.append(str(minrate))
|
||||
elif (self.config.disc_type=="dvd"):
|
||||
if not file_project.no_reencode_audio_video:
|
||||
self.command_var.append("-c:v")
|
||||
self.command_var.append("mpeg2video")
|
||||
|
|
@ -266,12 +277,12 @@ class avconv(devedeng.avbase.avbase):
|
|||
self.command_var.append("-pix_fmt")
|
||||
self.command_var.append("yuv420p")
|
||||
self.command_var.append("-maxrate:v")
|
||||
if maxrate > 9000000:
|
||||
maxrate = 9000000
|
||||
if maxrate > (devedeng.project.devede_project.dvd_max_bps_base[0] * 1000):
|
||||
maxrate = devedeng.project.devede_project.dvd_max_bps_base[0] * 1000
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < 15000000:
|
||||
minrate = 15000000
|
||||
if minrate < (devedeng.project.devede_project.dvd_min_bps * 1000):
|
||||
minrate = devedeng.project.devede_project.dvd_min_bps * 1000
|
||||
self.command_var.append(str(minrate))
|
||||
self.command_var.append("-bufsize")
|
||||
self.command_var.append("1835008")
|
||||
|
|
@ -361,12 +372,12 @@ class avconv(devedeng.avbase.avbase):
|
|||
self.command_var.append("-pix_fmt")
|
||||
self.command_var.append("yuv420p")
|
||||
self.command_var.append("-maxrate:v")
|
||||
if maxrate > 2516000:
|
||||
maxrate = 2516000
|
||||
if maxrate > (devedeng.project.devede_project.svcd_max_bps_base[0] * 1000):
|
||||
maxrate = devedeng.project.devede_project.svcd_max_bps_base[0] * 1000
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < 1145000:
|
||||
minrate = 1145000
|
||||
if minrate < (devedeng.project.devede_project.svcd_min_bps * 1000):
|
||||
minrate = (devedeng.project.devede_project.svcd_min_bps * 1000)
|
||||
self.command_var.append(str(minrate))
|
||||
self.command_var.append("-bufsize")
|
||||
self.command_var.append("1835008")
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import os
|
|||
import devedeng.configuration_data
|
||||
import devedeng.executor
|
||||
import devedeng.mux_dvd_menu
|
||||
import devedeng.project
|
||||
|
||||
class ffmpeg(devedeng.executor.executor):
|
||||
|
||||
|
|
@ -224,6 +225,12 @@ class ffmpeg(devedeng.executor.executor):
|
|||
self.command_var.append("libmp3lame")
|
||||
self.command_var.append("-f")
|
||||
self.command_var.append("avi")
|
||||
self.command_var.append("-maxrate:v")
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < (devedeng.project.devede_project.divx_min_bps * 1000):
|
||||
minrate = devedeng.project.devede_project.divx_min_bps * 1000
|
||||
self.command_var.append(str(minrate))
|
||||
elif (self.config.disc_type == "mkv"):
|
||||
self.command_var.append("-vcodec")
|
||||
self.command_var.append("h264")
|
||||
|
|
@ -231,8 +238,13 @@ class ffmpeg(devedeng.executor.executor):
|
|||
self.command_var.append("libmp3lame")
|
||||
self.command_var.append("-f")
|
||||
self.command_var.append("matroska")
|
||||
else:
|
||||
if (self.config.disc_type=="dvd"):
|
||||
self.command_var.append("-maxrate:v")
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < (devedeng.project.devede_project.mkv_min_bps * 1000):
|
||||
minrate = devedeng.project.devede_project.mkv_min_bps * 1000
|
||||
self.command_var.append(str(minrate))
|
||||
elif (self.config.disc_type=="dvd"):
|
||||
if not file_project.no_reencode_audio_video:
|
||||
self.command_var.append("-c:v")
|
||||
self.command_var.append("mpeg2video")
|
||||
|
|
@ -259,12 +271,12 @@ class ffmpeg(devedeng.executor.executor):
|
|||
self.command_var.append("-pix_fmt")
|
||||
self.command_var.append("yuv420p")
|
||||
self.command_var.append("-maxrate:v")
|
||||
if maxrate > 9000000:
|
||||
maxrate = 9000000
|
||||
if maxrate > (devedeng.project.devede_project.dvd_max_bps_base[0] * 1000):
|
||||
maxrate = devedeng.project.devede_project.dvd_max_bps_base[0] * 1000
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < 1500000:
|
||||
minrate = 1500000
|
||||
if minrate < (devedeng.project.devede_project.dvd_min_bps * 1000):
|
||||
minrate = devedeng.project.devede_project.dvd_min_bps * 1000
|
||||
self.command_var.append(str(minrate))
|
||||
self.command_var.append("-bufsize")
|
||||
self.command_var.append("1835008")
|
||||
|
|
@ -354,12 +366,12 @@ class ffmpeg(devedeng.executor.executor):
|
|||
self.command_var.append("-pix_fmt")
|
||||
self.command_var.append("yuv420p")
|
||||
self.command_var.append("-maxrate:v")
|
||||
if maxrate > 2516000:
|
||||
maxrate = 2516000
|
||||
if maxrate > (devedeng.project.devede_project.svcd_max_bps_base[0] * 1000):
|
||||
maxrate = devedeng.project.devede_project.svcd_max_bps_base[0] * 1000
|
||||
self.command_var.append(str(maxrate))
|
||||
self.command_var.append("-minrate:v")
|
||||
if minrate < 1145000:
|
||||
minrate = 1145000
|
||||
if minrate < (devedeng.project.devede_project.svcd_min_bps * 1000):
|
||||
minrate = (devedeng.project.devede_project.svcd_min_bps * 1000)
|
||||
self.command_var.append(str(minrate))
|
||||
self.command_var.append("-bufsize")
|
||||
self.command_var.append("1835008")
|
||||
|
|
|
|||
|
|
@ -42,6 +42,26 @@ import devedeng.help
|
|||
|
||||
class devede_project:
|
||||
|
||||
dvd_max_bps_base = {0: 9000}
|
||||
dvd_min_bps = 300
|
||||
dvd_max_total = 10000
|
||||
|
||||
svcd_max_bps_base = {0: 2700}
|
||||
svcd_min_bps = 200
|
||||
svcd_max_total = 2700
|
||||
|
||||
divx_max_bps_base = {0: 4854, 720: 9708, 1080: 20000}
|
||||
divx_min_bps = 300
|
||||
divx_max_total = -1
|
||||
|
||||
mkv_max_bps_base = {0: 192, 240: 2000, 480: 14000, 720: 50000, 1080: 240000}
|
||||
mkv_min_bps = 192
|
||||
mkv_max_total = -1
|
||||
|
||||
def_max_bps_base = {0: 9000}
|
||||
def_min_bps = 300
|
||||
def_max_total = -1
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.config = devedeng.configuration_data.configuration.get_config()
|
||||
|
|
@ -344,25 +364,25 @@ class devede_project:
|
|||
fixed_size += self.menu.get_estimated_size() * 8.0
|
||||
|
||||
if (self.disc_type == "dvd"):
|
||||
max_bps_base = {0: 9000}
|
||||
min_bps = 300
|
||||
max_total = 10000
|
||||
max_bps_base = devede_project.dvd_max_bps_base.copy()
|
||||
min_bps = devede_project.dvd_min_bps
|
||||
max_total = devede_project.dvd_max_total
|
||||
elif (self.disc_type == "svcd") or (self.disc_type == "cvd"):
|
||||
max_bps_base = {0: 2700}
|
||||
min_bps = 200
|
||||
max_total = 2700
|
||||
max_bps_base = devede_project.svcd_max_bps_base.copy()
|
||||
min_bps = devede_project.svcd_min_bps
|
||||
max_total = devede_project.svcd_max_total
|
||||
elif (self.disc_type == "divx"):
|
||||
max_bps_base = {0: 4854, 720: 9708, 1080: 20000}
|
||||
min_bps = 300
|
||||
max_total = -1
|
||||
max_bps_base = devede_project.divx_max_bps_base.copy()
|
||||
min_bps = devede_project.divx_min_bps
|
||||
max_total = devede_project.divx_max_total
|
||||
elif (self.disc_type == "mkv"):
|
||||
max_bps_base = {0: 192, 240: 2000, 480: 14000, 720: 50000, 1080: 240000}
|
||||
min_bps = 192
|
||||
max_total = -1
|
||||
max_bps_base = devede_project.mkv_max_bps_base.copy()
|
||||
min_bps = devede_project.mkv_min_bps
|
||||
max_total = devede_project.mkv_max_total
|
||||
else:
|
||||
max_bps_base = {0: 9000}
|
||||
min_bps = 300
|
||||
max_total = -1
|
||||
max_bps_base = devede_project.def_max_bps_base.copy()
|
||||
min_bps = devede_project.def_min_bps
|
||||
max_total = devede_project.def_max_total
|
||||
|
||||
if (total_resolution != 0):
|
||||
remaining_disc_size = ((8000.0 * self.get_dvd_size()[0]) - fixed_size) # in kbits
|
||||
|
|
@ -539,8 +559,14 @@ class devede_project:
|
|||
except:
|
||||
pass
|
||||
counter = 0
|
||||
if self.disc_type == "divx":
|
||||
extension = "avi"
|
||||
elif self.disc_type == "mkv":
|
||||
extension = "mkv"
|
||||
else:
|
||||
extension = "mpg"
|
||||
for movie in file_movies:
|
||||
p = movie.do_conversion(os.path.join(movie_folder,"movie_"+str(counter)+".mpg"))
|
||||
p = movie.do_conversion(os.path.join(movie_folder,"movie_{:d}.{:s}".format(counter,extension)))
|
||||
run_window.add_process(p)
|
||||
final_dependencies.append(p)
|
||||
counter += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue