> 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/zh-tw/wen-yu-da/14-how-can-i-embed-a-video-in-my-pdf-using-latex.md).

# 我該如何在 LaTeX 中將影片嵌入 PDF？

以前可以透過…… [`media9` 套件](https://ctan.org/pkg/media9?lang=en) 但由於 Adobe 於 2020 年底停止支援 Flash， **……的版本** [**`media9` 套件**](https://ctan.org/pkg/media9?lang=en) **依賴 Flash 的版本不應再使用** 可將影片或其他多媒體內容嵌入由 LaTeX 產生的 PDF 檔案中，包括在 Overleaf 上建立的任何專案。然而，很可能該 `media9` 套件 [會由其作者更新](https://gitlab.com/agrahn/media9) 以改用非 Flash 的方法將影片嵌入 LaTeX 產生的 PDF。

## 非 Flash 的影片嵌入：概念驗證

……的作者 `media9` 發佈了一個 [在 tex.stackexchange 上發佈的一個概念驗證範例](https://tex.stackexchange.com/a/516102) 展示如何使用不依賴 Flash 的技術將影片嵌入 PDF。示範該程式碼的 Overleaf 專案可在 [這裡](https://www.overleaf.com/read/rcfqksxktygc)——請注意，影片無法在 Overleaf 的預覽面板中播放；請改為下載 PDF，並在適合的檢視器中開啟，例如 Adobe Reader。

## 截至 2021 年 2 月的情況

隨著 Flash 最近正式終止支援，嵌入 PDF 中的影片或音訊播放如今仰賴主機作業系統內建的音訊或影片播放軟體。Flash 之後、用於播放嵌入 PDF 影片的技術環境目前仍有些變動，尤其是對於依賴 Windows 10 的使用者，因為某些 Windows 10 安裝在影片播放上有問題。Windows 10 的一個變通方法是 [於 2021 年 2 月 10 日發佈在 Adobe Support Community 論壇上](https://community.adobe.com/t5/acrobat-reader/playing-embedded-video-without-flash/td-p/11266205/page/2)——你需要找到 Himanshu Sagar 在那天發佈的條目。

……的作者 `media9` 套件已指出（[這裡](https://stackoverflow.com/a/64789038) 和 [這裡](https://tex.stackexchange.com/a/516102)）指出， *暫時*，最佳做法可能是提供影片檔案的連結，而不是將其嵌入。選擇提供 PDF 中影片內容連結的使用者，需確保這些影片對任何閱讀你 PDF 文件的人都可存取。

關於 Flash 之後 PDF 中嵌入影片內容的進一步討論，例如 `.mp4` 檔案，可在 [Adobe 的線上論壇中找到](https://community.adobe.com/t5/acrobat-reader/playing-embedded-video-without-flash/td-p/11266205)。對 LaTeX 使用者而言，更多資訊與討論可在 tex.stackexchange 上找到：

* [Media9 到 2020 年 12 月已逐漸過時。有哪些可在 LaTeX 中嵌入影片／音訊的替代方案？](https://tex.stackexchange.com/questions/516029/media9-is-becoming-obsolete-dec-2020-any-alternatives-for-embedding-video-audio/)
* [2020 年 12 月後在 Overleaf 中替代 media9 的方案](https://tex.stackexchange.com/questions/577986/alternatives-for-media9-after-dec-2020-in-overleaf)

## PDF 中的 Flash：簡要背景與歷史

Adobe 於 2005 年收購名為 Macromedia 的公司時取得了 Flash 技術（見 [維基百科](https://en.wikipedia.org/wiki/Macromedia) 或 [這裡](https://www.adexchanger.com/data-driven-thinking/flash-in-the-pan-historical-lessons-of-adobes-macromedia-acquisition/) 中的歷史與概覽）。Adobe 於 2008 年 6 月發布了一項 [對 ISO 32000 PDF 規範的擴充](https://www.adobe.com/content/dam/acom/en/devnet/pdf/adobe_supplement_iso32000.pdf) ，使 PDF 支援嵌入 PDF 檔案中的 Flash 型內容，提供一種方便的方法讓 PDF 檔案可包含各種形式的「豐富媒體」，包括影片、音效與 Flash 動畫。這些對 PDF 規範的擴充與 [Adobe Reader 9 的發布](https://en.wikipedia.org/wiki/Adobe_Acrobat_version_history) ，該版本支援檢視與播放嵌入的 Flash 型「豐富媒體」。

Flash 曾是用於建立、嵌入與分享豐富互動內容的極為流行的技術——包括在網頁中——但隨著時間推移，對 Flash 的支援逐漸減少，新的開放網頁技術與標準也出現，進一步削弱了 Flash 在技術組合中的地位。最終，當 Adobe 於 2017 年 7 月 25 日 [宣布](https://blog.adobe.com/en/publish/2017/07/25/adobe-flash-update.html) 其對 Flash 的支援將於 2020 年底停止。如今，Adobe 最新的 PDF 產品已不再支援嵌入或播放（顯示）基於 Flash 的媒體格式——`*.flv` 和 `*.swf` 檔案。另請參見 [Flash Player 終止支援：對 Reader 與 Acrobat 的影響](https://helpx.adobe.com/uk/acrobat/kb/flash-format-support-in-pdf.html).

從技術角度來看，沒有任何東西能阻止你透過 LaTeX 套件或你自己的自訂巨集，將基於 Flash 的媒體嵌入 PDF，這些巨集會將適當的運算子注入輸出的 PDF 檔案中——但你的內容將不受支援，因此不會透過當前及未來世代的 PDF 檢視應用程式提供給讀者。


---

# 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/zh-tw/wen-yu-da/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.
