JPC-AV / JPC_AV_videoQC

AV processing scripts for the Johnson Publishing Company archive
GNU General Public License v3.0
1 stars 1 forks source link

JPC_AV

AV processing scripts for the Johnson Publishing Company archive

Introduction:

Alt text This repository stores python scripts designed to help process digital audio and video media created from analog sources. The scripts will confirm that the digital files conform to predetermined specifications.


Requirements

Python Version

Installation

Below are the instructions for setting up a compatible Python environment using Conda, although Conda is optional - any Python 3.10+ environment should be compatible.

Setting Up Conda

  1. Install Conda:

  2. Add Conda to Your Path:

    • Installation paths may vary based on your system's architecture (x86 or ARM).
    • For Homebrew installations:
      • ARM architecture: export PATH="/opt/homebrew/anaconda3/bin:$PATH"
      • x86 architecture: export PATH="/usr/local/anaconda3/bin:$PATH"
      • If you are unsure which of these paths to use, you can check by running brew --prefix
  3. Initialize Conda:

    • For Bash: conda init
    • For Zsh: conda init zsh
    • To check your shell, run: echo $SHELL

Create an Isolated Environment

Required Command Line Tools

The following command line tools are necessary and must be installed separately:

Installation of AV Spex Scripts

Initial Setup

  1. Navigate to the Project Root Directory:

    cd path-to/JPC_AV/JPC_AV_videoQC
  2. Install the AV Spex Scripts in Editable Mode:

    python -m pip install -e .

Verify the installation by running:

av-spex --help

Usage

graphic eq image

Execute the scripts with:

av-spex [path/to/directory]

av-spex --help

    // | |       ||   / /       //   ) )                              
   //__| |       ||  / /       ((            ___        ___           
  / ___  | ____  || / /          \\        //   ) )   //___) ) \\ / / 
 //    | |       ||/ /             ) )    //___/ /   //         \/ /  
//     | |       |  /       ((___ / /    //         ((____      / /\  

usage: av-spex [-h] [--version] [-dr] [--profile {step1,step2,off}]
               [-t {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}]
               [--on {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}]
               [--off {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}]
               [-sn {JPC_AV_SVHS,BVH3100}] [-fn {jpc,bowser}]
               [-sp {config,command}] [-d] [-f]
               [paths ...]

av-spex 0.4.5

AV Spex is a python application designed to help process digital audio and video media created from analog sources.
The scripts will confirm that the digital files conform to predetermined specifications.

positional arguments:
  paths                 Path to the input -f: video file(s) or -d:
                        directory(ies)

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -dr, --dryrun         Flag to run av-spex w/out outputs or checks. Use to
                        change config profiles w/out processing video.
  --profile {step1,step2,off}
                        Select processing profile ('step1' or 'step2'), or
                        turn all checks off with 'off'
  -t {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}, --tool {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}
                        Select individual tools to enable - turns all other
                        tools off
  --on {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}
                        Select specific tools to turn on
  --off {exiftool,ffprobe,mediaconch,mediainfo,mediatrace,qctools}
                        Select specific tools to turn off
  -sn {JPC_AV_SVHS,BVH3100}, --signalflow {JPC_AV_SVHS,BVH3100}
                        Select signal flow config type (JPC_AV_SVHS or
                        BVH3100)
  -fn {jpc,bowser}, --filename {jpc,bowser}
                        Select file name config type (jpc or bowser)
  -sp {config,command}, --saveprofile {config,command}
                        Flag to write current config.yaml or
                        command_config.yaml settings to new a yaml file, for
                        re-use or reference. Select config or command:
                        --saveprofile command
  -d, --directory       Flag to indicate input is a directory
  -f, --file            Flag to indicate input is a video file

Options explained in detail below.

Logging

Each time AV Spex is run a log file is created. Everything output to the terminal is also recorded in a log file w/ timestamps located at:

logs/YYYY-MM-DD_HH-MM-SS_JPC_AV_log.log

File Validation

File naming

File Fixity:

Metadata Tools

Various metadata tools are run on the input video file(s), which can be enabled or disabled in the config/command_config.yaml file.

Configuration

The 2 yaml files in the /config/ directory control various settings and options. Both files can be modified manually, but it is preferable to edit the file using the command line options.

command_config.yaml:

The command_config.yaml stores settings pertaining to which output, tools and checks will be run.
Each tool has a 'run' or 'check' option. 'run' outputs a sidecar file. 'check' compares the values in the sidecar file to the values stored in the config.yaml file

config.yaml:

Expected metadata output values are stored in config/config.yaml

Options

Edit the config files using command line options in order to maintain consistent formatting

qct-parse

To check the QCTools report, AV Spex incorporates code from the open source tool qct-parse. qct-parse can be used to check for individual tags, profiles, or specific content.

qct-parse Options

Output



graphic eq image

Contributing

Contributions that enhance script functionality are welcome. Please ensure compatibility with Python 3.10 or higher.

Acknowledgements

AV Spex makes use of code from several open source projects. Attribution and copyright notices are included as comments inline where open source code is used.
The copyright notices are reproduced here:

loglog

Copyright (C) 2021  Eddy Colloton and Morgan Morel

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 3 as published by
    the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

qct-parse

Copyright (C) 2016 Brendan Coates and Morgan Morel

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 3 as published by
    the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

IFIscripts

MIT License

    Copyright (c) 2015-2018 Kieran O'Leary for the Irish Film Institute.

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.