Pull media metadata from Wikimedia Commons or Openverse in a single run and you will see strings like Public Domain Mark 1.0, PD-USGov-NASA, CC BY-SA 4.0, CC BY 3.0 DE, GFDL, CC BY-NC-SA, Fair Use, and Copyrighted - Editorial Only side by side. A blocklist parser that only rejects "NC" or "Fair Use" lets unfamiliar strings slip straight through. In a longform video pipeline spanning dozens of archival images, one missed restriction creates copyright claims weeks after upload.
Filtering Source Metadata With an Anchored Whitelist
A fail-closed metadata gate checks each source-supplied license label against an explicit whitelist before an asset can proceed. Below is the exact TypeScript normalization and regex set we use in production:
const COMMERCIAL_SAFE_WHITELIST: readonly RegExp[] = [ /^cc0(?:\s+1\.0)?$/, /^(?:public domain(?:\s+mark(?:\s+1\.0)?)?|cc pd mark|pdm(?:\s+1\.0)?|us government(?:\s+work)?)$/, /^pd\s+(?:us(?:\s+(?:expired|no\s+notice|not\s+renewed|1923|1996))?|usgov(?:\s+[a-z0-9]+)*|old(?:\s+(?:auto(?:\s+expired)?|\d+))?|self|art|1923|1996)$/, /^(?:cc\s+)?by(?:\s+\d+\.\d+)?(?:\s+(?:unported|international|generic|igo|scotland|[a-z]{2}))?$/, /^(?:cc\s+)?by\s+sa(?:\s+\d+\.\d+)?(?:\s+(?:unported|international|generic|igo|scotland|[a-z]{2}))?$/, /^(?:pexels(?:\s+license)?|pixabay(?:\s+license)?|unsplash(?:\s+license)?|sagacut original|2d motion|royalty free commercial)$/, ]; function normalizeLicenseString(license: string): string { return license .trim() .toLowerCase() .replace(/[-_\s]+/g, ' '); } export function isCommercialSafeLicense(license: string): boolean { const normalized = normalizeLicenseString(license); if (!normalized) return false; if (/\b(?:nc|nd)\b/.test(normalized)) return false; return COMMERCIAL_SAFE_WHITELIST.some((pattern) => pattern.test(normalized)); } Two design details matter in practice:
- Product-level NC/ND exclusion runs first: Checking
/\b(?:nc|nd)\b/upfront enforces a strict commercial-safe product rule that excludes Non-Commercial (CC BY-NC) and No-Derivatives (CC BY-ND) assets before regex matching even starts. - Rejection happens at two distinct layers:
isCommercialSafeLicenseitself returns a boolean. During candidate search, any asset returningfalse(includingGFDL,Fair Use, or blank metadata) is skipped automatically. Later, whenbuildAttributionSheetassembles the final credit block, a second check throwsAttributionLicenseErrorif an unapproved string ever reaches assembly. Because this gate operates on repository metadata labels (and public-domain tags express a copyright-status determination by the source), passing the regex confirms label format compliance rather than substituting for rights verification on sensitive footage.

Preset style preview: History Archive documentary layout pairing archival plates with structured attribution.
Flagging ShareAlike (CC BY-SA) Obligations Clearly
Excluding NC and ND still leaves assets under CC BY-SA. When a video incorporates adapted CC BY-SA material, the license requires proper attribution, license identification, an indication of modifications, and sharing the adapted material under the same or a compatible license version. A single text line in a description does not by itself satisfy those obligations, so the goal of the exporter is to surface every CC BY-SA scene clearly for creator review.
During sheet assembly, each entry passes through requiresShareAlikeNotice(entry.license):
export function requiresShareAlikeNotice(license: string): boolean { const normalized = normalizeLicenseString(license); return ( /\b(?:cc )?by sa\b/.test(normalized) || /\bsharealike\b/.test(normalized) ); } Whenever a scene resolves a CC BY-SA plate, the exporter tags that line with [ShareAlike notice applies] and appends a reminder at the bottom of the block so creators know exactly which scenes carry ShareAlike terms.
Separating Pre-Render Planning From Post-Render Credit Drafts
Showing guessed photographer names or fake citations before the asset resolver actually fetches files from Wikimedia Commons or Openverse erodes creator trust. Keeping planning separate from post-render attribution avoids fabricated credits:
- Before render: The studio UI displays only a short note explaining that source credits are assembled once rendering resolves actual media.
- After render: When rendering resolves third-party sources, the formatter generates a structured credit draft that excludes original 2D motion callouts and summarizes any post-render AI editorial illustrations in one line:
=== Media & Archival Source Credits === Visual sources used in this video (commercial-safe licenses verified; CC BY-NC/ND excluded): - [0:36-0:55] Scene 5: "Burnham park statue of Burnham 2013" by Cookie Nguyen (CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0), Wikimedia Commons) — https://commons.wikimedia.org/wiki/File:Burnham_park_statue_of_Burnham_2013.jpg [ShareAlike notice applies] - [1:29-1:42] Scene 9: "Rochester High Street - Nov 2010 - The Pixie and Bollard outside the Cathedral" by Gareth1953 All Right Now (CC BY 2.0 (https://creativecommons.org/licenses/by/2.0/), Openverse) — https://www.flickr.com/photos/40837632@N05/5159955272 1 scene contains original AI-generated editorial illustrations (SagaCut AI Editorial, Royalty-Free Commercial), not archival photographs. YouTube Disclosure Reminder: If your video includes realistic-looking synthetic visuals, review YouTube Studio's "Altered or synthetic content" setting when publishing. ShareAlike Notice: Assets marked CC BY-SA require derivative segments incorporating them to retain compatible attribution and ShareAlike license terms. Note: Creators are responsible for keeping required source credits in their YouTube description per each asset license. What Creators Still Verify Before Uploading
Automated license filtering and credit formatting give solo documentary creators a structured starting draft instead of an empty spreadsheet, though three checks still belong to the creator before hitting publish:
- Check credit completeness and length: Repository records occasionally omit an author name or license URL, and YouTube video descriptions cap at 5,000 characters total (shared between credits, chapters, and links).
- Fulfill ShareAlike and modification notes: Confirm exact license versions and note edits where required by
CC BYorCC BY-SA. - Set YouTube Studio disclosure directly: When generated or altered visuals meet YouTube's disclosure criteria for realistic or materially altered content, select Yes under YouTube Studio's altered or synthetic content setting during upload. Whether stylized editorial illustrations require disclosure depends on the specific visual, and a text reminder in the description never replaces the Studio setting.
This metadata whitelist and post-render attribution formatter run in production inside SagaCut, a 16:9 longform video workspace built for original script-driven documentaries and explainers.