add '--ugoira-conv-lossless' command-line option (#432)

and cleanup the arguments for the regular '--ugoira-conv':
- remove '-an'
- enable two-pass encoding
This commit is contained in:
Mike Fährmann
2019-10-26 00:32:19 +02:00
parent 49a6b1b6c0
commit 244d396b0b

View File

@@ -321,12 +321,25 @@ def build_parser():
) )
postprocessor.add_argument( postprocessor.add_argument(
"--ugoira-conv", "--ugoira-conv",
dest="postprocessors", dest="postprocessors", action="append_const", const={
action="append_const", const={"name": "ugoira", "ffmpeg-args": ( "name" : "ugoira",
"-c:v", "libvpx", "-crf", "4", "-b:v", "5000k", "-an"), "ffmpeg-args" : ("-c:v", "libvpx", "-crf", "4", "-b:v", "5000k"),
"whitelist": ("pixiv", "danbooru")}, "ffmpeg-twopass": True,
"whitelist" : ("pixiv", "danbooru"),
},
help="Convert Pixiv Ugoira to WebM (requires FFmpeg)", help="Convert Pixiv Ugoira to WebM (requires FFmpeg)",
) )
postprocessor.add_argument(
"--ugoira-conv-lossless",
dest="postprocessors", action="append_const", const={
"name" : "ugoira",
"ffmpeg-args" : ("-c:v", "libvpx-vp9", "-lossless", "1",
"-pix_fmt", "yuv420p"),
"ffmpeg-twopass": False,
"whitelist" : ("pixiv", "danbooru"),
},
help="Convert Pixiv Ugoira to WebM in VP9 lossless mode",
)
postprocessor.add_argument( postprocessor.add_argument(
"--write-metadata", "--write-metadata",
dest="postprocessors", dest="postprocessors",