AV processing scripts for the Johnson Publishing Company archive
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.
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.
Install Conda:
brew install --cask anaconda
Add Conda to Your Path:
export PATH="/opt/homebrew/anaconda3/bin:$PATH"
export PATH="/usr/local/anaconda3/bin:$PATH"
brew --prefix
Initialize Conda:
conda init
conda init zsh
echo $SHELL
conda create -n JPC_AV python=3.10.13
The following command line tools are necessary and must be installed separately:
Navigate to the Project Root Directory:
cd path-to/JPC_AV/JPC_AV_videoQC
Install the AV Spex Scripts in Editable Mode:
python -m pip install -e .
Verify the installation by running:
av-spex --help
Execute the scripts with:
av-spex [path/to/directory]
// | | || / / // ) )
//__| | || / / (( ___ ___
/ ___ | ____ || / / \\ // ) ) //___) ) \\ / /
// | | ||/ / ) ) //___/ / // \/ /
// | | | / ((___ / / // ((____ / /\
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.
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
JPC_AV_00001.mkv
). The script exits if the naming convention is not met.ffmpeg -loglevel error -i {input_video} -map 0 -f streamhash -hash md5 -
VIDEO_STREAM_HASH
or AUDIO_STREAM_HASH
and validate against calculated md5Various metadata tools are run on the input video file(s), which can be enabled or disabled in the config/command_config.yaml
file.
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.
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
Expected metadata output values are stored in config/config.yaml
Multiple acceptable values are written in a list:
Format:
Edit the config files using command line options in order to maintain consistent formatting
--profile
: Selects a predefined processing profile of particular tools outputs and checks
step1
, step2
, off
--tool/-t
: Enables only the specified tool(s) and disables all others.
-t exiftool -t mediainfo -t ffprobe
--on
: Enables the specified tool without affecting others.--off
: Disables the specified tool without affecting others.--signalflow/-sn
: Changes the expected values in the config.yaml file for the mkv tag ENCODER_SETTINGS
according to NMAAHC custom metadata convention
JPC_AV_SVHS
, BVH3100
--filename/-fn
: Changes the expected values in the config.yaml for the input file naming convention
jpc
, bowser
--dryrun/-dr
optionTo 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.
- [YMIN, lt, 100]
Contributions that enhance script functionality are welcome. Please ensure compatibility with Python 3.10 or higher.
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:
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/>.
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/>.
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.