Skip to content
← All posts

Migrating a Million Videos Without Downtime

I migrated close to a million videos from one hosting provider to another at TV2 Regionerne, and built a transcoding platform to re-encode archive video for cost savings. All without a single broken embed.

· 5 min read · Sylvester Damgaard
Migrating a Million Videos Without Downtime

TV2 Regionerne has close to a million video files across eight regional news sites. Interview clips, news packages, live broadcasts, archival footage going back years. When the decision was made to switch video hosting providers, the migration landed on my desk.

The requirements were simple to state and hard to deliver: move everything to the new provider, don't break any existing embeds on the sites, and don't take anything offline during the migration.

The migration

Close to a million videos. Each video has metadata (title, description, publish date, tags, associated articles), multiple renditions (different qualities and formats), thumbnail images, and embed codes scattered across thousands of articles on eight sites.

I built a migration pipeline in Laravel that:

  1. Inventoried every video on the old provider via their API

  2. Transferred the original source files to the new provider in batches

  3. Mapped old video IDs to new video IDs

  4. Updated every embed reference across all eight Statamic sites

  5. Verified that every video played correctly on the new provider

  6. Kept the old provider running as a fallback until verification was complete

The pipeline ran for weeks, processing videos in batches during off-peak hours. Journalists kept publishing new content throughout. New videos went directly to the new provider while old videos were migrated in the background.

The transcoding platform

The bigger cost savings came from the archive. Videos older than one year get occasional traffic but were stored at full broadcast quality on the new provider. Storing and serving high-bitrate originals of archive content is expensive.

I built a transcoding platform that re-encoded archive videos into more efficient formats. The platform:

  • Identified videos older than one year with low view counts

  • Transcoded them to lower-bitrate, more efficient codecs

  • Replaced the originals on the new provider

  • Tracked which videos had been transcoded and their storage savings

The cost reduction was significant. Archive video storage dropped substantially, and the difference in viewing quality for content that gets a handful of views per month was negligible.

What I learned

Video migration is a data integrity problem more than a technical one. The hard part isn't moving files. The hard part is ensuring that every embed, every reference, every thumbnail still works after the switch. One broken video on a prominent article is worse than the migration never happening.

The transcoding project reinforced something I already knew: the most impactful infrastructure work is often about cost optimization, not performance. Serving video faster is nice. Cutting the hosting bill by optimizing what gets stored is better.