This workspace contains the @kimjansheden/payload-video-processor plugin and a
reference Payload CMS project that demonstrates queued video processing with
BullMQ and FFmpeg.
- Upload + auto-compression: https://kimjansheden.se/videos/payload-video-processor/video-plugin-1.mp4
- Cropping: https://kimjansheden.se/videos/payload-video-processor/video-plugin-2-cropping.mp4
packages/video-plugin– the plugin source. Provides queue-backed video variants, Admin UI controls, and a worker helper.apps/example-payload– CLI-only reference project wired up with the plugin. Useful for validating config + worker + queue + filesystem variants. It is not a full/adminUI project.
Install from npm:
pnpm add @kimjansheden/payload-video-processor
# or: npm i @kimjansheden/payload-video-processor- Plugin docs:
packages/video-plugin/README.md - npm: https://www.npmjs.com/package/@kimjansheden/payload-video-processor
Install dependencies with pnpm:
pnpm installThe two most common workflows are building the packages and exercising the plugin’s test suite. Use the shorthand commands from the repo root:
pnpm build– runsbuildin every package (plugin + example app). Use this when you need freshdist/output for local linking or production deploys.pnpm plugin:test– executes the plugin’s unit tests only. Ideal for quick validation while you iterate on helpers such as ffmpeg arg builders.
When developing locally you can pair these with the watch targets:
pnpm plugin:dev– rebuilds the plugin withtsup --watch. Keep this running while another project links to the plugin sodist/stays up to date.pnpm dev– starts the example Payload server in watch/dev mode.pnpm worker– runs the example worker process against the queue.
Additional utilities:
pnpm plugin:build– one-off plugin build.pnpm plugin:typecheck– strict TypeScript check for the plugin source.pnpm test/pnpm lint/pnpm typecheck– monorepo-wide variants that run in every workspace where the script is defined.
The example project expects MongoDB, Redis, and standard Payload environment
variables (PAYLOAD_SECRET, MONGODB_URI, REDIS_URL, etc.).
For details and runnable commands, see apps/example-payload/README.md.
Publishing is automated to avoid manually editing versions:
- Publish (checks npm latest and bumps interactively when needed):
pnpm plugin:publish- Check-only:
pnpm plugin:publish:check- Dry-run:
node ./scripts/plugin-publish.mjs --dry-run --yes