sanity-io / sanity-plugin-mux-input

An input component that integrates Sanity Studio with MUX.com video encoding/hosting service.
https://mux.com
MIT License
45 stars 55 forks source link

Inability to upload large files (from local machine or from google drive) #338

Open cordial opened 7 months ago

cordial commented 7 months ago

Describe the bug

i) I am trying to upload a large mp4 file (15gb), but whenever I do it gets about 2 to 3GB in and then it just gives up with a 'reconnecting' message and then disppears from the upload field (as if nothing has happened). I have tried this from my local instance of next.js / sanity as well as a preview deployment in Vercel, with the same results. My internet connection is around 40mbps down/6 mbps up.

ii) We also have the file in Google Drive, so I have also tried pasting in a google drive URL rather than the local file, into the paste URL field, and this gives this error -

image

Any help much appreciated.

Steps to reproduce the behavior: i) locally -

  1. Upload large file locally or on vercel instance from inside localhost:studio
  2. Upload starts
  3. Upload gives up/says its reconnecting ii) google drive
  4. Upload large file locally or on vercel instance from inside localhost:studio by dragging copied google drive link onto the paste URL field of my 'mux.video' field
  5. After saying its preparing image you get the error message from above.

Expected behavior

Large files should upload either from local machine or from Google Drive (or elsewhere, we're happy to put it somewhere else if that would help).

Screenshots See Above.

Which versions of Sanity are you using? │ │ Update available 3.20.1 → 3.20.2 │ │ Run pnpm update @sanity/cli to update │ │ │ ╰───────────────────────────────────────────╯

@sanity/cli (global) 3.20.1 (latest: 3.20.2) @sanity/image-url 1.0.2 (up to date) @sanity/vision 3.20.2 (up to date) sanity 3.20.2 (up to date)

What operating system are you using? macOs Sonoma

Which versions of Node.js / npm are you running? node - 21.2.0 im using pnpm - 8.10.5

Additional context We can upload small files fine. I looked at the logs in mux, all i can see are 201s, but there is no image and its not uploaded. We have also managed to upload the file to Mux directly using the MUX dashboard, so i think its a plugin issue. I presume if the file im uploading has the same name as one already in mux that won't matter.

cordial commented 6 months ago

I take it this plugin is no longer maintained now?

dylanjha commented 5 months ago

Thanks @cordial -- we are maintaining this plugin. But we did have a slight shift in coverage with some organization changes. Now we're back on it and working on a new release.

Are you able to share an example of a large file that you're trying to upload? We'll need to debug that.

Regarding Google Drive, can you share an example link to Google Drive? There's 2 ways to upload to Mux:

  1. With a URL to a video file
  2. With a video file directly

With option 1 the video file is downloaded from Mux's server, which means it has to be publicly accessible. Typically with Google Drive that presents 2 different issues:

If you could share both examples that would help us debug. Thank you