general: added HEVC support
This commit is contained in:
parent
25df1a4ac7
commit
6fb3a369cd
7 changed files with 92 additions and 24 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.1 -->
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<object class="GtkWindow" id="wselect_disk">
|
||||
|
|
@ -10,6 +10,9 @@
|
|||
<property name="window_position">center</property>
|
||||
<property name="icon">icon_mkv.png</property>
|
||||
<signal name="delete-event" handler="on_wselect_disk_destroy_event" swapped="no"/>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -311,6 +314,53 @@ Creates H.264 files in a MKV container</property>
|
|||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button_hevc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="on_button_hevc_clicked" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox" id="box8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="pixbuf">icon_hevc.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Matroska / HEVC (H.265)</b>
|
||||
Creates HEVC files in a MKV container</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">4</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButtonBox" id="buttonbox1">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -350,13 +400,10 @@ Creates H.264 files in a MKV container</property>
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">7</property>
|
||||
<property name="position">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
|||
BIN
data/pixmaps/icon_hevc.png
Normal file
BIN
data/pixmaps/icon_hevc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
|
|
@ -49,6 +49,7 @@ class avconv(devedeng.avbase.avbase):
|
|||
mpeg2 = False
|
||||
divx = False
|
||||
h264 = False
|
||||
hevc = False
|
||||
for line in stdout.decode("latin-1").split("\n"):
|
||||
parts = line.strip().split(" ")
|
||||
if len(parts) < 2:
|
||||
|
|
@ -79,6 +80,9 @@ class avconv(devedeng.avbase.avbase):
|
|||
if (codec == "h264") or (codec == "H264"):
|
||||
h264 = True
|
||||
continue
|
||||
if (codec == "hevc") or (codec == "HEVC"):
|
||||
hevc = True
|
||||
continue
|
||||
if (codec == "mpeg4"):
|
||||
divx = True
|
||||
continue
|
||||
|
|
@ -94,6 +98,8 @@ class avconv(devedeng.avbase.avbase):
|
|||
devedeng.avconv.avconv.disc_types.append("divx")
|
||||
if (h264 and mp3):
|
||||
devedeng.avconv.avconv.disc_types.append("mkv")
|
||||
if (hevc and mp3):
|
||||
devedeng.ffmpeg.ffmpeg.disc_types.append("hevc")
|
||||
|
||||
return True
|
||||
else:
|
||||
|
|
@ -249,9 +255,9 @@ class avconv(devedeng.avbase.avbase):
|
|||
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"):
|
||||
elif (self.config.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.command_var.append("-vcodec")
|
||||
self.command_var.append("h264")
|
||||
self.command_var.append("h264" if self.config.disc_type == "mkv" else "hevc")
|
||||
self.command_var.append("-acodec")
|
||||
self.command_var.append("libmp3lame")
|
||||
self.command_var.append("-f")
|
||||
|
|
@ -423,11 +429,11 @@ class avconv(devedeng.avbase.avbase):
|
|||
else:
|
||||
keyintv = 15
|
||||
|
||||
if (not file_project.gop12) and (not(self.config.disc_type == "divx")) and (not(self.config.disc_type == "mkv")):
|
||||
if (not file_project.gop12) and (not(self.config.disc_type == "divx")) and (not(self.config.disc_type == "mkv") and (not(self.config.disc_type == "hevc"))):
|
||||
self.command_var.append("-g")
|
||||
self.command_var.append(str(keyintv))
|
||||
|
||||
if (self.config.disc_type == "divx") or (self.config.disc_type == "mkv"):
|
||||
if (self.config.disc_type == "divx") or (self.config.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.command_var.append("-g")
|
||||
self.command_var.append("300")
|
||||
elif file_project.gop12 and (not file_project.no_reencode_audio_video):
|
||||
|
|
@ -444,7 +450,7 @@ class avconv(devedeng.avbase.avbase):
|
|||
self.command_var.append(str(video_length))
|
||||
|
||||
self.command_var.append("-ac")
|
||||
if (file_project.sound5_1) and ((self.config.disc_type == "dvd") or (self.config.disc_type == "divx") or (self.config.disc_type == "mkv")):
|
||||
if (file_project.sound5_1) and ((self.config.disc_type == "dvd") or (self.config.disc_type == "divx") or (self.config.disc_type == "mkv") or (self.config.disc_type == "hevc")):
|
||||
self.command_var.append("6")
|
||||
else:
|
||||
self.command_var.append("2")
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class choose_disc_type(GObject.GObject):
|
|||
svcd = True
|
||||
divx = True
|
||||
mkv = True
|
||||
hevc = True
|
||||
analizers, players, converters, menuers, burners, mkiso = self.cv.get_needed_programs()
|
||||
|
||||
if (analizers is not None) or (converters is not None):
|
||||
|
|
@ -51,6 +52,7 @@ class choose_disc_type(GObject.GObject):
|
|||
svcd = False
|
||||
divx = False
|
||||
mkv = False
|
||||
hevc = False
|
||||
|
||||
if menuers is not None:
|
||||
dvd = False
|
||||
|
|
@ -82,6 +84,8 @@ class choose_disc_type(GObject.GObject):
|
|||
divx = False
|
||||
if self.cv.discs.count("mkv") == 0:
|
||||
mkv = False
|
||||
if self.cv.discs.count("hevc") == 0:
|
||||
hevc = False
|
||||
|
||||
builder.get_object("button_dvd").set_sensitive(dvd)
|
||||
builder.get_object("button_vcd").set_sensitive(vcd)
|
||||
|
|
@ -89,6 +93,7 @@ class choose_disc_type(GObject.GObject):
|
|||
builder.get_object("button_cvd").set_sensitive(cvd)
|
||||
builder.get_object("button_divx").set_sensitive(divx)
|
||||
builder.get_object("button_mkv").set_sensitive(mkv)
|
||||
builder.get_object("button_hevc").set_sensitive(hevc)
|
||||
|
||||
self.wask_window.show_all()
|
||||
|
||||
|
|
@ -133,6 +138,10 @@ class choose_disc_type(GObject.GObject):
|
|||
|
||||
self.set_type("mkv")
|
||||
|
||||
def on_button_hevc_clicked(self, b):
|
||||
|
||||
self.set_type("hevc")
|
||||
|
||||
def on_help_clicked(self, b):
|
||||
|
||||
help_file = devedeng.help.help("select.html")
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class ffmpeg(devedeng.executor.executor):
|
|||
mpeg2 = False
|
||||
divx = False
|
||||
h264 = False
|
||||
hevc = False
|
||||
for line in stdout.decode("latin-1").split("\n"):
|
||||
parts = line.strip().split(" ")
|
||||
if len(parts) < 2:
|
||||
|
|
@ -79,6 +80,9 @@ class ffmpeg(devedeng.executor.executor):
|
|||
if (codec == "h264") or (codec == "H264"):
|
||||
h264 = True
|
||||
continue
|
||||
if (codec == "hevc") or (codec == "HEVC"):
|
||||
hevc = True
|
||||
continue
|
||||
if (codec == "mpeg4"):
|
||||
divx = True
|
||||
continue
|
||||
|
|
@ -94,6 +98,8 @@ class ffmpeg(devedeng.executor.executor):
|
|||
devedeng.ffmpeg.ffmpeg.disc_types.append("divx")
|
||||
if (h264 and mp3):
|
||||
devedeng.ffmpeg.ffmpeg.disc_types.append("mkv")
|
||||
if (hevc and mp3):
|
||||
devedeng.ffmpeg.ffmpeg.disc_types.append("hevc")
|
||||
|
||||
return True
|
||||
else:
|
||||
|
|
@ -244,9 +250,9 @@ class ffmpeg(devedeng.executor.executor):
|
|||
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"):
|
||||
elif (self.config.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.command_var.append("-vcodec")
|
||||
self.command_var.append("h264")
|
||||
self.command_var.append("h264" if self.config.disc_type == "mkv" else "hevc")
|
||||
self.command_var.append("-acodec")
|
||||
self.command_var.append("libmp3lame")
|
||||
self.command_var.append("-f")
|
||||
|
|
@ -418,11 +424,11 @@ class ffmpeg(devedeng.executor.executor):
|
|||
else:
|
||||
keyintv = 15
|
||||
|
||||
if (not file_project.gop12) and (not(self.config.disc_type == "divx")) and (not(self.config.disc_type == "mkv")):
|
||||
if (not file_project.gop12) and (not(self.config.disc_type == "divx")) and (not(self.config.disc_type == "mkv") and (not(self.config.disc_type == "hevc"))):
|
||||
self.command_var.append("-g")
|
||||
self.command_var.append(str(keyintv))
|
||||
|
||||
if (self.config.disc_type == "divx") or (self.config.disc_type == "mkv"):
|
||||
if (self.config.disc_type == "divx") or (self.config.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.command_var.append("-g")
|
||||
self.command_var.append("300")
|
||||
elif file_project.gop12 and (not file_project.no_reencode_audio_video):
|
||||
|
|
@ -439,7 +445,7 @@ class ffmpeg(devedeng.executor.executor):
|
|||
self.command_var.append(str(video_length))
|
||||
|
||||
self.command_var.append("-ac")
|
||||
if (file_project.sound5_1) and ((self.config.disc_type == "dvd") or (self.config.disc_type == "divx") or (self.config.disc_type == "mkv")):
|
||||
if (file_project.sound5_1) and ((self.config.disc_type == "dvd") or (self.config.disc_type == "divx") or (self.config.disc_type == "mkv") or (self.config.disc_type == "hevc")):
|
||||
self.command_var.append("6")
|
||||
else:
|
||||
self.command_var.append("2")
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class file_movie(devedeng.interface_manager.interface_manager):
|
|||
self.add_toggle("copy_sound", False)
|
||||
self.add_toggle("is_mpeg_ps", False)
|
||||
self.add_toggle("no_reencode_audio_video", False)
|
||||
if (self.disc_type == "divx") or (self.disc_type == "mkv"):
|
||||
if (self.disc_type == "divx") or (self.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.add_toggle("gop12", False)
|
||||
else:
|
||||
self.add_toggle("gop12", True)
|
||||
|
|
@ -259,7 +259,7 @@ class file_movie(devedeng.interface_manager.interface_manager):
|
|||
|
||||
def set_final_rates(self):
|
||||
|
||||
if (self.disc_type == "divx") or (self.disc_type == "mkv"):
|
||||
if (self.disc_type == "divx") or (self.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.audio_rate_auto = 192
|
||||
elif (self.disc_type == "vcd") or (self.disc_type == "svcd") or (self.disc_type == "cvd"):
|
||||
self.audio_rate_auto = 224
|
||||
|
|
@ -304,7 +304,7 @@ class file_movie(devedeng.interface_manager.interface_manager):
|
|||
|
||||
# for divx or matroska, if the size and the aspect ratio is automatic,
|
||||
# just don't change them
|
||||
if ((self.disc_type == "divx") or (self.disc_type == "mkv")) and (final_size == "size_auto") and (self.aspect_ratio == "aspect_auto"):
|
||||
if ((self.disc_type == "divx") or (self.disc_type == "mkv") or (self.config.disc_type == "hevc")) and (final_size == "size_auto") and (self.aspect_ratio == "aspect_auto"):
|
||||
self.width_midle = self.original_width
|
||||
self.width_final = self.original_width
|
||||
self.height_midle = self.original_height
|
||||
|
|
@ -472,7 +472,7 @@ class file_movie(devedeng.interface_manager.interface_manager):
|
|||
self.wframe_division_chapters = self.builder.get_object(
|
||||
"frame_division_chapters")
|
||||
|
||||
if (self.disc_type == "dvd") or (self.disc_type == "divx") or (self.disc_type == "mkv"):
|
||||
if (self.disc_type == "dvd") or (self.disc_type == "divx") or (self.disc_type == "mkv") or (self.config.disc_type == "hevc"):
|
||||
self.waudio_rate.set_upper(448.0)
|
||||
else:
|
||||
self.waudio_rate.set_upper(384.0)
|
||||
|
|
@ -555,7 +555,7 @@ class file_movie(devedeng.interface_manager.interface_manager):
|
|||
self.wcopy_sound.hide()
|
||||
self.wnotebook.remove_page(5)
|
||||
self.wnotebook.remove_page(1)
|
||||
elif (self.disc_type == 'mkv'):
|
||||
elif (self.disc_type == 'mkv') or (self.config.disc_type == "hevc"):
|
||||
self.wshow_in_menu.hide()
|
||||
self.wframe_division_chapters.hide()
|
||||
self.wnotebook.remove_page(5)
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class devede_project:
|
|||
self.set_interface_status(None)
|
||||
|
||||
# Set the default disc size
|
||||
if (self.disc_type == "dvd") or (self.disc_type == "mkv"):
|
||||
if (self.disc_type == "dvd") or (self.disc_type == "mkv") or (self.disc_type == "hevc"):
|
||||
self.wdisc_size.set_active(1) # 4.7 GB DVD
|
||||
else:
|
||||
self.wdisc_size.set_active(3) # 700 MB CD
|
||||
|
|
@ -368,7 +368,7 @@ class devede_project:
|
|||
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"):
|
||||
elif (self.disc_type == "mkv") or (self.disc_type == "hevc"):
|
||||
max_bps_base = devede_project.mkv_max_bps_base.copy()
|
||||
min_bps = devede_project.mkv_min_bps
|
||||
max_total = devede_project.mkv_max_total
|
||||
|
|
@ -468,7 +468,7 @@ class devede_project:
|
|||
elif (self.disc_type == "dvd"):
|
||||
minvrate = 400
|
||||
maxvrate = 8500
|
||||
elif (self.disc_type == "divx") or (self.disc_type == "mkv"):
|
||||
elif (self.disc_type == "divx") or (self.disc_type == "mkv") or (self.disc_type == "hevc"):
|
||||
minvrate = 300
|
||||
maxvrate = 6000
|
||||
else:
|
||||
|
|
@ -551,7 +551,7 @@ class devede_project:
|
|||
counter = 0
|
||||
if self.disc_type == "divx":
|
||||
extension = "avi"
|
||||
elif self.disc_type == "mkv":
|
||||
elif (self.disc_type == "mkv") or (self.disc_type == "hevc"):
|
||||
extension = "mkv"
|
||||
else:
|
||||
extension = "mpg"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue