Import a list of videos to Mux with ease 📹🔥
Import a list of videos to Mux with ease.
Copy .env.example
to .env
and fill the environment variables based on the Mux access token you got from Mux dashboard.
data/videos.json
;yarn run-migration
or npm run run-migration
;All of the videos from videos.json
will be uploaded directly to Mux without saving them to the disk.
This process is kinda slow but, if you have a good internet connection and hardware, you can increment the concurrency inside src/lib/queue.ts
to migrate more videos in parallel.
If you're not using signed URLs, you'll need the playback ID to play the videos.
src/GetPlaybackIds.ts
;yarn get-playback-ids
or npm run get-playback-ids
;The script will fill the data/export.csv
file with the data including the original video ID from data/videos.json
, the playback ID e the duration.