add --subtitle
This commit is contained in:
parent
e1beb8312d
commit
681e76361d
2 changed files with 16 additions and 6 deletions
|
@ -547,8 +547,8 @@ def get_preset(presets, preset):
|
|||
factory_presets = " ".join([
|
||||
"@share:video=x264:23,slow;audio=opus;container=mp4;ffmpeg-vfilter=scale=1280:trunc(ow/a/2)*2",
|
||||
"@share-portrait:video=x264:23,slow;audio=opus;container=mp4;ffmpeg-vfilter=scale=720:trunc(ow/a/2)*2",
|
||||
"@archive-sw-23:video=x265:23,slow;audio=opus;container=mkv",
|
||||
"@archive-sw-25:video=x265:25,slow;audio=opus;container=mkv",
|
||||
"@archive-sw-22:video=x265:22,slow;audio=opus;container=mkv",
|
||||
"@archive-sw-24:video=x265:24,slow;audio=opus;container=mkv",
|
||||
"@archive-sw-27:video=x265:27,slow;audio=opus;container=mkv",
|
||||
"@archive-animation:video=x265:27,slow,animation;audio=opus;container=mkv",
|
||||
"@archive-26:video=h265:26;audio=opus;container=mkv",
|
||||
|
@ -618,6 +618,7 @@ if __name__ == "__main__":
|
|||
files = over.types.ndict()
|
||||
audio_words = []
|
||||
video_words = []
|
||||
subtitle_words = []
|
||||
files.container = "mkv"
|
||||
|
||||
if not main.cfg.audio:
|
||||
|
@ -645,6 +646,14 @@ if __name__ == "__main__":
|
|||
if main.cfg.ffmpeg_vfilter:
|
||||
video_words.append("<g>vfilter<.>=<M>%s<.>" %(main.cfg.ffmpeg_vfilter))
|
||||
|
||||
if not main.cfg.subtitle:
|
||||
main.log.fail("<W>--<G>subtitle<.> is not set")
|
||||
main.exit(1)
|
||||
elif main.cfg.subtitle in ("copy", "drop"):
|
||||
subtitle_words.append("<c>%s<.>" %(main.cfg.subtitle))
|
||||
else:
|
||||
subtitle_words.append("<g>codec<.>=<M>%s<.>" %(main.cfg.subtitle))
|
||||
|
||||
if main.cfg.video == "drop":
|
||||
if main.cfg.audio.startswith("pcm"):
|
||||
files.container = "wav"
|
||||
|
@ -687,8 +696,9 @@ if __name__ == "__main__":
|
|||
else:
|
||||
main.log.info("settings", end=":\n")
|
||||
|
||||
main.log.info("audio: %s", ", ".join(audio_words))
|
||||
main.log.info("video: %s", ", ".join(video_words))
|
||||
main.log.info("audio: %s", ", ".join(audio_words))
|
||||
main.log.info("subtitle: %s", ", ".join(subtitle_words))
|
||||
main.log.info("container: <M>%s<.>", files.container)
|
||||
|
||||
if main.cfg.cut:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
major = 2 # VERSION_MAJOR_IDENTIFIER
|
||||
minor = 1 # VERSION_MINOR_IDENTIFIER
|
||||
# VERSION_LAST_MM 2.1
|
||||
patch = 3 # VERSION_PATCH_IDENTIFIER
|
||||
minor = 2 # VERSION_MINOR_IDENTIFIER
|
||||
# VERSION_LAST_MM 2.2
|
||||
patch = 2 # VERSION_PATCH_IDENTIFIER
|
||||
str = ".".join(str(v) for v in (major, minor, patch))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue