<p>Adobe Flash is designed to work with animating vector graphics and allowing playback of vector animations, but it requires that a user have Flash Player installed.  I know there are third party Flash authoring applications out there, but I don't know what, if any, exist on Linux, or if they are still maintained as Flash has been falling out of favor all over the place and is completely unsupported on most mobile platforms.</p>

<p>Outside of that, video is generally a raster format, so you can't work directly with vector graphics without rasterizing them.  If you rasterize your PDFs to an image sequence, then many video players and/or encoders can work with an image sequence.  A lot will even automatically recognize it as a video if you name them the same with numbering.  (Such as "myvideo00000.tga, myvideo00001.tga, myvideo00002.tga, etc.)</p>

<p>As Professor Sparkles pointed out, imagemagick and FFMPEG is one such option, but any combination of a tool that can convert PDFs to images and then a tool that can play or convert a series of images in to a video would work fine.  (For example, in a pinch you could print the PDF to an image driver and then use Premiere or something similar to open the image sequence and output a video as well.</p>

CC BY-SA 3.0
2014-07-09T15:46:42.393Z
Should note that he is working on Linux, so working with Flash Pro is probably not an option.
timonsku
CC BY-SA 3.0
2014-07-09T15:48:49.367Z
@ProfessorSparkles - right, any idea if there is any flash authoring alternative on Linux?  I don't know linux well enough.
AJ Henderson
CC BY-SA 3.0
2014-07-09T16:24:23.540Z
Not that I know of, pretty certain there is nothing native with even a huge lack of decent video cutting tools on linux.
The only solution would be to user an old version of Flash Pro in Wine.
timonsku
CC BY-SA 3.0
2014-07-09T15:40:54.270Z
2014-07-09T15:49:52.367Z
2014-07-09T15:49:52.367Z
AJ Henderson
<p>A tool to do that would be <a href="https://www.ffmpeg.org/download.html" rel="nofollow noreferrer">FFmpeg</a> but unfortunately it does not support PDF decoding.
Though you can convert your pdf's to png's using <a href="http://www.imagemagick.org/" rel="nofollow noreferrer">imagemagick</a> (<a href="https://askubuntu.com/questions/50170/how-to-convert-pdf-to-image">relevant question</a> on askUbuntu).</p>

<p>And then create a movie out of those PNG's with ffmpeg. <a href="https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images" rel="nofollow noreferrer">This guide</a> on the ffmpeg page explains how, here an example command:</p>

<pre><code>ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4
</code></pre>

<p>This read images from the current folder with the prefix "img" and a following number of 3 digits and display them for 5 seconds (<code>-r 1/5</code>) with a frame rate of 30 fps (<code>-r 30</code>).</p>

CC BY-SA 3.0
2014-07-10T08:37:47.353Z
Useful answer ;). Ubuntu does however state `This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.`, so this solution might not be useful anymore in future releases of Ubuntu. Furthermore, the `-c:v` option is not recognized.
Adriaan
CC BY-SA 3.0
2014-07-09T15:02:25.643Z
2014-07-09T15:02:25.643Z
2017-04-13T12:22:54.683Z
timonsku
<p>Assuming your PDF files are in your working directory, to create a movie file from a set of PDF files you can simply execute:</p>

<pre><code>mogrify -verbose -density 500 -resize 800 -format png ./*.pdf 
convert -delay 600 *.png movie.mp4                               
</code></pre>

<p>This requires  <a href="https://www.imagemagick.org/script/index.php" rel="nofollow noreferrer">Imagemagick</a>  and  <a href="https://www.ghostscript.com/download/gsdnld.html" rel="nofollow noreferrer">Ghostscript</a> to be installed. Works on Linux/Mac OS X/Microsoft Windows. Not vectorial.</p>

<hr>

<p>FYI:</p>

<ul>
<li><a href="https://stackoverflow.com/q/32466112/395857">Imagemagick Convert PDF to JPEG: FailedToExecuteCommand `"gswin32c.exe" / PDFDelegateFailed</a> --> that's the error message you get if Ghostscript is not installed. </li>
<li><a href="https://unix.stackexchange.com/q/121293/16704">Convert every pdf in the current directory to png</a> --> convert doesn't support batch conversion, unlike mogrify.</li>
<li>ffmpeg requires the images to have some very specific naming convention, unlike convert which simply takes the lexicographical order.</li>
</ul>

CC BY-SA 3.0
2017-08-08T15:38:21.137Z
2017-08-08T15:38:21.137Z
Franck Dernoncourt
<p>Using the latex package <code>animate</code>, a movie consisting of vector graphics can be made.</p>

<p>Construct a set of, for instance, pdf files with a base name <code>img-</code> and construct the file <code>main.tex</code> containing the code</p>

<pre><code>\documentclass{standalone}
\usepackage{animate}
\begin{document}
    \animategraphics[controls,autoplay,loop]{10}{img-}{1}{20}
\end{document}
</code></pre>

<p>. Compiling the <code>main.tex</code> file produces a pdf file with an embedded vector graphics movie. For playback, either <code>Adobe Reader</code> or <code>PDF-XChange Viewer</code> is needed. For more details, consider the manual of the <code>animate</code> package at <a href="http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/animate/animate.pdf" rel="nofollow noreferrer">The animate Package</a>. For Linux users, I believe only Adobe Reader is an option. Follow the instructions at <a href="https://askubuntu.com/questions/89127/how-do-i-install-adobe-acrobat-reader">How do I install Adobe Acrobat Reader?</a>.</p>

CC BY-SA 3.0
2018-01-11T23:00:47.133Z
+1. I like! No unnecessary and complicated installing of ffmpeg necessary for this one.
Wolpertinger
CC BY-SA 3.0
2014-07-28T12:33:07.347Z
2014-07-28T12:33:07.347Z
2017-04-13T12:22:54.683Z
Adriaan
<p>I have a set of files from which I would like to create a movie file with a certain frame rate. I can, however, not seem to find software that is able to do this.</p>

<p>I'm working under Ubuntu Linux. Ideally the movie would maintain the vector graphics format from the pdf. But I do not know if software exists which makes this possible. If this is impossible, I could also convert the pdf files to a nonvector format and produce a movie from it.</p>

<p>Does anybody have experience with this?</p>

<software-recommendation>
Create a movie file from a set of pdf files
Adriaan
# Create a movie file from a set of pdf files

(Asked by: username_0 on 2014-07-09)

I have a set of files from which I would like to create a movie file with a certain frame rate. I can, however, not seem to find software that is able to do this.

I'm working under Ubuntu Linux. Ideally the movie would maintain the vector graphics format from the pdf. But I do not know if software exists which makes this possible. If this is impossible, I could also convert the pdf files to a nonvector format and produce a movie from it.

Does anybody have experience with this?

**Tags:** software-recommendation


---

## 4 answers

### Answer by username_0 on 2014-07-28. Score: 1 | Accepted answer

Using the latex package animate, a movie consisting of vector graphics can be made.
Construct a set of, for instance, pdf files with a base name img- and construct the file main.tex containing the code
\documentclass{standalone}
\usepackage{animate}
\begin{document}
    \animategraphics[controls,autoplay,loop]{10}{img-}{1}{20}
\end{document}

. Compiling the main.tex file produces a pdf file with an embedded vector graphics movie. For playback, either Adobe Reader or PDF-XChange Viewer is needed. For more details, consider the manual of the animate package at The animate Package. For Linux users, I believe only Adobe Reader is an option. Follow the instructions at How do I install Adobe Acrobat Reader?.

> **Comments:**
> **username_4**: +1. I like! No unnecessary and complicated installing of ffmpeg necessary for this one.  

---

### Answer by username_1 on 2014-07-09. Score: 2

Adobe Flash is designed to work with animating vector graphics and allowing playback of vector animations, but it requires that a user have Flash Player installed. I know there are third party Flash authoring applications out there, but I don't know what, if any, exist on Linux, or if they are still maintained as Flash has been falling out of favor all over the place and is completely unsupported on most mobile platforms.

Outside of that, video is generally a raster format, so you can't work directly with vector graphics without rasterizing them. If you rasterize your PDFs to an image sequence, then many video players and/or encoders can work with an image sequence. A lot will even automatically recognize it as a video if you name them the same with numbering. (Such as "myvideo00000.tga, myvideo00001.tga, myvideo00002.tga, etc.)

As Professor Sparkles pointed out, imagemagick and FFMPEG is one such option, but any combination of a tool that can convert PDFs to images and then a tool that can play or convert a series of images in to a video would work fine. (For example, in a pinch you could print the PDF to an image driver and then use Premiere or something similar to open the image sequence and output a video as well.

> **Comments:**
> **username_2**: Should note that he is working on Linux, so working with Flash Pro is probably not an option.  
> **username_1**: @ProfessorSparkles - right, any idea if there is any flash authoring alternative on Linux?  I don't know linux well enough.  
> **username_2**: Not that I know of, pretty certain there is nothing native with even a huge lack of decent video cutting tools on linux. The only solution would be to user an old version of Flash Pro in Wine.  

---

### Answer by username_2 on 2014-07-09. Score: 2

A tool to do that would be FFmpeg but unfortunately it does not support PDF decoding.
Though you can convert your pdf's to png's using imagemagick (relevant question on askUbuntu).
And then create a movie out of those PNG's with ffmpeg. This guide on the ffmpeg page explains how, here an example command:
ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4

This read images from the current folder with the prefix "img" and a following number of 3 digits and display them for 5 seconds (-r 1/5) with a frame rate of 30 fps (-r 30).

> **Comments:**
> **username_0**: Useful answer ;). Ubuntu does however state `This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.`, so this solution might not be useful anymore in future releases of Ubuntu. Furthermore, the `-c:v` option is not recognized.  

---

### Answer by username_3 on 2017-08-08. Score: 0

Assuming your PDF files are in your working directory, to create a movie file from a set of PDF files you can simply execute:
mogrify -verbose -density 500 -resize 800 -format png ./*.pdf 
convert -delay 600 *.png movie.mp4                               

This requires  Imagemagick  and  Ghostscript to be installed. Works on Linux/Mac OS X/Microsoft Windows. Not vectorial.

FYI:

Imagemagick Convert PDF to JPEG: FailedToExecuteCommand `"gswin32c.exe" / PDFDelegateFailed --> that's the error message you get if Ghostscript is not installed. 
Convert every pdf in the current directory to png --> convert doesn't support batch conversion, unlike mogrify.
ffmpeg requires the images to have some very specific naming convention, unlike convert which simply takes the lexicographical order.


---

