A script for optimising videos kept in Supabase storage.
npm install supabase-video-optimiserA script for optimising videos kept in Supabase storage.
It compresses .mp4 files and creates and uploads .m3u8 variants of each video.
It was written to compress videos to be used in mobile apps.
Run the script with:
``text`
npx supabase-video-optimiser --url
This will compress video files and re-upload them to Supabase, along with HLS
versions.
You can check the results of the compression by looking in the ./videos folder.
The following command line arguments are available.
| Argument | Description |
|------------|-----------------------------------------------------------|
| --url | A Supabase project URL. |--key
| | A Supabase service role key. |--bucket
| | The Supabase bucket where your videos are kept. |--folder
| | A folder within the bucket where your videos are kept. |--dry
| | Run without actually uploading anything to Supabase. |--max n` | Limit the conversion to the first n unconverted videos. |
|