Video asset works locally, but not when deployed

hello everyone

I’m using a video to do the background of my page. Everything works perfectly locally but when I deploy it on vercel, the video disappear and I just have a white background.

My push github is well done as the video appear on my repo.

My video in my file public on my nextjs project.

Anyone has an idea?

Thank you

Hi, @stephane-gioanni! Welcome to the Vercel Community :smiley:

Thanks for describing your issue! Could you maybe share a link with us? We can then dig into the console to see if there are any logs to suggest any errors. :smile:

Hello Pauline

Thanks for answering

Here is it

(I deploy only a simple page with the video as background just to see if it works as it didnt work on the project I was working first ( this one https://northlamb.vercel.app/ )

Hey @stephane-gioanni, the issue is related to the case sensitivity of your filename. Your video asset is named nlvid3.MP4, but your video tag uses nlvid3.mp4, which causes the mismatch.

https://northlamb.vercel.app/nlvid3.mp4 - returns 404
https://northlamb.vercel.app/nlvid3.MP4 - returns 200

This might work fine locally because some filesystems are case-insensitive. However, Vercel deployments use a case-sensitive filesystem, which is why the mismatch is causing issue.

1 Like

Thanks for your answer [Vikhyath]

I’ve tried what you say here https://new-2rmxe4hyt-stephanegioannis-projects.vercel.app/

But it didnt worked unfortunately, so it looks like it comes from something else.

Hey, @stephane-gioanni! Thank you :pray:

Both the files now work for me:

But in your code, it looks like you’re referencing the URL incorrectly. You’re trying to call it from /videos/ folder.

Alright I’ve tried to host it again here:

I’ve checked on github to make sure it’s written .mp4 .
Then I make sure the URL is referrencing correctly.

I can see that actually I can’t even visualize my video here:

And even here as you can see it’s not working. (it’s a screenprint of the previous message)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.