This commit is contained in:
Sergio Costas 2015-08-22 19:19:49 +02:00
commit f8cc036f51
5 changed files with 61 additions and 20 deletions

View file

@ -848,23 +848,6 @@
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckButton" id="divide_in_chapters">
<property name="label" translatable="yes">Split the file in chapters (for easy seeking)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="chapter_size_spinbutton">
<property name="visible">True</property>
@ -896,6 +879,50 @@
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="divide_in_chapters">
<property name="label" translatable="yes">Split the file in chapters (for easy seeking)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label42">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">4</property>
<property name="label" translatable="yes">Manual chapter list (split by comma in mm:ss format):</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="chapter_list_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>

View file

@ -203,7 +203,7 @@ class avconv(devedeng.executor.executor):
if (file_project.width_final != file_project.width_midle) or (file_project.height_final != file_project.height_midle):
if (cmd_line!=""):
cmd_line+=",fifo,"
cmd_line+="scale="+str(file_project.width_final)+":"+str(file_project.height_final)
cmd_line+="scale=w="+str(file_project.width_final)+":h="+str(file_project.height_final)
if cmd_line!="":
self.command_var.append("-vf")
@ -376,6 +376,8 @@ class avconv(devedeng.executor.executor):
self.command_var.append("-acodec")
if (use_mp2):
self.command_var.append("mp2")
if (audio_rate > 384):
audio_rate = 384 #max bitrate for mp2
else:
self.command_var.append("ac3")
self.command_var.append("-s")

View file

@ -384,9 +384,19 @@ class dvdauthor_converter(devedeng.executor.executor):
xml_file.write('chapters="0')
if (element.original_length > 5):
if (element.divide_in_chapters): # add chapters
manual_chapter_list = [];
if (element.chapter_list_entry):
manual_chapter_list = element.chapter_list_entry.split(",")
toadd = element.chapter_size
seconds = toadd*60
while seconds < (element.original_length - 4):
# Check manual_chapter_list for manual entries before set next chapter
for idx, m_chapter in enumerate(manual_chapter_list):
m_chapter = m_chapter.split(":")
m_chapter = int(m_chapter[0])*60+int(m_chapter[1]) # Change from mm:ss to seconds
if (m_chapter < seconds):
seconds = m_chapter
del manual_chapter_list[idx]
thetime = self.return_time(seconds,False)
xml_file.write(","+thetime)
seconds += (toadd*60)

View file

@ -55,6 +55,8 @@ class file_movie(devedeng.interface_manager.interface_manager):
self.add_toggle("show_in_menu", True)
else:
self.original_aspect_ratio = 1.777 # dummy value
self.add_text("chapter_list_entry", None);
self.add_dualtoggle("format_pal","format_ntsc",self.config.PAL)
self.add_toggle("video_rate_automatic", True)
@ -107,7 +109,7 @@ class file_movie(devedeng.interface_manager.interface_manager):
self.add_show_hide("format_pal", ["size_pal"], ["size_ntsc"])
self.add_enable_disable("divide_in_chapters", ["chapter_size_spinbutton"], [])
self.add_enable_disable("divide_in_chapters", ["chapter_size_spinbutton", "chapter_list_entry"], [])
self.add_enable_disable("video_rate_automatic", [], ["video_spinbutton"])
self.add_enable_disable("audio_rate_automatic", [], ["audio_spinbutton"])
self.add_enable_disable("sound5_1", ["copy_sound"], [])

View file

@ -75,7 +75,7 @@ class interface_manager(GObject.GObject):
The default value can be a text or None """
if (default_value != None):
exec('self.'+text_name+' = "'+str(default_value)+'"')
exec('self.'+text_name+' = "'+str(default_value).replace('\"','\\"')+'"')
else:
exec('self.'+text_name+' = None')
self.interface_text.append( (text_name, callback) )