diff --git a/Av1an/arg_parse.py b/Av1an/arg_parse.py index 13fb530..53b629a 100755 --- a/Av1an/arg_parse.py +++ b/Av1an/arg_parse.py @@ -81,6 +81,7 @@ class Args: io_group.add_argument('--resume', '-r', help='Resuming previous session', action='store_true') io_group.add_argument('--keep', help='Keep temporally folder after encode', action='store_true') io_group.add_argument('--config', '-c', type=str, default=None, help="Path to config file, create if doesn't exists") + io_group.add_argument('--webm', default=False, action='store_true', help="Output to webm") # Splitting split_group = parser.add_argument_group('Splitting') diff --git a/Projects/Project.py b/Projects/Project.py index 34d560b..28cbf79 100644 --- a/Projects/Project.py +++ b/Projects/Project.py @@ -18,6 +18,7 @@ class Project(object): self.output_file: Path = None self.mkvmerge: bool = None self.config = None + self.webm = None # Splitting self.chunk_method: str = None @@ -105,7 +106,11 @@ class Project(object): :param project: the Project """ - suffix = '.mkv' + if self.webm: + suffix = '.webm' + else: + suffix = '.mkv' + self.output_file = Path(self.output_file).with_suffix(suffix) if self.output_file \ else Path(f'{self.input.stem}_{self.encoder}{suffix}') diff --git a/README.md b/README.md index 08f7c08..4c44028 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,9 @@ With your own parameters: Options provided to cli overwrite config values. All options excepth in/out/vmaf/log/temp/config paths are saved. + --webm Outputs webm file. + Use only if you're sure source video and audio is compatible. +

FFmpeg options

-a --audio_params FFmpeg audio settings (Default: copy audio from source to output)