Added experimental support for 16:9 menues

This commit is contained in:
Sergio Costas 2018-05-01 20:47:27 +02:00
parent e70bca519b
commit 5c6b98647b
8 changed files with 178 additions and 90 deletions

View file

@ -2,6 +2,7 @@
* version 4.11.0 (2018-05-01) * version 4.11.0 (2018-05-01)
* Added support for XFBurn * Added support for XFBurn
* Added experimental support for 16:9 menues
* version 4.10.0 (2018-04-29) * version 4.10.0 (2018-04-29)
* Now, when using a custom audio in the menu, it will last the whole audio duration, not 30 seconds * Now, when using a custom audio in the menu, it will last the whole audio duration, not 30 seconds

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 --> <!-- Generated with glade 3.22.1 -->
<interface> <interface>
<requires lib="gtk+" version="3.10"/> <requires lib="gtk+" version="3.10"/>
<object class="GtkAdjustment" id="margin_bottom"> <object class="GtkAdjustment" id="margin_bottom">
@ -39,6 +39,9 @@
<property name="modal">True</property> <property name="modal">True</property>
<property name="window_position">center</property> <property name="window_position">center</property>
<property name="deletable">False</property> <property name="deletable">False</property>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkBox" id="box1"> <object class="GtkBox" id="box1">
<property name="visible">True</property> <property name="visible">True</property>
@ -257,7 +260,7 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
@ -321,7 +324,7 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
@ -424,6 +427,71 @@
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkRadioButton" id="menu_aspect_4_3">
<property name="label" translatable="yes">4:3 (classic)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="menu_aspect_16_9">
<property name="label" translatable="yes">16:9 (widescreen)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">menu_aspect_4_3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Menu aspect&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child> <child>
<object class="GtkFrame" id="frame3"> <object class="GtkFrame" id="frame3">
<property name="visible">True</property> <property name="visible">True</property>
@ -579,7 +647,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -623,7 +691,7 @@
<property name="preview_text"/> <property name="preview_text"/>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
@ -752,7 +820,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">4</property> <property name="position">5</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -857,7 +925,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">5</property> <property name="position">6</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -948,7 +1016,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">6</property> <property name="position">7</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -990,7 +1058,7 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>

View file

@ -494,7 +494,7 @@ class avconv(devedeng.avbase.avbase):
self.command_var.append(output_file) self.command_var.append(output_file)
def create_menu_mpeg(self, n_page, background_music, sound_length, pal, video_rate, audio_rate, output_path, use_mp2): def create_menu_mpeg(self, n_page, background_music, sound_length, pal, video_rate, audio_rate, output_path, use_mp2, widescreen):
self.n_page = n_page self.n_page = n_page
self.final_length = float(sound_length) self.final_length = float(sound_length)
@ -539,7 +539,10 @@ class avconv(devedeng.avbase.avbase):
self.command_var.append("-b:a") self.command_var.append("-b:a")
self.command_var.append(str(audio_rate) + "k") self.command_var.append(str(audio_rate) + "k")
self.command_var.append("-aspect") self.command_var.append("-aspect")
self.command_var.append("4:3") if widescreen:
self.command_var.append("16:9")
else:
self.command_var.append("4:3")
self.command_var.append("-t") self.command_var.append("-t")
self.command_var.append(str(1 + sound_length)) self.command_var.append(str(1 + sound_length))

View file

@ -34,8 +34,7 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
devedeng.interface_manager.interface_manager.__init__(self) devedeng.interface_manager.interface_manager.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config() self.config = devedeng.configuration_data.configuration.get_config()
self.default_background = os.path.join( self.default_background = os.path.join(self.config.pic_path, "backgrounds", "default_bg.png")
self.config.pic_path, "backgrounds", "default_bg.png")
self.default_sound = os.path.join(self.config.pic_path, "silence.ogg") self.default_sound = os.path.join(self.config.pic_path, "silence.ogg")
self.add_colorbutton("title_color", (0, 0, 0, 1), self.update_preview) self.add_colorbutton("title_color", (0, 0, 0, 1), self.update_preview)
@ -52,10 +51,9 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
self.add_text("playall_text", _("Play all"), self.update_preview) self.add_text("playall_text", _("Play all"), self.update_preview)
self.add_group("position_horizontal", [ self.add_group("position_horizontal", ["left", "center", "right"], "center", self.update_preview)
"left", "center", "right"], "center", self.update_preview) self.add_group("at_startup", ["menu_show_at_startup", "play_first_title_at_startup"], "menu_show_at_startup")
self.add_group("at_startup", [ self.add_group("menu_aspect_ratio", ["menu_aspect_4_3", "menu_aspect_16_9"], "menu_aspect_4_3", self.on_menu_aspect_changed)
"menu_show_at_startup", "play_first_title_at_startup"], "menu_show_at_startup")
self.add_toggle("play_all_c", False, self.update_preview) self.add_toggle("play_all_c", False, self.update_preview)
self.add_integer_adjustment("sound_length", 30) self.add_integer_adjustment("sound_length", 30)
@ -72,10 +70,8 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
self.add_fontbutton("title_font", "Sans 28", self.update_preview) self.add_fontbutton("title_font", "Sans 28", self.update_preview)
self.add_fontbutton("entry_font", "Sans 28", self.update_preview) self.add_fontbutton("entry_font", "Sans 28", self.update_preview)
self.add_filebutton("background_picture", self.add_filebutton("background_picture", self.default_background, self.update_preview)
self.default_background, self.update_preview) self.add_filebutton("background_music", self.default_sound, self.update_music)
self.add_filebutton("background_music",
self.default_sound, self.update_music)
self.cached_menu_font = None self.cached_menu_font = None
self.cached_menu_size = 0 self.cached_menu_size = 0
@ -346,13 +342,20 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
coordinates = [] coordinates = []
if self.sf is None: if self.sf is None:
self.sf = cairo.ImageSurface(cairo.FORMAT_ARGB32, 720, int(self.y)) if self.to_png:
self.sf = cairo.ImageSurface(cairo.FORMAT_ARGB32, 720, int(self.y))
else:
self.sf = cairo.ImageSurface(cairo.FORMAT_ARGB32, 720, 540)
self.cr = cairo.Context(self.sf) self.cr = cairo.Context(self.sf)
if not self.to_png:
if self.menu_aspect_ratio == "menu_aspect_16_9":
self.cr.scale(1.0,405.0 / self.y)
else:
self.cr.scale(1.0,540.0 / self.y)
if self.cached_menu_font != self.entry_font: if self.cached_menu_font != self.entry_font:
# memorize the font sizes # memorize the font sizes
(fontname, fontstyle, fontslant, (fontname, fontstyle, fontslant, fontsize) = self.get_font_params(self.entry_font)
fontsize) = self.get_font_params(self.entry_font)
self.cr.select_font_face(fontname, fontslant, fontstyle) self.cr.select_font_face(fontname, fontslant, fontstyle)
self.cr.set_font_size(fontsize) self.cr.set_font_size(fontsize)
extents = self.cr.font_extents() extents = self.cr.font_extents()
@ -360,35 +363,27 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
self.cached_menu_font = self.entry_font self.cached_menu_font = self.entry_font
if paint_background: if paint_background:
extra_pixbuf = GdkPixbuf.Pixbuf.new_from_file( extra_pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.background_picture)
self.background_picture)
extra_x = float(extra_pixbuf.get_width()) extra_x = float(extra_pixbuf.get_width())
extra_y = float(extra_pixbuf.get_height()) extra_y = float(extra_pixbuf.get_height())
self.cr.save() self.cr.save()
self.cr.scale(720.0 / extra_x, self.y / extra_y) self.cr.scale(720.0 / extra_x, self.y / extra_y)
surface = Gdk.cairo_surface_create_from_pixbuf( surface = Gdk.cairo_surface_create_from_pixbuf(extra_pixbuf, 1, None)
extra_pixbuf, 1, None)
self.cr.set_source_surface(surface, 0, 0) self.cr.set_source_surface(surface, 0, 0)
self.cr.paint() self.cr.paint()
self.cr.restore() self.cr.restore()
hmargin = self.title_horizontal * 720.0 / 100.0 hmargin = self.title_horizontal * 720.0 / 100.0
self.write_text(self.title_text, "title", 0 + hmargin, 720 + self.write_text(self.title_text, "title", 0 + hmargin, 720 + hmargin, self.title_vertical * self.y / 100.0, "center")
hmargin, self.title_vertical * self.y / 100.0, "center")
# else:
# self.cr.set_source_rgb(1.0,1.0,1.0)
# self.cr.paint()
top_margin_p = self.y * self.margin_top / 100.0 top_margin_p = self.y * self.margin_top / 100.0
bottom_margin_p = self.y * self.margin_bottom / 100.0 bottom_margin_p = self.y * self.margin_bottom / 100.0
left_margin_p = 720.0 * self.margin_left / 100.0 left_margin_p = 720.0 * self.margin_left / 100.0
right_margin_p = 720.0 * self.margin_right / 100.0 right_margin_p = 720.0 * self.margin_right / 100.0
entry_height = self.cached_menu_size + \ entry_height = self.cached_menu_size + self.entry_vertical_margin * 2.0 + self.entry_separation
self.entry_vertical_margin * 2.0 + self.entry_separation entries_per_page = int((self.y - top_margin_p - bottom_margin_p) / entry_height)
entries_per_page = int(
(self.y - top_margin_p - bottom_margin_p) / entry_height)
if (self.play_all_c): if (self.play_all_c):
entries_per_page -= 1 entries_per_page -= 1
n_entries = len(self.title_list) n_entries = len(self.title_list)
@ -518,13 +513,16 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
self.current_shown_page = 0 self.current_shown_page = 0
self.update_preview() self.update_preview()
def on_menu_aspect_changed(self, b=None):
self.update_preview()
def on_drawingarea_preview_draw(self, widget, cr): def on_drawingarea_preview_draw(self, widget, cr):
""" Callback to repaint the menu preview window when it """ Callback to repaint the menu preview window when it
sends the EXPOSE event """ sends the EXPOSE event """
if (self.sf is None): if (self.sf is None):
self.paint_menu(True, self.wshow_as_selected.get_active( self.to_png = False
), False, self.current_shown_page) self.paint_menu(True, self.wshow_as_selected.get_active(), False, self.current_shown_page)
if (self.current_shown_page >= self.pages): if (self.current_shown_page >= self.pages):
self.current_shown_page = self.pages self.current_shown_page = self.pages
@ -544,12 +542,9 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
# transparent="000000"') # transparent="000000"')
xml_file.write( xml_file.write(
'<subpictures>\n\t<stream>\n\t\t<spu force="yes" start="00:00:00.00"') '<subpictures>\n\t<stream>\n\t\t<spu force="yes" start="00:00:00.00"')
xml_file.write(' image="' + os.path.join(path, "menu_" + xml_file.write(' image="' + os.path.join(path, "menu_" + str(n_page) + '_unselected_bg.png"'))
str(n_page) + '_unselected_bg.png"')) xml_file.write(' highlight="' + os.path.join(path, "menu_" + str(n_page) + '_selected_bg.png"'))
xml_file.write(' highlight="' + os.path.join(path, xml_file.write(' select="' + os.path.join(path, "menu_" + str(n_page) + '_active_bg.png"'))
"menu_" + str(n_page) + '_selected_bg.png"'))
xml_file.write(' select="' + os.path.join(path,
"menu_" + str(n_page) + '_active_bg.png"'))
xml_file.write(' >\n') xml_file.write(' >\n')
n_elements = 0 n_elements = 0
has_next = False has_next = False
@ -637,26 +632,21 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
menu_converter = cv.get_menu_converter() menu_converter = cv.get_menu_converter()
while n_page < self.pages: while n_page < self.pages:
self.sf = None self.sf = None
self.to_png = True
coordinates = self.paint_menu(True, False, False, n_page) coordinates = self.paint_menu(True, False, False, n_page)
self.sf.write_to_png(os.path.join( self.sf.write_to_png(os.path.join(menu_folder, "menu_" + str(n_page) + "_bg.png"))
menu_folder, "menu_" + str(n_page) + "_bg.png"))
self.sf = None self.sf = None
self.paint_menu(False, False, False, n_page) self.paint_menu(False, False, False, n_page)
self.sf.write_to_png(os.path.join( self.sf.write_to_png(os.path.join(menu_folder, "menu_" + str(n_page) + "_unselected_bg.png"))
menu_folder, "menu_" + str(n_page) + "_unselected_bg.png"))
self.sf = None self.sf = None
self.paint_menu(False, True, False, n_page) self.paint_menu(False, True, False, n_page)
self.sf.write_to_png(os.path.join( self.sf.write_to_png(os.path.join(menu_folder, "menu_" + str(n_page) + "_selected_bg.png"))
menu_folder, "menu_" + str(n_page) + "_selected_bg.png"))
self.sf = None self.sf = None
self.paint_menu(False, False, True, n_page) self.paint_menu(False, False, True, n_page)
self.sf.write_to_png(os.path.join( self.sf.write_to_png(os.path.join(menu_folder, "menu_" + str(n_page) + "_active_bg.png"))
menu_folder, "menu_" + str(n_page) + "_active_bg.png")) entry_data = self.create_menu_stream(menu_folder, n_page, coordinates)
entry_data = self.create_menu_stream(
menu_folder, n_page, coordinates)
converter = menu_converter() converter = menu_converter()
final_path = converter.create_menu_mpeg( final_path = converter.create_menu_mpeg(n_page, self.background_music, self.sound_length, self.config.PAL, self.video_rate, self.audio_rate, menu_folder, self.audio_mp2, self.menu_aspect_ratio == "menu_aspect_16_9")
n_page, self.background_music, self.sound_length, self.config.PAL, self.video_rate, self.audio_rate, menu_folder, self.audio_mp2)
entry_data["filename"] = final_path entry_data["filename"] = final_path
menu_entries.append(entry_data) menu_entries.append(entry_data)
# add this process without dependencies # add this process without dependencies

View file

@ -29,7 +29,7 @@ class dvdauthor_converter(devedeng.executor.executor):
devedeng.executor.executor.__init__(self) devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config() self.config = devedeng.configuration_data.configuration.get_config()
def create_dvd_project(self, path, name, file_movies, menu_entries, start_with_menu, play_all_opt): def create_dvd_project(self, path, name, file_movies, menu_entries, start_with_menu, play_all_opt, menuWide):
movie_path = os.path.join(path, "dvd_tree") movie_path = os.path.join(path, "dvd_tree")
try: try:
@ -37,8 +37,7 @@ class dvdauthor_converter(devedeng.executor.executor):
except: except:
pass pass
xml_file = self.create_dvdauthor_xml( xml_file = self.create_dvdauthor_xml(path, file_movies, menu_entries, start_with_menu, play_all_opt, menuWide)
path, file_movies, menu_entries, start_with_menu, play_all_opt)
self.command_var = [] self.command_var = []
self.command_var.append("dvdauthor") self.command_var.append("dvdauthor")
@ -57,7 +56,7 @@ class dvdauthor_converter(devedeng.executor.executor):
self.progress_bar[1].set_text(data[0]) self.progress_bar[1].set_text(data[0])
return return
def create_dvdauthor_xml(self, movie_folder, file_movies, menu_entries, start_with_menu, play_all_opt): def create_dvdauthor_xml(self, movie_folder, file_movies, menu_entries, start_with_menu, play_all_opt, menuWide):
xmlpath = os.path.join(movie_folder, "xml_data") xmlpath = os.path.join(movie_folder, "xml_data")
xml_file_path = os.path.join(xmlpath, "dvdauthor.xml") xml_file_path = os.path.join(xmlpath, "dvdauthor.xml")
@ -89,7 +88,11 @@ class dvdauthor_converter(devedeng.executor.executor):
xml_file.write("pal") xml_file.write("pal")
else: else:
xml_file.write("ntsc") xml_file.write("ntsc")
xml_file.write('" aspect="4:3"> </video>\n') if menuWide:
xml_file.write('" aspect="16:9"> ')
else:
xml_file.write('" aspect="4:3"> ')
xml_file.write('</video>\n')
xml_file.write("\t\t</menus>\n") xml_file.write("\t\t</menus>\n")
xml_file.write('\t</vmgm>\n') xml_file.write('\t</vmgm>\n')
else: else:
@ -128,7 +131,11 @@ class dvdauthor_converter(devedeng.executor.executor):
xml_file.write("pal") xml_file.write("pal")
else: else:
xml_file.write("ntsc") xml_file.write("ntsc")
xml_file.write('" aspect="4:3"> </video>\n') if menuWide:
xml_file.write('" aspect="16:9"> ')
else:
xml_file.write('" aspect="4:3"> ')
xml_file.write('</video>\n')
xml_file.write('\t\t\t<pgc>\n') xml_file.write('\t\t\t<pgc>\n')
xml_file.write('\t\t\t\t<pre>\n') xml_file.write('\t\t\t\t<pre>\n')
@ -149,12 +156,16 @@ class dvdauthor_converter(devedeng.executor.executor):
# 100% compatibility # 100% compatibility
xml_file.write('\t\t\t\t<vob file="') xml_file.write('\t\t\t\t<vob file="')
if self.config.PAL: if menuWide:
xml_file.write(self.expand_xml( if self.config.PAL:
str(os.path.join(self.config.other_path, "base_pal.mpg")))) xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_pal_wide.mpg"))))
else:
xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_ntsc_wide.mpg"))))
else: else:
xml_file.write(self.expand_xml( if self.config.PAL:
str(os.path.join(self.config.other_path, "base_ntsc.mpg")))) xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_pal.mpg"))))
else:
xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_ntsc.mpg"))))
xml_file.write('"></vob>\n') xml_file.write('"></vob>\n')
xml_file.write('\t\t\t</pgc>\n') xml_file.write('\t\t\t</pgc>\n')
@ -173,7 +184,11 @@ class dvdauthor_converter(devedeng.executor.executor):
xml_file.write("pal") xml_file.write("pal")
else: else:
xml_file.write("ntsc") xml_file.write("ntsc")
xml_file.write('" aspect="4:3"> </video>\n') if menuWide:
xml_file.write('" aspect="16:9"> ')
else:
xml_file.write('" aspect="4:3"> ')
xml_file.write('</video>\n')
first_entry = True first_entry = True
menu_number = 0 menu_number = 0
@ -275,12 +290,16 @@ class dvdauthor_converter(devedeng.executor.executor):
xml_file.write('\t\t\t\t</pre>\n') xml_file.write('\t\t\t\t</pre>\n')
xml_file.write('\t\t\t\t<vob file="') xml_file.write('\t\t\t\t<vob file="')
if self.config.PAL: if menuWide:
xml_file.write(self.expand_xml( if self.config.PAL:
str(os.path.join(self.config.other_path, "base_pal.mpg")))) xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_pal_wide.mpg"))))
else:
xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_ntsc_wide.mpg"))))
else: else:
xml_file.write(self.expand_xml( if self.config.PAL:
str(os.path.join(self.config.other_path, "base_ntsc.mpg")))) xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_pal.mpg"))))
else:
xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_ntsc.mpg"))))
xml_file.write('"></vob>\n') xml_file.write('"></vob>\n')
xml_file.write('\t\t\t\t<post>\n') xml_file.write('\t\t\t\t<post>\n')
@ -298,15 +317,23 @@ class dvdauthor_converter(devedeng.executor.executor):
xml_file.write("pal") xml_file.write("pal")
else: else:
xml_file.write("ntsc") xml_file.write("ntsc")
xml_file.write('" aspect="4:3"> </video>\n') if menuWide:
xml_file.write('" aspect="16:9"> ')
else:
xml_file.write('" aspect="4:3"> ')
xml_file.write('</video>\n')
xml_file.write('\t\t\t<pgc>\n') xml_file.write('\t\t\t<pgc>\n')
xml_file.write('\t\t\t\t<vob file="') xml_file.write('\t\t\t\t<vob file="')
if self.config.PAL: if menuWide:
xml_file.write(self.expand_xml( if self.config.PAL:
str(os.path.join(self.config.other_path, "base_pal.mpg")))) xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_pal_wide.mpg"))))
else:
xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_ntsc_wide.mpg"))))
else: else:
xml_file.write(self.expand_xml( if self.config.PAL:
str(os.path.join(self.config.other_path, "base_ntsc.mpg")))) xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_pal.mpg"))))
else:
xml_file.write(self.expand_xml(str(os.path.join(self.config.other_path, "base_ntsc.mpg"))))
xml_file.write('"></vob>\n') xml_file.write('"></vob>\n')
xml_file.write('\t\t\t\t<post>\n') xml_file.write('\t\t\t\t<post>\n')
xml_file.write('\t\t\t\t\tg0=1;\n') xml_file.write('\t\t\t\t\tg0=1;\n')

