Published on May 17, 2024 (7 months ago)

Migrate your video files between video hosting services for free

Dave Kiss
By Dave Kiss6 min readEngineering

Moving stinks. Whether you’re transferring your data between software providers or migrating your belongings between living accommodations, the sentiment across the board remains the same: there’s truly nothing much more dreadful than the process of packing up and moving.

While we can’t help you pack and carry your boxes in real life, we can definitely save you time and headaches when it comes to swapping out video providers with the help of Truckload, our new open-source video migration framework built with Next.js that makes the process of migrating your video content effortless.

Effortless, you say? That’s a bold word to use without evidence. Watch me migrate my videos from Amazon S3 to Mux in under one minute:

Slow dashboards, spotty stream quality, incompatible pricing, or a frustrating developer experience - there’s a whole slew of reasons why you might be considering moving your videos to a new provider.

With that, let’s break down why we built Truckload, how its open-source tech stack allows you to perform reliable video migrations at scale, and how you can use it today to move your videos over to (and/or from) Mux with ease.

LinkLack of tooling shouldn’t decide your tech stack

I’ve had several conversations with engineers and creators over the past year who’ve said they’ve at least considered moving their video or audio content to Mux. However, the prospect of figuring out a migration process that doesn’t blow up into a huge project always acted as a barrier to getting started.

Other folks had to make their own rag-tag scripts to connect with their existing platform’s APIs and dig through documentation just to figure out how to successfully complete the job.

There clearly was a gap that we could fill here by offering tooling that made a migration process from trusted video providers like Cloudflare Stream and Amazon S3 to Mux a no-brainer.

But we didn’t stop there. What if, after all of that, Mux didn’t end up being the best fit for you?

We like to think you won’t find something better than the video APIs, SDKs, components, and developer experience that we provide at Mux… but who are we to decide? You know what’s best for your business, and while we’re confident that you’ll love your experience with Mux, you should feel fully supported in arriving at that conclusion on your own rather than being strongly held into it.

Instead of making your video provider decisions for you, we settled on abstracting common video migration tasks away from any individual provider. We built an interface that loads the relevant configuration for your selected provider and makes the correct corresponding API calls under the hood. This way, you can choose to move your videos from there to here, wherever there and here may be for you.

Adding new providers to Truckload is a breeze. In this PR, we were able to fully implement a new source provider in under 200 lines of code. Destination providers aren’t much different, only accepting a couple of configuration choices that specify your import settings based on your preferences.

Naturally, we started with Mux as being the lone destination for your videos. However, Truckload is OSS, so your contributions are welcomed to help make this app fully support the migration process to the destination of your choice.

LinkComplete visibility into the video migration process

If there’s one thing that irks me as a developer, it’s giving apps elevated permissions that are absolutely not required for what I’m actually using it for. No, you can’t have my location. Uh, thanks, but I don’t want your notifications. And by the way, do you really need to collect and hold on to my sensitive data?

In the case of Truckload, we fought hard to make the default answer to all these common hang-ups a resounding no. Not only is the code base open source, under an MIT license, and fully inspectable by the smarties on your engineering team for a peek at how it all comes together, but we don’t even store any data related to your migration on our end. That’s right: all video data, credentials, and job details are all managed and held locally right within your browser and local server instances with the help of a fully open-source top-to-bottom tech stack.

Any time a sensitive API key or token is used in a background job process, it is passed via an encrypted message using Inngest’s fantastic middleware encryption. Job details are persisted within your browser’s localStorage with the help of Zustand’s state management persist method. Lastly, we use ngrok’s free tier along with PartyKit to facilitate the handling of any migration status updates for individual assets and hand those back off to the front-end application by means of a secure websocket.

LinkRun it locally, deploy your own, or use our hosted solution

We built a hosted version of this app available at https://migrate.mux.dev for convenience only — no hidden tricks, telemetry, or gotchas. If you’d prefer, you can clone the GitHub repo and run the exact same experience locally on your machine or deployed to the infrastructure of your choice.

There are zero costs to use the Truckload framework. You’ll pay only for provider migration fees (if any). For Mux, you can select different options to dial in your import settings that meet your needs. Costs can vary, but start at free and grow with your usage. You might even find a really great deal by leveraging our newly introduced Starter plan.

LinkOpen source, free, and ready to use or peruse today

The full source code for Truckload is available today on GitHub, along with complete instructions on how to run it locally and make your migration a cinch. You’ll only be billed for fees charged by your video providers (usually this means egress, ingress, or optional import settings that you select).

Now, next time someone tries to court your moving assistance by offering pizza and beer, you don’t have to immediately waver and vehemently reject it. Simply spin up Truckload, specify a few migration options, and go grab the Hidden Valley dipping ranch from the fridge while the framework does all the hard work. You deserve it.

Written By

Dave Kiss

Was: solo-developreneur. Now: developer community person. Happy to ride a bike, hike a hike, high-five a hand, and listen to spa music.

Leave your wallet where it is

No credit card required to get started.