Media Batch Lab - 30 Local Audio and Video Automation Scripts
Plainwork Studio, version 1.0.0

Thirty Python scripts for converting, inspecting, naming and preparing audio and video deliverables.
They call your local ffmpeg and ffprobe, need no Python packages, and never use the network.

REQUIREMENTS
  Python 3.10 or newer, and ffmpeg with ffprobe (not included). If they are not on your PATH, pass
  --ffmpeg /path/to/ffmpeg --ffprobe /path/to/ffprobe, or set MBL_FFMPEG and MBL_FFPROBE.

QUICK START (copy and paste into a terminal opened in this folder)

  python scripts/audio_info.py fixtures/tone_stereo.wav
  python scripts/audio_loudness_report.py fixtures --target broadcast-r128
  python scripts/audio_clipping_check.py fixtures/clipped_tone.wav fixtures/tone_440_mono.wav
  python scripts/audio_loop_seam_test.py fixtures/loop_clean.wav fixtures/loop_click.wav
  python scripts/video_contact_sheet.py fixtures/color_bars.mp4 --out-dir out
  python scripts/manifest_generate.py fixtures --out out/manifest.csv
  python scripts/manifest_verify.py fixtures --manifest out/manifest.csv

On Windows use "python" and the same paths with forward slashes, or backslashes if you prefer.
Add --dry-run to any script that writes files to see the ffmpeg commands without running them.

Run the tests (needs pytest):
  python -m pip install -r requirements.txt
  python -m pytest tests -q

WHAT IS INSIDE
  scripts/     the 30 scripts and the shared helper mbl_common.py
  config/      loudness targets, video presets, delivery specs and naming rules (JSON, editable)
  fixtures/    ten small generated test files (about 300 KB in total)
  examples/    manifest.example.csv, the manifest of the fixtures
  tests/       the test suite and make_fixtures.py
  docs/MANUAL.md   how every script works, worked examples and the full option reference
  LICENSE.txt  what you may do with this kit

THE 30 SCRIPTS
  Audio:   audio_convert, audio_info, audio_trim_silence, audio_silence_detect, audio_loudness_report,
           audio_normalize, audio_clipping_check, audio_loop_seam_test, audio_fade, audio_concat,
           audio_split_by_silence, audio_waveform_png, audio_mixdown, audio_tag_metadata
  Video:   video_transcode, video_info, video_thumbnails, video_contact_sheet, video_extract_audio,
           video_gif, video_trim, video_spec_check, video_black_freeze_detect, video_concat
  Files:   media_duration_report, batch_rename, manifest_generate, manifest_verify, find_duplicates,
           batch_ffmpeg

Every script prints a result line per file and exits with 0 (all good), 1 (a file failed or a check
found a problem) or 2 (the command was used incorrectly). Run any script with --help.

The scripts are working aids. Always listen to and watch your files before you deliver them; loudness
targets in config/ are conventional values that you should compare with your platform's current rules.
