Building a Video Metadata Checker to Manage Your Media Library
A metadata checker reads each video's technical and descriptive fields, flags problems and keeps your library searchable. Here is how to design one step by step.
10 min readUpdated Nov 15, 2026By XPASS Editorial Team

A media library grows quietly. A few dozen videos become a few thousand, files arrive from different editors and sources, and soon nobody can say which clips are the right size, which have audio, which are missing captions or which ones the company is still allowed to show. A video metadata checker is the simple fix. It reads what each file says about itself, compares that with what your system expects and tells you where the gaps are.
This guide explains how to design such a checker without turning it into a large project. It covers the fields worth reading, the rules worth enforcing, a practical pipeline, and the limits you should plan around. It uses general concepts and common open tools, and you can adapt it to whatever stack your team already runs.
What a metadata checker is for
Metadata is data about the video rather than the pictures and sound themselves. A checker has four jobs.
- Describe. Extract facts from the file so your library can search, filter and sort without opening every video.
- Validate. Compare those facts with rules, such as "the main file must be at least a given resolution" or "every published video needs a title and a language".
- Flag. Surface the files that fail a rule so a person can fix, replace or remove them.
- Record. Keep a history of what was checked and when, so decisions can be explained later.
None of this needs the video to be rendered or played. Most of it can be done by reading headers and container information, which makes it fast enough to run on every upload.

