# Uploading video locally

**URL:** <https://forum.ghost.org/t/uploading-video-locally/8275>\
**Category:** Developer help\
**Created:** [July 15, 2019, 7:00pm UTC](https://forum.ghost.org/t/uploading-video-locally/8275 "2019-07-15T19:00:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![biko-the-bird](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/biko-the-bird/32/4086_2.png) [@biko-the-bird](https://forum.ghost.org/u/biko-the-bird)\
**Post date:** [July 15, 2019, 7:00pm UTC](https://forum.ghost.org/t/uploading-video-locally/8275/1 "2019-07-15T19:00:05Z")

</div>

I am using the latest version of ghost with casper. I am trying to figure out a way to upload a video to ghost so that I can have it in my post. The nature of the content means I can not link this video from a third party hosting service like youtube or vimeo.

Is there a way to add a video to a ghost post from a file instead of a link? i.e. upload myvideo.mp4 and have it be embeded in the post like a youtube video would be?

---

<div class="post-metadata">

**Author:** ![Gabrielgb](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/gabrielgb/32/110_2.png) [@Gabrielgb](https://forum.ghost.org/u/Gabrielgb)\
**Post date:** [July 16, 2019, 3:32am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/2 "2019-07-16T03:32:22Z")

</div>

Hi Biko,  
The answer to your question is here:

> [@Hosted audio and video, embedded in posts](https://forum.ghost.org/t/hosted-audio-and-video-embedded-in-posts/849/3):
>
> Unfortunately hosting audio and video is expensive, difficult, and full of problems. The effort is not worth the reward to build this into Ghost or support it. Using external services who specialise in audio/video hosting is far and away the best solution.

The original thread is here:

> [@Hosted audio and video, embedded in posts](https://forum.ghost.org/t/hosted-audio-and-video-embedded-in-posts/849):
>
> The ability to add audio and video clips to posts would be a welcome addition. Video can already be added by [embedding a YouTube or Vimeo video](https://help.ghost.org/article/14-embed-videos), but this comes with some restrictions such as being bound by the external provider’s terms of service. It also creates a dependency on centralised social media platforms. There is [a lengthy discussion](https://talk.commonmark.org/t/embedded-audio-and-video/441) about adding audio and video support to CommonMark using the existing image syntax with the usual audio and video file extensions, e.g. ![](my-audio-fil…

Cheers

---

<div class="post-metadata">

**Author:** ![KranzKrone](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kranzkrone/32/1989_2.png) [@KranzKrone](https://forum.ghost.org/u/KranzKrone)\
**Post date:** [July 16, 2019, 9:31am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/3 "2019-07-16T09:31:44Z")

</div>

Host it on Vimeo and make it private!?

---

<div class="post-metadata">

**Author:** ![luciandavidescu](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/luciandavidescu/32/2270_2.png) [@luciandavidescu](https://forum.ghost.org/u/luciandavidescu)\
**Post date:** [November 7, 2019, 9:33am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/4 "2019-11-07T09:33:55Z")

</div>

You could upload it somewhere via FTP and then use the `<video>` tag inside a html card.

> **[: The Video Embed element - HTML: HyperText Markup Language | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)**
>
> The HTML element embeds a media player which supports video playback into the document. You can use for audio content as well, but the element may provide a more appropriate user experience.

---

<div class="post-metadata">

**Author:** ![denvergeeks](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/denvergeeks/32/7401_2.png) [@denvergeeks](https://forum.ghost.org/u/denvergeeks)\
**Post date:** [March 1, 2020, 12:05am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/5 "2020-03-01T00:05:52Z")

</div>

Create an HTML card with the following code:

```
<video controls width="250">

<source src="/media/examples/flower.webm"
        type="video/webm">

<source src="/media/examples/flower.mp4"
        type="video/mp4">

Sorry, your browser doesn't support embedded videos.
</video>

```

Obviously replace **src=“/media/examples/flower.webm”** with the link to your Video

The tutorial below uses the (built-in to browsers) HTML Audio Embed element in a Ghost HTML card, playing an audio file (i.e .mp3) uploaded to a free [Cloudinary](https://cloudinary.com) account.

The process on Cloudinary should be the same, uploading a video file to a free [Cloudinary](https://cloudinary.com) account, just use the HTML Video Embed element code as above in your HTML card in the Ghost editor.

> **[Adding Audio Files to a Ghost-Hosted Blog.](https://www.chillfiltr.com/adding-audio-files-to-a-ghost-hosted-blog)**
>
> Stream audio files from your Ghost blog in a painless way using Cloudinary.

---

<div class="post-metadata">

**Author:** ![11112](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/11112/32/3897_2.png) [@11112](https://forum.ghost.org/u/11112)\
**Post date:** [March 16, 2020, 2:40pm UTC](https://forum.ghost.org/t/uploading-video-locally/8275/6 "2020-03-16T14:40:11Z")

</div>

Try [https://viqeo.tv/#en](https://viqeo.tv/#en) . It allows to embed video without YouTube or Vimeo and doesn’t require much traffic for user.

Usage example here [TaskbarDock helps you fine-tune Control Panel](https://en.blog.themarfa.name/taskbardock-helps-you-fine-tune-control-panel/)

---

<div class="post-metadata">

**Author:** ![EmpiricalEE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/empiricalee/32/15201_2.png) [@EmpiricalEE](https://forum.ghost.org/u/EmpiricalEE)\
**Post date:** [October 13, 2021, 4:17am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/10 "2021-10-13T04:17:29Z")

</div>

@denvergeeks’ solution was the one that got me going. In my case, the video is comparable in file size to an image, so I was comfortable serving it straight from my Ghost host.

To do so I copied the video file to my server in the location I established in [this post](https://forum.ghost.org/t/changing-content-or-style-in-portal-ui/25929). This is the most cumbersome part of the process - the rest can be done in the Ghost editor as `denvergeeks` describes. My HTML card looked like this:

```auto
<figure class="kg-width-wide">
<video controls width="100%">
    <source type="video/mp4" src="/content/images/other/COVIDBlooms_multiple.mp4">
  Your browser does not support the video tag. Click <a href="/content/images/other/COVIDBlooms_multiple.mp4">here</a> to download the video instead.
</video>
</figure>

```

To get the video to appear wider than the text, and still get centred, I co-opted the `kg-width-wide` class which is used by the Image card, as described [here](https://ghost.org/docs/themes/content/#image-size-options), and set the `width` to `100%` so it fills the enclosing `div`. I also added a clickable link for browsers that can’t render the `video` element.

You can see the result [here](https://www.empirical.ee/bringing-data-to-life/).

---

<div class="post-metadata">

**Author:** ![EmpiricalEE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/empiricalee/32/15201_2.png) [@EmpiricalEE](https://forum.ghost.org/u/EmpiricalEE)\
**Post date:** [March 4, 2023, 10:14pm UTC](https://forum.ghost.org/t/uploading-video-locally/8275/11 "2023-03-04T22:14:02Z")

</div>

For anyone still following this advice (like me!), Ghost’s built-in video element now supports uploading from file. Looks like the file gets put in `/content/media` and custom controls are drawn over the bottom of it. The Ghost editor provides a few options for size, behaviour and appearance, and the result has the same sort of `figure/video` structure as my custom HTML above.

I do have to rename my videos from `.mov` to `.mp4` (which otherwise makes no difference) to allow them to be uploaded.

So it looks like this manual method serves little purpose now! This built-in functionality is much nicer.

---

<div class="post-metadata">

**Author:** ![Cort\_P](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cort_p/32/23678_2.png) [@Cort\_P](https://forum.ghost.org/u/Cort_P)\
**Post date:** [March 23, 2023, 4:38am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/12 "2023-03-23T04:38:37Z")

</div>

Hi @EmpiricalEE  
New to ghost - I have been unable to successfully upload any video from file.  
using .mp4 - tried multiple codecs on multiple videos on both mac & pc  
video will seemingly upload but then only shows a gray screen and does not show up on the front of the site at all  
Any advice/ links would be much appreciated. (:

---

<div class="post-metadata">

**Author:** ![EmpiricalEE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/empiricalee/32/15201_2.png) [@EmpiricalEE](https://forum.ghost.org/u/EmpiricalEE)\
**Post date:** [March 24, 2023, 12:49am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/13 "2023-03-24T00:49:09Z")

</div>

Hmm, that’s frustrating. I’m new to the feature too and didn’t have the same trouble, but video is one of those things that either works or is a minefield to get right!

Maybe try different browsers too if you haven’t already?

Here’s one of the videos that worked for me: you might try downloading it and giving it a go, to rule out an issue with the source video:

[https://www.empirical.ee/content/media/2023/03/plyprint2x.mp4](https://www.empirical.ee/content/media/2023/03/plyprint2x.mp4)

---

<div class="post-metadata">

**Author:** ![jamesdaly](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jamesdaly/32/24115_2.png) [@jamesdaly](https://forum.ghost.org/u/jamesdaly)\
**Post date:** [April 21, 2023, 3:35am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/14 "2023-04-21T03:35:06Z")

</div>

Thank you for adding this update, I’ve been going crazy wondering what I’m doing wrong with video, good to know it can actually work! 😄

Your example video worked for me, but nothing I do seems to work 😢 Trying as many different types of mp4 I can, including renaming a .mov straight from my iPhone as you mentioned.

Can you give any more info on your video that worked, maybe the software used to edit or export it?

---

<div class="post-metadata">

**Author:** ![jamesdaly](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jamesdaly/32/24115_2.png) [@jamesdaly](https://forum.ghost.org/u/jamesdaly)\
**Post date:** [April 21, 2023, 5:29am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/15 "2023-04-21T05:29:28Z")

</div>

Update, I think I might have it, seems to be file size related. If I upload a 10mb video it just fails with no other video. But a 3mb video works fine

---

<div class="post-metadata">

**Author:** ![IrisThemes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/iristhemes/32/17376_2.png) [@IrisThemes](https://forum.ghost.org/u/IrisThemes)\
**Post date:** [July 1, 2024, 8:40am UTC](https://forum.ghost.org/t/uploading-video-locally/8275/16 "2024-07-01T08:40:01Z")

</div>

You should check your client\_max\_body\_size. You should also check your codec and whether the video works when you convert it to mp4 (some online tools can mess up your video).

I wrote one blog post that can help you with [uploading videos to Ghost](https://iristhemes.com/blog/uploading-videos-to-ghost-a-developers-guide/)

I hope it will be helpful, and I will add more things when we encounter something new.