View file

@ -489,7 +489,7 @@ class ffmpeg(devedeng.executor.executor):
self.command_var.append(output_file) self.command_var.append(output_file)
def create_menu_mpeg(self, n_page, background_music, sound_length, pal, video_rate, audio_rate, output_path, use_mp2): def create_menu_mpeg(self, n_page, background_music, sound_length, pal, video_rate, audio_rate, output_path, use_mp2, widescreen):
self.n_page = n_page self.n_page = n_page
self.final_length = float(sound_length) self.final_length = float(sound_length)
@ -534,7 +534,10 @@ class ffmpeg(devedeng.executor.executor):
self.command_var.append("-b:a") self.command_var.append("-b:a")
self.command_var.append(str(audio_rate) + "k") self.command_var.append(str(audio_rate) + "k")
self.command_var.append("-aspect") self.command_var.append("-aspect")
self.command_var.append("4:3") if widescreen:
self.command_var.append("16:9")
else:
self.command_var.append("4:3")
self.command_var.append("-t") self.command_var.append("-t")
self.command_var.append(str(1 + sound_length)) self.command_var.append(str(1 + sound_length))

View file

@ -38,8 +38,7 @@ class mux_dvd_menu(devedeng.executor.executor):
self.command_var = [] self.command_var = []
self.command_var.append("spumux") self.command_var.append("spumux")
self.command_var.append(os.path.join( self.command_var.append(os.path.join(output_path, "menu_" + str(n_page) + ".xml"))
output_path, "menu_" + str(n_page) + ".xml"))
self.stdin_file = movie_path self.stdin_file = movie_path
self.stdout_file = final_path self.stdout_file = final_path

