Skip to content

It used to be possible via the media9 package but due to Adobe ceasing support for Flash at the end of 2020, versions of the media9 package 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 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 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—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—you’ll need to find an entry by Himanshu Sagar posted on that date.

The author of the media9 package has noted (here and here) 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. For LaTeX users, further information and discussions can be found on tex.stackexchange:

Flash in PDF: brief background and history

Adobe acquired Flash technology in 2005 when it bought a company called Macromedia (see Wikipedia or here for history and general overviews). In June 2008 Adobe published an extension to the IS0 32000 PDF specification 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 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 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.

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.



Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX