> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/questions-and-answers/14-how-can-i-embed-a-video-in-my-pdf-using-latex.md).

# How can I embed a video in my PDF using LaTeX?

It used to be possible via the [`media9` package](https://ctan.org/pkg/media9?lang=en) but due to Adobe ceasing support for Flash at the end of 2020, **versions of the** [**`media9` package**](https://ctan.org/pkg/media9?lang=en) **which rely on Flash should no longer be used** to embed video or other multimedia content into LaTeX-generated PDF files, including any projects created on Overleaf. However, it is likely that the `media9` package [will be updated by its author](https://gitlab.com/agrahn/media9) to use non-Flash-based methods for embedding video into LaTeX-generated PDFs.

## Non-Flash-based video embedding: proof of concept

The author of `media9` posted a [proof-of-concept example on tex.stackexchange](https://tex.stackexchange.com/a/516102) demonstrating how to embed video into PDFs using a technique that does not rely on Flash. An Overleaf project which demonstrates that code can be found [here](https://www.overleaf.com/read/rcfqksxktygc)—note that the video won’t play in Overleaf’s preview panel; instead, download the PDF and open it in a suitable viewer such as Adobe Reader.

## Situation as of February 2021

With the very recent end-of-life for Flash, playback of video or sound embedded within PDFs now relies on the host operating system’s built-in software for playing sound or video. The immediate post-Flash technology landscape for playback of video embedded into PDFs is somewhat fluid, particularly for users who rely on Windows 10 due to problems with video playback on some Windows 10 installations. A workaround for Windows 10 was [posted on the Adobe Support Community forum on 10 February 2021](https://community.adobe.com/t5/acrobat-reader/playing-embedded-video-without-flash/td-p/11266205/page/2)—you’ll need to find an entry by Himanshu Sagar posted on that date.

The author of the `media9` package has noted ([here](https://stackoverflow.com/a/64789038) and [here](https://tex.stackexchange.com/a/516102)) that, *for the time being*, best practice might be to provide links to video files, not to embed them. Users who choose to provide PDF links to video content will need to ensure those videos are available to anyone who reads your PDF document.

Further discussion on the post-Flash landscape for video content embedded in PDFs, such as `.mp4` files, can be [found in Adobe’s online forums](https://community.adobe.com/t5/acrobat-reader/playing-embedded-video-without-flash/td-p/11266205). For LaTeX users, further information and discussions can be found on tex.stackexchange:

* [Media9 is becoming obsolete Dec 2020. Any alternatives for embedding video/audio in LaTeX?](https://tex.stackexchange.com/questions/516029/media9-is-becoming-obsolete-dec-2020-any-alternatives-for-embedding-video-audio/)
* [Alternatives for media9 after Dec 2020 in overleaf](https://tex.stackexchange.com/questions/577986/alternatives-for-media9-after-dec-2020-in-overleaf)

## Flash in PDF: brief background and history

Adobe acquired Flash technology in 2005 when it bought a company called Macromedia (see [Wikipedia](https://en.wikipedia.org/wiki/Macromedia) or [here](https://www.adexchanger.com/data-driven-thinking/flash-in-the-pan-historical-lessons-of-adobes-macromedia-acquisition/) for history and general overviews). In June 2008 Adobe published an [extension to the IS0 32000 PDF specification](https://www.adobe.com/content/dam/acom/en/devnet/pdf/adobe_supplement_iso32000.pdf) which introduced PDF’s support for Flash-based content embedded in PDF files, providing a convenient method for PDF files to contain various forms of “rich media”, including video, sound and Flash animations. Those extensions to the PDF specification coincided with the [release of Adobe Reader 9](https://en.wikipedia.org/wiki/Adobe_Acrobat_version_history) which supported viewing and playback of embedded Flash-based “rich media”.

Flash was an extremely popular technology for creating, embedding and sharing rich, interactive content—including within web pages—but, over time, support for Flash decreased and new open web technologies and standards arose which further eroded Flash’s role in the technology mix. Eventually, the writing was placed clearly on the wall when, on July 25 2017, Adobe [announced](https://blog.adobe.com/en/publish/2017/07/25/adobe-flash-update.html) that its support for Flash would cease at the end of 2020. Today, Adobe’s latest PDF products no longer support embedding or playback (display) of Flash-based media formats—`*.flv` and `*.swf` files. See also [Flash Player end-of-life: Impact in Reader and Acrobat](https://helpx.adobe.com/uk/acrobat/kb/flash-format-support-in-pdf.html).

From a technical standpoint there’s nothing to prevent you embedding Flash-based media into PDFs via LaTeX packages or through your own custom macros which inject the appropriate operators into the output PDF file—but your content won’t be supported, thus available to readers, via the current, and future, generations of PDF-viewing applications.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/questions-and-answers/14-how-can-i-embed-a-video-in-my-pdf-using-latex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
