Skip to content

Support for embedded MP4s #75

Description

@mstenta

I was trying to embed MP4 files in a blog post PR (farmOS/farmOS-community-blog#16) and had trouble getting it to work. That PR is against the farmOS-community-blog repo, not this one, but this repository is responsible for converting those blogs posts into HTML files, so I think this is the right place for this issue.

I first attempted to embed the MP4 in the same way we embed images, like:

![Demo of Birth quick form](./birth.mp4)

... but that caused a build error:

3:24:23 PM: error Failed to retrieve metadata from image /opt/build/repo/farmOS.org/.cache/gatsby-source-git/blog/posts/2023/birth-quick-form/birth.mp4
3:24:23 PM: 
3:24:23 PM: 
3:24:23 PM:   Error: Input buffer contains unsupported image format

Full log: https://app.netlify.com/sites/farmos-community-blog-preview/deploys/646286a3eb759b0008fb9494

Then I tried with a <video> tag:

<video control>
  <source src="./birth.mp4" type="video/mp4">
</video>

... that went through the build process successfully, but MP4 file itself is not being copied into the build output, so it results in a 404 on the MP4 files and a blank area in the blog post where they would have been embedded.

Do we need to add a Gatsby.js plugin, or configure something differently, to make this possible?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions