Blog
The team4 min read

How to add a demo video to a GitLab merge request

GitLab plays MP4, MOV and WebM inline in merge requests, up to 100 MiB on GitLab.com. How to upload one, make it a habit with a template, and automate it.

GitLab is generous with video. Upload a recording to a merge request and it plays right there, in the description or in a thread, with a size limit that is ten times what most chat tools accept. Few teams use it, mostly because nobody set up the habit.

This guide covers the mechanics, a template that makes the habit stick, and what automation looks like.

Upload a video to a merge request

  1. Open the merge request and edit the description, or start a new comment.
  2. Drag the video file into the text box, paste it, or use the attach button in the toolbar.
  3. GitLab uploads it and inserts a Markdown link that points to the file.
  4. Save. The link renders as a video player.

Under the hood, GitLab treats image syntax that points to a video file as a player. So ![Demo](/uploads/…/demo.mp4) plays inline, while a plain link only shows the file name.

Formats and limits

According to GitLab's Markdown documentation, the extensions that render as a player are .mp4, .m4v, .mov, .webm and .ogv. MP4 with H.264 video is the safe choice: it plays in every browser.

The maximum attachment size on GitLab.com is 100 MiB, per GitLab's account and limit settings. On a self-managed instance, an administrator sets that limit, so check yours.

100 MiB is a lot. Still, a smaller file loads faster for the reviewer, and the same video often ends up in Slack or a ticket afterwards, where limits are tighter. A 720p version of a one-minute recording fits in a few megabytes without losing readable text. The commands are in How to compress a screen recording under 10 MB.

Make it a habit with a template

The best way to get videos in merge requests is to ask for one every time. GitLab supports description templates: Markdown files in .gitlab/merge_request_templates/ that authors pick when they open a merge request.

GitLab's description templates documentation adds a useful detail: a template named Default.md sets the default description for new merge requests, unless a default is already set in the project settings. So this file applies itself:

<!-- .gitlab/merge_request_templates/Default.md -->

## Demo

<!-- Drop a short video here: the screen that changed, the gesture that proves it, what is left. -->

## What changed

## How to test

## What is left

The "What is left" section matters as much as the video. A reviewer who knows that the empty state is not done yet won't spend ten minutes reporting it.

What a good merge request video shows

Keep it short and specific:

  • Open on the change. Log in, navigate and close banners before recording. The first frame is the screen that matters.
  • One gesture, one proof. Fill the form, press save, show the saved state.
  • Say what is left. In the voice, or in one line under the video.

Use a local or staging environment with demo data, never production. A video attached to a merge request lives in the project for as long as the merge request does. More on that in Demo data, not production.

If the change has several audiences (reviewers, a product manager, a client), one video rarely fits all of them. A reviewer wants the edge cases, a manager wants thirty seconds on what shipped. See One pull request, many audiences.

Automating merge request videos

GitLab makes automation easier than most platforms: its API can upload a file to a project, and merge request notes accept Markdown. The hard part is not the upload. It is producing the video: running the app at the right commit, with demo data, knowing what to click, and narrating it.

That is what Pullscene for GitLab does. Connect a GitLab.com or self-hosted project, and when a merge request is merged (or when you paste its link), it reads the diff, the commits and the linked issue, writes a scene-by-scene script, rehearses each gesture against your app running on your Mac, and records it with a voice. It can comment on the merge request with a link to the video, and post it to Slack, Discord or Linear. The link plays without an account, split into scenes with the script next to it.

If you prefer to run it from your pipeline, the GitLab CI section of our API docs shows a job that requests a video for merge requests labeled demo.

Frequently asked questions

Can you add a video to a GitLab merge request?

Yes. Drag the file into the description or a comment, paste it, or use the attach button. GitLab uploads it and renders an inline player for MP4, M4V, MOV, WebM and OGV files.

What is the maximum attachment size on GitLab.com?

100 MiB, according to GitLab's account and limit settings for GitLab.com. Self-managed instances can set a different limit.

GitLab renders a player when image syntax points to a video file, as in ![Demo](/uploads/…/demo.mp4). A plain Markdown link, or a file with another extension, shows as a link.

How do I add a default merge request template in GitLab?

Create .gitlab/merge_request_templates/Default.md in the repository. It becomes the default description of new merge requests, unless a default template is already set in the project settings.