|
|
@ -1,6 +1,6 @@
|
|
|
|
#! /usr/bin/python3
|
|
|
|
#! /usr/bin/python3
|
|
|
|
|
|
|
|
|
|
|
|
import os, click, time, logging
|
|
|
|
import os, click, time, logging, shutil
|
|
|
|
|
|
|
|
|
|
|
|
from ffx.configuration_controller import ConfigurationController
|
|
|
|
from ffx.configuration_controller import ConfigurationController
|
|
|
|
|
|
|
|
|
|
|
@ -325,6 +325,8 @@ def checkUniqueDispositions(context, mediaDescriptor: MediaDescriptor):
|
|
|
|
@click.option('--nice', type=int, default=99, help='Niceness of started processes')
|
|
|
|
@click.option('--nice', type=int, default=99, help='Niceness of started processes')
|
|
|
|
@click.option('--cpu', type=int, default=0, help='Limit CPU for started processes to percent')
|
|
|
|
@click.option('--cpu', type=int, default=0, help='Limit CPU for started processes to percent')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@click.option('--rename-only', is_flag=True, default=False, help='Only renaming, no recoding')
|
|
|
|
|
|
|
|
|
|
|
|
def convert(ctx,
|
|
|
|
def convert(ctx,
|
|
|
|
paths,
|
|
|
|
paths,
|
|
|
|
label,
|
|
|
|
label,
|
|
|
@ -373,7 +375,8 @@ def convert(ctx,
|
|
|
|
keep_mkvmerge_metadata,
|
|
|
|
keep_mkvmerge_metadata,
|
|
|
|
|
|
|
|
|
|
|
|
nice,
|
|
|
|
nice,
|
|
|
|
cpu):
|
|
|
|
cpu,
|
|
|
|
|
|
|
|
rename_only):
|
|
|
|
"""Batch conversion of audiovideo files in format suitable for web playback, e.g. jellyfin
|
|
|
|
"""Batch conversion of audiovideo files in format suitable for web playback, e.g. jellyfin
|
|
|
|
|
|
|
|
|
|
|
|
Files found under PATHS will be converted according to parameters.
|
|
|
|
Files found under PATHS will be converted according to parameters.
|
|
|
@ -728,6 +731,9 @@ def convert(ctx,
|
|
|
|
|
|
|
|
|
|
|
|
ctx.obj['logger'].info(f"Creating file {targetFilename}")
|
|
|
|
ctx.obj['logger'].info(f"Creating file {targetFilename}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if rename_only:
|
|
|
|
|
|
|
|
shutil.copyfile(sourcePath, targetPath)
|
|
|
|
|
|
|
|
else:
|
|
|
|
fc.runJob(sourcePath,
|
|
|
|
fc.runJob(sourcePath,
|
|
|
|
targetPath,
|
|
|
|
targetPath,
|
|
|
|
targetFormat,
|
|
|
|
targetFormat,
|
|
|
|