general: added HEVC support
This commit is contained in:
parent
25df1a4ac7
commit
6fb3a369cd
7 changed files with 92 additions and 24 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue