Giter Club home page Giter Club logo

video-to-markdown's Introduction

Video to Markdown

Test Cloudinary PayPal.me Sponsor

Netlify Status

Add videos to your markdown files easier starting from here!

Why?

How often did you find yourself googling ¨How to embed a video in markdown?¨

While its not possible to embed a video in markdown, the best and easiest way is to extract a frame from the video, add a layer with a play icon and link the video url on the image.

Speaking HTMLese, this is what you would do:

<a href="{video-url}" title="Link Title"><img src="{image-url}" alt="Alternate Text" /></a>

that translates into markdown as:

[![Alternate Text]({image-url})]({video-url} "Link Title")

To speed up the process I developped this tool that will do it for you.

You just need to paste the video url in the field above and you will get the markdown you need.

Features

List of supported video providers:

  • Asciinema
  • CleanShot Cloud
  • Dailymotion
  • Facebook (low-quality)
  • Google Drive
  • Imgur
  • Loom
  • OneDrive
  • PeerTube
  • Streamable
  • TikTok
  • Vimeo
  • Wistia
  • Youtube

Hosting

First of all you need to create a Cloudinary account (I'm using this service to generate and host images) so that you can copy your personal CLOUDINARY_URL from your dashboard. The url is something similar to cloudinary://my_key:my_secret@my_cloud_name.

Now you can easily deploy your own copy on Netlify.

Deploy to Netlify

Development stuff

To run the project locally, here’s what you’ll need:

Requirements

Setup

cd into your local copy of the repository and run pnpm install

cd video-to-markdown
pnpm install
cp .env.sample .env
# update the .env with proper values
  • CLOUDINARY_URL ( required ) - this is the API Environment variable that you can get from your Cloudinary dashboard inside the Account Details section.
  • GA_TRACKING_ID ( optional ) - this is a Google Analytics Tracking ID. Can be used if you need to track page views and events.
  • NETLIFY_ACCESS_TOKEN ( optional ) - this a Netlify Access Token. In combination with the SITE_ID can be used to display the API Usage in the website.
  • SITE_ID ( optional ) - this the Netlify Site ID. In combination with the NETLIFY_ACCESS_TOKEN can be used to display the API Usage in the website.
  • USE_HIGH_QUALITY ( optional ) - this is a boolean flag. If true, the generated images will be stored in Contenful with hi-res quality (default to false)
pnpm dev

# http://localhost:8888

Privacy

Google Analytics is used to record the following:

All images are generated via Cloudinary and stored in it. In this way the generated images are cached so we can avoid to call Netlify functions again thus reducing the quota consumption.

By clicking on convert to markdown or consuming api you accept this terms & condition; no additional data is sent to the server.

video-to-markdown's People

Contributors

dependabot[bot] avatar marcomontalbano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

video-to-markdown's Issues

Mega Embeds

Would be nice to see this working for mega embedding as well:

[![Titanic with a cat](https://i.ytimg.com/vi/kEPfM3jSoBw/maxresdefault.jpg)](https://mega.nz/embed/ANdknJKb#97QHxGirG0TcgiyzE40WqMTEFFjAln0sl7oJlFFhHpw "Titanic with a cat")

Loom video embed

Many clients give feedback via loom.com. Would be great if we can add this as a supported format.

Example Github Page With Video

This looks like a great idea. Can we please see a Github page with an embedded video using this so we can see how it works?

what about peertube support ?

I was trying to import a video from Peertube into markdown, without success.
You can check this open source self hosted youtube alternative here: joinpeertube.org

Provider request: CleanShot Cloud

Hey Marco,

first of all congrats on the awesome tool, use it every day. 🤘

I see that you've already adopted some services that the people asked for.

So, if you happen to have some time, wanted to ask if you could make this Cleanshot Cloud compatible?

Here's an example link:

https://cln.sh/YRePNX

If it helps, I saw that in line 14 of the source code it has a link to the cover image:

 <meta property="og:image" content="https://cleanshot-cloud-fra.accelerator.net/media/3121/eeqN4r4PBAcP1mGyb16AM4rNpn83HjU78DxhZcAr.mp4;frame(1)/resize(1200,630,fit)/draw(image(b64-L2ludGVybmFsL3BsYXkucG5n),position:center).jpeg">

Would be awesome if you could integrate this.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.