# media9nf

Version 0.2.0, 2026-12-04

media9nf embeds video and audio in PDF files using the same commands as
[media9](https://ctan.org/pkg/media9): `\includemedia`, `\addmediapath` and
`\mediabutton`, but without Flash.

media9 plays video and audio through Flash players (`VPlayer.swf`,
`APlayer.swf`). Adobe ended Flash in December 2020, and current versions of
Acrobat Reader no longer play that content. media9nf embeds the media file
itself as a RichMedia annotation, and the PDF viewer plays it with its own
player.

## Usage

```latex
\usepackage{media9nf}
...
\includemedia[
  width=0.85\textwidth,
  activate=onclick,
  deactivate=pageinvisible
]{\includegraphics{media9nf-poster.png}}{media9nf-sample.mp4}
```

Existing media9 documents should work after changing `\usepackage{media9}` to
`\usepackage{media9nf}`. Calls that name a Flash player (`VPlayer.swf` and
similar) embed the media file the player would have loaded instead.

The manual, `media9nf-doc.pdf`, lists all options and explains the
differences from media9.

## Requirements

A LaTeX format from 2023-11-01 or later, and the `pdfbase` package, which
comes with media9. Works with pdfLaTeX, LuaLaTeX, XeLaTeX, and LaTeX with
dvipdfmx or with dvips and Ghostscript.

## Viewer support

Playback depends on the viewer. RichMedia annotations are supported by Adobe
Acrobat and Acrobat Reader, and by KDE Okular. Okular plays video but not
audio (`.mp3`, `.wav`, `.ogg`, `.aac`) unless you use the `audioasvideo`
option. Browser PDF viewers, macOS
Preview and SumatraPDF show the poster image but do not play the media. Test
your PDF in the viewer your audience will use.

## Files

| File | Purpose |
| --- | --- |
| `media9nf.sty` | the package |
| `CHANGELOG.md` | changes in each version |
| `media9nf-doc.tex`, `media9nf-doc.pdf` | the manual |
| `media9nf-example-article.tex` | article with an embedded video |
| `media9nf-example-beamer.tex` | beamer slide with an embedded video |
| `media9nf-sample.mp4`, `media9nf-poster.png` | test clip and poster used by the manual and examples |
| `build.sh` | builds the manual and the CTAN zip (not part of the CTAN upload) |

## Installation

Put `media9nf.sty` where TeX finds it, for example
`TEXMFHOME/tex/latex/media9nf/`. In TeX Live and MiKTeX, once the package is on
CTAN, install it with the package manager.

## Bugs and source

<https://github.com/gpena/media9nf>

## License

Copyright (C) 2026 Gonçalo Pena

This work may be distributed and/or modified under the conditions of the LaTeX
Project Public License, either version 1.3c of this license or (at your
option) any later version. The latest version of this license is at
<https://www.latex-project.org/lppl.txt>.

This work has the LPPL maintenance status `maintained`. The Current Maintainer
of this work is Gonçalo Pena.

The sample clip and poster were generated with FFmpeg's `testsrc2` and `sine`
test sources and are covered by the same license.
