Skip to content

[GitHub] Embed Video In README

When we make a demo project or implement a great function, we often want to record a video to easily demonstrate the function we have implemented.

And sharing their projects on GitHub (or backup and version control is the purpose) is also of interest to many developers. A few years ago GitHub didn’t support embedding videos in README descriptions, but in a recent (?) update it finally did.

But unfortunately, we can’t’ upload too large video files on GitHub’s README, so the methods recorded in this article are divided into two types:

  1. How to embed a video
  2. How to fake a video link with an image

The second method is actually a method that simply puts a picture and clicks it will transfer the user to a YouTube video.


Method 1: Embed The Video

First we use the browser to open the edit screen of the README. Then we directly drag the demo video to be displayed into the editor.

Then, we’ll see the video start uploading.


After uploading, you will see the number link automatically given by GitHub:

This uploads successfully.


Methods 2: Use Image Links

First, upload the video to your YouTube channel, and you should get a unique video ID for this demo video.

In README.md, add:

[![IMAGE ALT TEXT](http://img.youtube.com/vi/"YOUR_VIDEO_ID"/0.jpg)](https://www.youtube.com/watch?v="YOUR_VIDEO_ID" "YOUR_VIDEO_TITLE")


For example: me demo video is written as:

[![IMAGE ALT TEXT](http://img.youtube.com/vi/GtlcOowVptU/0.jpg)](https://www.youtube.com/watch?v=GtlcOowVptU "Unity Snake Game")


Output:


References


Read More

Tags:

Leave a Reply