Skip to main content

demodocus is Python CLI program to quickly check synchronization maps

Project description

demodocus is Python CLI program to quickly check synchronization maps.

Installation

Using pip

  1. Open a console and type:

    $ [sudo] pip install demodocus
  2. That’s it! Just run without arguments (or with -h or --help) to get the manual:

    $ demodocus

Make sure to have ffmpeg installed and available on your PATH environment variable, see below.

From source code

  1. Get the source code:

    • clone this repo with git:

      $ git clone https://github.com/pettarin/demodocus.git
    • or download the latest release and uncompress it somewhere,

    • or download the current master ZIP and uncompress it somewhere.

  2. Open a console and enter the demodocus (cloned) directory:

    $ cd /path/to/demodocus
  3. Install the requirements:

    $ [sudo] pip -r requirements.txt
  4. That’s it! Just run without arguments (or with -h or --help) to get the manual:

    $ python -m demodocus

Make sure to have ffmpeg installed and available on your PATH environment variable, see below.

Dependencies

  • Python, version 2.7.x or 3.4.x (or above)

  • ffmpeg: download it from https://www.ffmpeg.org/ or install it with your packet manager

  • pyaudio : install it via pip:

    $ [sudo] pip install pyaudio

    (if a compilation error appears, check that you have the PortAudio 1.9 headers available: in Debian, they are provided by the portaudio19-dev package)

Usage

usage:
  $ demodocus -h
  $ demodocus -a AUDIO -s SYNCMAP [OPTIONS]

description:
  Run an interactive CLI tool to verify that SYNCMAP has a good alignment against AUDIO.
  The sync map file can be in JSON or SSV/SSVH format (auto-detected).

optional arguments:
  -h, --help            show this help message and exit
  -a AUDIO, --audio AUDIO
                        path to the audio file
  -c, --continuous      keep going (default: False)
  -d DURATION, --duration DURATION
                        play audio for max DURATION seconds (default: 2)
  -i INCREMENT, --increment INCREMENT
                        play audio every INCREMENT fragments (default: 1)
  -s SYNCMAP, --syncmap SYNCMAP
                        path to the sync map file
  -v, --version         print version and exit
  -w WAIT, --wait WAIT  wait WAIT seconds before playing the next fragment
                        (default: 0)

examples:

  $ demodocus -a audio.mp3 -s syncmap.json
    Check audio.mp3 against syncmap.json with default parameters (2 seconds, all fragments)

  $ demodocus -a audio.mp3 -s syncmap.ssv
    As above, but the sync map file has SSV format

  $ demodocus -a audio.mp3 -s syncmap.json -d 1
    Play each fragment for max 1 second

  $ demodocus -a audio.mp3 -s syncmap.json -d 3 -i 5
    Play every 5 fragments, for max 3 seconds each

  $ demodocus -a audio.mp3 -s syncmap.json -d 3 -i 5 -w 0.5
    Pause for 0.5 seconds before playing next fragment

  $ demodocus -a audio.mp3 -s syncmap.json -c -i 5 -d 1.5 -w 0.5
    Play every 5 fragments, 1.5 seconds each, continuously, pausing for 0.5 seconds

License

demodocus is released under the MIT License.

Limitations and Missing Features

  • The input file must be converted to WAVE before running: slow for very large input files

  • Dependency from ffmpeg, called via subprocess to convert the input file to WAVE

  • Dependency from pyaudio, which in turns depends on PortAudio

  • No tests

  • No documentation

Download files

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

Source Distribution

demodocus-1.0.0.1.tar.gz (415.8 kB view details)

Uploaded Source

File details

Details for the file demodocus-1.0.0.1.tar.gz.

File metadata

  • Download URL: demodocus-1.0.0.1.tar.gz
  • Upload date:
  • Size: 415.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for demodocus-1.0.0.1.tar.gz
Algorithm Hash digest
SHA256 2ad35d0e7b75657bd7b753a3524e32f68eba1914b6172647976da52d15e4eaa5
MD5 457d6ac196280d77f4191835eaba4856
BLAKE2b-256 e606d8b15ca1e42be5d45f121d4750f78c276bd4bad74dae93127d9d58be674a

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