The fields worth reading
Think of metadata in three groups.
| Group | Examples | Why it matters |
|---|---|---|
| Technical | Container format, duration, width and height, frame rate, video codec, audio codec, bitrate, audio channels, file size | Decides whether the file will play where you need it |
| Descriptive | Title, description, language, tags, category, caption or subtitle files, thumbnail | Makes the library searchable and accessible |
| Administrative | Source URL, owner, license or permission reference, upload date, checksum, approval status, review date | Supports rights, audit and takedown |
Do not feel obliged to track everything. Start with the handful of fields that drive real decisions in your business, and add more when a question comes up that you could not answer.
Reading technical metadata
The most common open tool for this job is ffprobe, which comes with the FFmpeg project. A typical call asks it to print container and stream details as JSON, quietly, so another program can read the result:
ffprobe -v error -show_format -show_streams -of json input.mp4
The output lists the container, the duration, and one entry for each stream. For a video stream you will see items such as the codec name, width, height and frame rate. For an audio stream you will see the codec, sample rate and number of channels. Your checker can parse that JSON and map the values into its own record.
A few practical points:
- Run it in a sandbox. Media files are a common vector for malformed input. Process uploads in an isolated worker with time and memory limits.
- Do not trust the extension. A file named
.mp4may be something else. Read the real container information, and treat a mismatch as a flag. - Expect missing values. Some fields can be absent or approximate, especially for streams recorded live or files that were cut without re-encoding. Design rules that handle "unknown" gracefully.
- Capture the tool version. Store which version of the tool produced the result, so differences between runs can be explained.
Writing validation rules
Rules turn raw facts into decisions. Keep them simple, named and easy to change. Good starting rules include:
- Playable. The container opens, at least one video stream exists and the duration is greater than zero.
- Has sound when expected. Training videos must have an audio stream. Silent loops may not.
- Resolution and orientation. The main file meets the minimum your players need, and the orientation matches the intended placement.
- Codec allowed. The video and audio codecs are on the list your player and devices support.
- Duration within range. Short clips should not be hours long, and long recordings should not be a few seconds.
- Descriptive fields present. Title, language and category are filled in and not just placeholder text.
- Captions available. Where accessibility matters, at least one caption or subtitle file is linked.
- Rights recorded. The owner, basis for use and review date are filled in. The routine behind this is explained in checking rights and copyright before using a media download API.
- Checksum stable. The stored hash still matches the file, which shows it has not been silently replaced.
Give each rule a severity. A missing audio stream on a lecture might block publication. A missing tag might only produce a warning. This keeps editors from ignoring the report because everything is red.
It helps to write each rule as a small record rather than as scattered code. For example:
| Rule name | Check | Severity | Action on failure |
|---|---|---|---|
| has_audio | At least one audio stream exists | Error for lectures, warning for loops | Send to review queue |
| min_resolution | Height is at or above the team's chosen minimum | Error | Ask the editor for a better source |
| owner_recorded | Owner field is not empty | Warning for old items, error for new ones | Add to the weekly cleanup list |
| codec_allowed | Codecs are on the supported list | Error | Queue for re-encoding |
The thresholds in a table like this belong to your team; the checker only enforces them. Keeping them in a configuration file means an editor or a producer can propose a change without touching the code, and the rule set version in each stored result tells you which rules produced it.
A practical pipeline
Here is a straightforward flow that suits most teams.
- Ingest. A file arrives by upload, import or a download job. Record where it came from.
- Quarantine. Place it in a holding area that is not yet visible to the public site.
- Probe. A worker runs the metadata tool and stores the raw output.
- Normalise. Convert the raw values to a common schema: durations in seconds, sizes in bytes, codec names in lowercase and so on.
- Validate. Apply the rules. Save the result for each rule, not just a single pass or fail.
- Route. Passing files continue to processing, such as thumbnail creation. Failing files go to a review queue with the reasons attached.
- Publish. Once the file passes and a person has approved the rights fields, it moves to the live library.
- Recheck. A scheduled job re-runs checks on items that depend on outside sources or expiring licenses.
If files are fetched from remote sources, the checker should treat network access like any other external dependency. Use timeouts, retries with backoff and the provider's documented limits. The article on API rate limits for digital media management goes deeper on pacing requests so a large batch does not trigger errors.
Storing the results
A simple relational table or a document store is enough. A useful record might include:
- A stable asset ID and the storage location
- The raw probe output, kept for debugging
- The normalised technical fields
- The descriptive and administrative fields
- A list of rule results with timestamps and severities
- The checker version and the rule set version
Keep the raw output. When you add a new rule next year, you can often evaluate it against stored data without reprocessing every file.
Think carefully about what you store about people. Uploader names, internal user IDs and captions that contain personal information are personal data in many places. Apply the same access controls and retention rules you use elsewhere. If your library includes items taken from public posts, the guide on pulling public posts onto a website covers how to limit what you keep.
A plain example
Imagine a small training team with about two thousand clips collected over several years. People complain that some videos play without sound, some are too small to read on a projector, and nobody can say who made a few of them.
The team builds a checker as a script that runs whenever a clip is uploaded and once a week over the whole library. It calls ffprobe, stores the JSON and fills a table with duration, resolution, codecs and the number of audio channels. Five rules are enabled at first: file opens, has audio, resolution meets the minimum, title and language are present, and owner is recorded.
The first full run produces a report. A few hundred clips have no audio stream, several dozen are below the minimum resolution, and many have no owner. Instead of fixing everything at once, the team marks the owner field as a warning for old items and an error for new ones. Editors fix the audio and resolution problems first, using the report as a to-do list. Within a month, new uploads are clean, the backlog is shrinking, and the weekly job catches the occasional file that was replaced without anyone noticing.
Limits and what to watch for
Metadata can be wrong. Tags inside a file are written by whoever made it. Treat them as claims to check, not as facts, especially for dates, locations and ownership.
A passing check is not a rights decision. Technical validation says nothing about whether you may use the video. Keep rights review as a separate, human step.
Processing untrusted files carries risk. Isolate workers, limit resources and keep tools updated.
Rules need maintenance. Players, devices and policies change. Review the rule set on a schedule.
Large libraries need pacing. Scanning thousands of files, or fetching them from a remote service, can hit quotas. Batch the work and respect documented limits.
Network routing is a separate topic. If your pipeline fetches files through a proxy for lawful operational reasons, MDN's overview of proxy servers and tunneling explains how proxies work. A proxy does not alter what you may fetch, and the source's terms and local law still apply.
Error handling matters. HTTP responses described in RFC 9110 distinguish temporary failures from permanent ones. Retry the first kind with backoff and record the second kind as a flag.
Start with a report, not a block. On an existing library, run the checker in report-only mode first. Blocking uploads before the team has seen what the numbers look like usually creates frustration, while a report gives everyone a shared picture to work from.
Summary
A video metadata checker reads technical, descriptive and administrative fields from each file, validates them against clear rules, flags what needs attention and records what was checked. Start small with a probe tool such as ffprobe, a handful of rules with severities, a quarantine step before publication, and a table that keeps the raw output. Keep rights review human, protect the pipeline from untrusted files, and recheck on a schedule. Over time the checker turns a messy folder of clips into a library you can search and trust.
If a lawful part of your media workflow needs network routing, the Proxy page lists what is available.
Frequently asked questions
What is a video metadata checker?
It is a small program or pipeline step that reads the technical details of a video file, such as duration, resolution, codecs and audio tracks, alongside descriptive and rights fields, then compares them with your rules and reports anything that does not fit.
Which tool can read technical metadata from a video file?
ffprobe, which ships with the FFmpeg project, is widely used. It can print container and stream details in a machine-readable format such as JSON, which is easy to feed into a validator.
Should the checker store the video or only its metadata?
Usually only the metadata, a checksum and a pointer to where the file lives. Keeping fewer copies reduces storage cost and makes rights and takedown handling simpler.
How often should I recheck metadata?
Check on ingest, then on a schedule for items that depend on outside sources. Links can expire, files can be replaced and licenses can end, so a periodic recheck catches drift.
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a proxy for this?
XPASS Proxy sells residential proxy traffic by the gigabyte, with the price shown before you pay.
See proxy plansKeep reading

Proxy Guides
How to Check Rights and Copyright Before Using a Media Download API
A technical ability to download a file is not permission to use it. Here is a practical way to check ownership, licenses and terms before you wire a media download API into your product.
9 min read

Proxy Guides
What Is an API Rate Limit in Digital Media Management?
Rate limits cap how fast you may call an API. Learn the common types, how to read the signals, and how to design media jobs that respect them instead of fighting them.
9 min read

Proxy Guides
Showing Public Posts on Your Website: What to Watch Out For
A public post is not automatically available for reuse. This guide walks through rights, privacy, platform terms and technical hygiene before you display other people's posts.
9 min read