最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - NextJs solution for serverless function conversions to HLS using Sanity CDN - Stack Overflow

programmeradmin1浏览0评论

I am building a custom site using Next 14, React Three Fiber, and Sanity as a CMS/CDN. Sanity's headless CMS handles pretty much everything needed for all content media types except for video. It can handle file uploads of video types, but theres no optimization around serving these files. Currently my issue is, I'd like to convert these mp4 files to HLS so I can stream then into the next app in the most optimal way. Using mux and similar paid services is the only solution I can find on the internet, and I'm not trying to pay for another service outside of Sanity and Vercel (if there is a way to have just this functionality for free with mux please let me know).

Building my own node app to handle the conversions and serve them back doesn't seem too hard, but then hosting both that and the Next app on vercel gets a little complicated.

I'm wondering if there is a way to handle the video conversion/streaming from Next's serverless functions, seeing as I am already storing the source files on Sanity's CDN, and could theoretically find a way to store the converted HLS chunks/manifest etc on the CDN as well, or if there is a better approach to this issue in general.

发布评论

评论列表(0)

  1. 暂无评论