Add DVD encode profiles and subtitle hardsub burn-in
Introduce three project-level DVD encode profiles (Compatibility 4500k / High quality VBR / Custom) via new config keys, and burn a chosen embedded subtitle track into the picture: - file_movie carries the hardsub selection (index/kind), persists it, and builds a subtitle-picker combobox in its properties page; set_final_rates maps the profile to the final video/audio bitrate. - ffmpeg burns text subs with the subtitles= filter after scaling and image subs with an overlay filtergraph before scaling; NTSC DVD audio is now AC3 for all profiles. A start_offset (-ss) is threaded through for segmenting. - avconv gets the text-sub path and start_offset for parity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a158119d41
commit
8b041f0725
4 changed files with 310 additions and 13 deletions
|
|
@ -118,6 +118,11 @@ class configuration(GObject.GObject):
|
|||
self.subt_fill_color = (1, 1, 1, 1)
|
||||
self.subt_outline_color = (0, 0, 0, 1)
|
||||
self.subt_outline_thickness = 0.0
|
||||
# DVD encode profile: "compatibility" (CBR 4500k, old-player safe),
|
||||
# "high" (2-pass VBR filling the disc), or "custom" (user bitrates).
|
||||
self.encode_profile = "compatibility"
|
||||
self.custom_video_kbps = 4500
|
||||
self.custom_audio_kbps = 192
|
||||
|
||||
config_folder = self._get_config_folder()
|
||||
config_path = os.path.join(config_folder, "devedeng.cfg")
|
||||
|
|
@ -185,6 +190,23 @@ class configuration(GObject.GObject):
|
|||
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())
|
||||
if linea[:15] == "encode_profile:":
|
||||
profile = linea[15:].strip()
|
||||
if profile in ("compatibility", "high", "custom"):
|
||||
self.encode_profile = profile
|
||||
continue
|
||||
if linea[:18] == "custom_video_kbps:":
|
||||
try:
|
||||
self.custom_video_kbps = int(linea[18:].strip())
|
||||
except ValueError:
|
||||
pass
|
||||
continue
|
||||
if linea[:18] == "custom_audio_kbps:":
|
||||
try:
|
||||
self.custom_audio_kbps = int(linea[18:].strip())
|
||||
except ValueError:
|
||||
pass
|
||||
continue
|
||||
config_data.close()
|
||||
except:
|
||||
pass
|
||||
|
|
@ -249,7 +271,12 @@ class configuration(GObject.GObject):
|
|||
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))
|
||||
str(self.subt_outline_thickness) + "\n")
|
||||
config_data.write("encode_profile:" + str(self.encode_profile) + "\n")
|
||||
config_data.write("custom_video_kbps:" +
|
||||
str(self.custom_video_kbps) + "\n")
|
||||
config_data.write("custom_audio_kbps:" +
|
||||
str(self.custom_audio_kbps))
|
||||
|
||||
config_data.close()
|
||||
# remove old configuration files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue