Skip to main content

Convert and transfer video files in WebDAV folders

Project description

webdavconvert

Installation

pip install webdavconvert

CLI Usage

First create a settings file with

python -m webdavconvert --save settings.ini

After setting all parameters in settings.ini you can run it with

python -m webdavconvert --load settings.ini

You can also directly run webdavconvert by setting all options through the CLI. Mixing save presets and command line options is not supported at the time, if you use --load all CLI options are ignored.

Available commands

$ python -m webdavconvert -h

Usage:
  webdavconvert [options]
  webdavconvert (--save | --load) FILE [options]
  webdavconvert (-h | --help | --version)

Arguments:
  FILE                      Configuration file.

Options:
  -h --help                 Show this screen.
  --version                 Show version.
  --loglevel LEVEL          Set a specific log level. [default: INFO]

Target options:
  --target-url TURL         Url for the target WebDAV host. [default: https://cloud.example.com]
  --target-user TUSER       User for the target WebDAV host. [default: username]
  --target-password TPW     Password for the target user. [default: password]
  --target-dir TDIR         Directory to store files. [default: /]
  --target-root TROOT       Root of the WebDAV host. [default: /public.php/webdav/]

Source options:
  --source-url SURL         Url for the target WebDAV host. [default: https://cloud.example.com]
  --source-user SUSER       User for the target WebDAV host. [default: username]
  --source-password SPW     Password for the source user. [default: password]
  --source-dir SDIR         Directory to store files in [default: /]
  --source-root SROOT       Root of the WebDAV host. [default: /public.php/webdav/]
  --source-filter SFILTER   Only convert files matching this regex. [default: mp4]
  --source-recursive        Recursivly browse all folders.

Convert options:
  --output-format FORMAT    Video output format. [default: mp4]
  --output-timecode         Overlay the video with the timecode.
  --output-height HEIGHT    Resize the video while keeping proportions to HEIGHT. [default: 480]
  --output-prefix PREFIX    Add this prefix to the output filename. [default: ]
  --output-suffix SUFFIX    Add this suffix to the output filename. [default: ]

System options:
  --ffmpeg-path PATH        Path to the ffmpeg executable. [default: /usr/local/bin/ffmpeg]

Config options:
  --save                    Overwrite the existing configuration file.
  --load                    Load the configuration file and ignore all other parameters.

As Python module

source = CloudFiles(url, user, password, root)
target = CloudFiles(url, user, password, root)
source.dir = ''
target.dir = ''
source.filter = 'mp4'

converter = Converter(source, target)
converter.get_files_to_download(source.filter)
converter.download_files()
converter.convert()
converter.get_files_to_upload(source.filter)
converter.upload_files()
converter.cleanup()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webdavconvert-1.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

webdavconvert-1.0.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file webdavconvert-1.0.0.tar.gz.

File metadata

  • Download URL: webdavconvert-1.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for webdavconvert-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8acdf756db276f91d3ae87e22927619853cff98fa4cb2170bde0384082db7869
MD5 299e700afeb0e3ba9c0816a5a81f9331
BLAKE2b-256 7e2f9f451832f18629ef4922d7b89841453ee95b5a238d994295e8049d9d7f9d

See more details on using hashes here.

File details

Details for the file webdavconvert-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: webdavconvert-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for webdavconvert-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e776505d5482c4d554590126a9c6a1457a175b074b77e770b56ec6813f7f2433
MD5 44e25d9875c96769761dafa7703d8224
BLAKE2b-256 701c99035dd69271b16bbc4681523879cb680b3db300d778d03125f2f57b6e5b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page