View file

@ -491,8 +491,7 @@ class devede_project:
file_movies = self.get_all_files() file_movies = self.get_all_files()
t = len(file_movies) t = len(file_movies)
if (max_files != -1) and (t > max_files): if (max_files != -1) and (t > max_files):
devedeng.message.message_window(_("The limit for this format is %(l)d files, but your project has %(h)d.") % { devedeng.message.message_window(_("The limit for this format is %(l)d files, but your project has %(h)d.") % {"l": max_files, "h": t}, _("Too many files in the project"))
"l": max_files, "h": t}, _("Too many files in the project"))
return return
data = devedeng.create_disk_window.create_disk_window() data = devedeng.create_disk_window.create_disk_window()
@ -532,8 +531,7 @@ class devede_project:
final_dependencies = [] final_dependencies = []
if (self.disc_type == "dvd") and (self.wcreate_menu.get_active()): if (self.disc_type == "dvd") and (self.wcreate_menu.get_active()):
processes, menu_entries = self.menu.create_dvd_menus( processes, menu_entries = self.menu.create_dvd_menus(file_movies, data.path)
file_movies, data.path)
for p in processes: for p in processes:
run_window.add_process(p) run_window.add_process(p)
final_dependencies.append(p) final_dependencies.append(p)
@ -565,8 +563,7 @@ class devede_project:
else: else:
start_with_menu = False start_with_menu = False
dvdauthor = devedeng.dvdauthor_converter.dvdauthor_converter() dvdauthor = devedeng.dvdauthor_converter.dvdauthor_converter()
dvdauthor.create_dvd_project( dvdauthor.create_dvd_project(data.path, data.name, file_movies, menu_entries, start_with_menu, self.menu.play_all_c, self.menu.menu_aspect_ratio == "menu_aspect_16_9")
data.path, data.name, file_movies, menu_entries, start_with_menu, self.menu.play_all_c)
# dvdauthor must wait until all the files have been converted # dvdauthor must wait until all the files have been converted
for element in final_dependencies: for element in final_dependencies:
dvdauthor.add_dependency(element) dvdauthor.add_dependency(element)