Now shows a default value for preview duration
Fixed progress bar for subtitle creation Allows to choose the subtitle colors
This commit is contained in:
parent
832644c2b7
commit
7f24e891ec
6 changed files with 142 additions and 11 deletions
|
|
@ -31,7 +31,7 @@ The current visible changes are quite small in number:
|
||||||
* Allows to use VLC or MPlayer for preview
|
* Allows to use VLC or MPlayer for preview
|
||||||
* Allows to choose between Brasero or K3B for burning the discs
|
* Allows to choose between Brasero or K3B for burning the discs
|
||||||
* Allows to set properties for several files in one step
|
* Allows to set properties for several files in one step
|
||||||
|
* Allow to choose the subtitle colors
|
||||||
|
|
||||||
## THINGS TO DO ##
|
## THINGS TO DO ##
|
||||||
|
|
||||||
|
|
@ -42,12 +42,15 @@ Some of the future ideas to add to Devede NG are, without an specific order:
|
||||||
* allow to replace the movie's audio track with one or several MP3 or OGG audio files
|
* allow to replace the movie's audio track with one or several MP3 or OGG audio files
|
||||||
* widescreen menus for DVDs
|
* widescreen menus for DVDs
|
||||||
* choose between MP2 and AC3 audio for menus
|
* choose between MP2 and AC3 audio for menus
|
||||||
* allow to choose the subtitle colors
|
* preview of a converted menu
|
||||||
|
|
||||||
|
|
||||||
## History of versions ##
|
## History of versions ##
|
||||||
* version in GIT
|
* version in GIT
|
||||||
* allow to set properties for several files in one step
|
* Now shows a default value for preview duration
|
||||||
|
* Fixed progress bar for subtitle creation
|
||||||
|
* Allows to choose the subtitle colors
|
||||||
|
* Allows to set properties for several files in one step
|
||||||
* Fixed bug whe setting PAL or NTSC toggle in file properties
|
* Fixed bug whe setting PAL or NTSC toggle in file properties
|
||||||
* Added two-pass conversion
|
* Added two-pass conversion
|
||||||
* Now detects separately MKISOFS and GENISOIMAGE, allowing to have only one of them installed in the system
|
* Now detects separately MKISOFS and GENISOIMAGE, allowing to have only one of them installed in the system
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,12 @@
|
||||||
<property name="step_increment">1</property>
|
<property name="step_increment">1</property>
|
||||||
<property name="page_increment">10</property>
|
<property name="page_increment">10</property>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="subt_thickness">
|
||||||
|
<property name="upper">30</property>
|
||||||
|
<property name="value">3</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
<object class="GtkListStore" id="subtitles_list">
|
<object class="GtkListStore" id="subtitles_list">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name Subtitles -->
|
<!-- column-name Subtitles -->
|
||||||
|
|
@ -1067,6 +1073,93 @@
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box23">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label17">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Fill color:</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkColorButton" id="subt_fill_color">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label20">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">8</property>
|
||||||
|
<property name="label" translatable="yes">Outline color:</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkColorButton" id="subt_outline_color">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label41">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">8</property>
|
||||||
|
<property name="label" translatable="yes">Outline thickness:</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spinbutton1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">subt_thickness</property>
|
||||||
|
<property name="digits">1</property>
|
||||||
|
<property name="value">3</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ Devede will create a preview with the selected parameters, so you will be able t
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="adjustment">length</property>
|
<property name="adjustment">length</property>
|
||||||
|
<property name="value">60</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,9 @@ class configuration(GObject.GObject):
|
||||||
self.sub_codepage = None
|
self.sub_codepage = None
|
||||||
self.burner = None
|
self.burner = None
|
||||||
self.mkiso = None
|
self.mkiso = None
|
||||||
|
self.subt_fill_color = (1,1,1,1)
|
||||||
|
self.subt_outline_color = (0,0,0,1)
|
||||||
|
self.subt_outline_thickness = 0.0
|
||||||
|
|
||||||
config_path = os.path.join(os.environ.get("HOME"),".devede")
|
config_path = os.path.join(os.environ.get("HOME"),".devede")
|
||||||
try:
|
try:
|
||||||
|
|
@ -150,6 +153,14 @@ class configuration(GObject.GObject):
|
||||||
if linea[:19]=="subtitle_font_size:":
|
if linea[:19]=="subtitle_font_size:":
|
||||||
self.subtitles_font_size = int(linea[19:].strip())
|
self.subtitles_font_size = int(linea[19:].strip())
|
||||||
continue
|
continue
|
||||||
|
if linea[:20] == "subtitle_fill_color:":
|
||||||
|
c = linea[20:].strip().split(",")
|
||||||
|
self.subt_fill_color = (float(c[0]), float(c[1]), float(c[2]), 1.0)
|
||||||
|
if linea[:23] == "subtitle_outline_color:":
|
||||||
|
c = linea[23:].strip().split(",")
|
||||||
|
self.subt_outline_color = (float(c[0]), float(c[1]), float(c[2]), 1.0)
|
||||||
|
if linea[:27] == "subtitle_outilne_thickness:":
|
||||||
|
self.subt_outline_thickness = float(linea[27:].strip())
|
||||||
config_data.close()
|
config_data.close()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
@ -199,6 +210,10 @@ class configuration(GObject.GObject):
|
||||||
if (self.sub_language != None):
|
if (self.sub_language != None):
|
||||||
config_data.write("sub_language:"+str(self.sub_language)+"\n")
|
config_data.write("sub_language:"+str(self.sub_language)+"\n")
|
||||||
config_data.write("subtitle_font_size:"+str(self.subtitles_font_size)+"\n")
|
config_data.write("subtitle_font_size:"+str(self.subtitles_font_size)+"\n")
|
||||||
|
config_data.write("subtitle_fill_color:"+str(self.subt_fill_color[0])+","+str(self.subt_fill_color[1])+","+str(self.subt_fill_color[2])+"\n")
|
||||||
|
config_data.write("subtitle_outline_color:"+str(self.subt_outline_color[0])+","+str(self.subt_outline_color[1])+","+str(self.subt_outline_color[2])+"\n")
|
||||||
|
config_data.write("subtitle_outilne_thickness:"+str(self.subt_outline_thickness))
|
||||||
|
|
||||||
config_data.close()
|
config_data.close()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,10 @@ class file_movie(devede.interface_manager.interface_manager):
|
||||||
self.add_float_adjustment("audio_delay", 0.0)
|
self.add_float_adjustment("audio_delay", 0.0)
|
||||||
self.add_integer_adjustment("chapter_size", 5)
|
self.add_integer_adjustment("chapter_size", 5)
|
||||||
|
|
||||||
|
self.add_colorbutton("subt_fill_color", self.config.subt_fill_color)
|
||||||
|
self.add_colorbutton("subt_outline_color", self.config.subt_outline_color)
|
||||||
|
self.add_float_adjustment("subt_thickness", self.config.subt_outline_thickness)
|
||||||
|
|
||||||
if list_files == None:
|
if list_files == None:
|
||||||
self.add_list("subtitles_list")
|
self.add_list("subtitles_list")
|
||||||
else:
|
else:
|
||||||
|
|
@ -558,11 +562,16 @@ class file_movie(devede.interface_manager.interface_manager):
|
||||||
def on_button_accept_clicked(self,b):
|
def on_button_accept_clicked(self,b):
|
||||||
|
|
||||||
self.store_ui(self.builder)
|
self.store_ui(self.builder)
|
||||||
|
self.config.subt_fill_color = self.subt_fill_color
|
||||||
|
self.config.subt_outline_color = self.subt_outline_color
|
||||||
|
self.config.subt_outline_thickness = self.subt_thickness
|
||||||
if self.list_files == None:
|
if self.list_files == None:
|
||||||
|
# editing file properties
|
||||||
self.set_final_rates()
|
self.set_final_rates()
|
||||||
self.set_final_size_aspect()
|
self.set_final_size_aspect()
|
||||||
self.emit('title_changed',self.title_name)
|
self.emit('title_changed',self.title_name)
|
||||||
else:
|
else:
|
||||||
|
# editing properties for a group of files
|
||||||
data = self.store_file()
|
data = self.store_file()
|
||||||
sel = self.wtreeview_multiproperties.get_selection()
|
sel = self.wtreeview_multiproperties.get_selection()
|
||||||
model, pathlist = sel.get_selected_rows()
|
model, pathlist = sel.get_selected_rows()
|
||||||
|
|
@ -635,10 +644,11 @@ class file_movie(devede.interface_manager.interface_manager):
|
||||||
|
|
||||||
if len(self.subtitles_list) != 0:
|
if len(self.subtitles_list) != 0:
|
||||||
last_process = converter
|
last_process = converter
|
||||||
if duration == 0:
|
#if duration == 0:
|
||||||
|
# it seems that SPUMUX always fills the entire subtitles
|
||||||
duration2 = self.original_length
|
duration2 = self.original_length
|
||||||
else:
|
#else:
|
||||||
duration2 = duration
|
# duration2 = duration
|
||||||
stream_id = 0
|
stream_id = 0
|
||||||
for subt in self.subtitles_list:
|
for subt in self.subtitles_list:
|
||||||
subt_file = subt[0]
|
subt_file = subt[0]
|
||||||
|
|
@ -652,7 +662,8 @@ class file_movie(devede.interface_manager.interface_manager):
|
||||||
subt_mux = devede.subtitles_mux.subtitles_mux()
|
subt_mux = devede.subtitles_mux.subtitles_mux()
|
||||||
subt_mux.multiplex_subtitles( output_path, subt_file, subt_codepage, subt_lang, subt_upper,
|
subt_mux.multiplex_subtitles( output_path, subt_file, subt_codepage, subt_lang, subt_upper,
|
||||||
self.subt_font_size,self.format_pal,self.force_subtitles,
|
self.subt_font_size,self.format_pal,self.force_subtitles,
|
||||||
final_aspect, duration2, stream_id)
|
final_aspect, duration2, stream_id,
|
||||||
|
self.subt_fill_color, self.subt_outline_color, self.subt_thickness)
|
||||||
subt_mux.add_dependency(last_process)
|
subt_mux.add_dependency(last_process)
|
||||||
converter.add_child_process(subt_mux)
|
converter.add_child_process(subt_mux)
|
||||||
last_process = subt_mux
|
last_process = subt_mux
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,13 @@ class subtitles_mux(devede.executor.executor):
|
||||||
devede.executor.executor.__init__(self)
|
devede.executor.executor.__init__(self)
|
||||||
self.config = devede.configuration_data.configuration.get_config()
|
self.config = devede.configuration_data.configuration.get_config()
|
||||||
|
|
||||||
def multiplex_subtitles(self, file_path, subtitles_path,subt_codepage, subt_lang,
|
def multiplex_subtitles(self, file_path, subtitles_path, subt_codepage, subt_lang,
|
||||||
subt_upper,font_size, pal, force_subtitles, aspect, duration, stream_id):
|
subt_upper, font_size, pal, force_subtitles, aspect, duration, stream_id, fill_color, outline_color, outline_thick):
|
||||||
|
|
||||||
|
if len(fill_color) == 4:
|
||||||
|
fill_color = fill_color[:3]
|
||||||
|
if len(outline_color) == 4:
|
||||||
|
outline_color = outline_color[:3]
|
||||||
|
|
||||||
self.subt_path = file_path
|
self.subt_path = file_path
|
||||||
self.duration = duration
|
self.duration = duration
|
||||||
|
|
@ -53,7 +58,10 @@ class subtitles_mux(devede.executor.executor):
|
||||||
out_xml.write(str(font_size))
|
out_xml.write(str(font_size))
|
||||||
if subt_upper:
|
if subt_upper:
|
||||||
out_xml.write('" bottom-margin="50')
|
out_xml.write('" bottom-margin="50')
|
||||||
out_xml.write('" font="arial" horizontal-alignment="center" vertical-alignment="bottom" aspect="')
|
out_xml.write('" fill-color="#%02X%02X%02X"' % fill_color)
|
||||||
|
out_xml.write(' outline-color="#%02X%02X%02X"' % outline_color)
|
||||||
|
out_xml.write(' outline-thickness="%d"' % outline_thick)
|
||||||
|
out_xml.write(' font="arial" horizontal-alignment="center" vertical-alignment="bottom" aspect="')
|
||||||
out_xml.write(str(aspect))
|
out_xml.write(str(aspect))
|
||||||
out_xml.write('" force="')
|
out_xml.write('" force="')
|
||||||
if force_subtitles:
|
if force_subtitles:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue