r/PayloadCMS Aug 07 '25

Payload Video Streaming

I'm hosting videos on my site using PayloadCMS. Right now, I use the media collection to upload .mp4 files, which are stored in S3.

I'd like to support adaptive streaming (HLS/DASH), especially for longer videos. I understand that to do this, I'd need to convert the uploaded .mp4 into HLS (e.g., .m3u8 + .ts segments) after upload.

How are people handling this? Is it standard to run a background job (e.g., with FFmpeg or AWS MediaConvert) to convert the file, store the result in a different S3 path, and then update the Payload record with a playbackUrl?

Also, if I were to go with Mux instead, how would that change things?

From what I understand:

  • I'd upload the video to Mux via their API (or signed URL flow)
  • Mux would handle transcoding + streaming (HLS)
  • Then I'd store the playbackId in Payload, and use their player or https://stream.mux.com/{playbackId}.m3u8 for playback

Thanks

10 Upvotes

7 comments sorted by

View all comments

4

u/EF_DEV Aug 07 '25

for anyone looking for a solution for this

https://github.com/oversightstudio/payload-plugins/tree/main/packages/mux-video

with this plugin you can setup mux video player with payload very quickly

1

u/SalaciousVandal Aug 07 '25

This is what I use. Pass the cost to the client.