Changes

Jump to navigation Jump to search
no edit summary
</pre>
will assemble this the JPG files at a framerate of 30 images per second (option \type{-r 30}) into a QuickTime MP4 movie :named \type{myMovie.mp4}.
Project1-A : [[File:Project1-A.mp4]]
 
For an overview, here's the complete script for a Unix-like system. After producing the PDF with Context (line 1), we create a temporary folder named \type{JPGdir} (line 2), convert the PDF to a series of JPG images in the created folder (line 3), create a QuickTime MP4 movie from the JPG images (lines 4-5), clean up (line 6), and finally, open the movie (line 7) :
 
<pre>
context --once Project1-A.tex
mkdir JPGdir
convert Project1-A.pdf JPGdir/p_%03d.jpg
ffmpeg -y -r 30 -i JPGdir/p_%03d.jpg -c:v libx264
-pix_fmt yuv420p Movie-a.mp4
rm JPGdir/*.jpg ; rmdir JPGdir
open Project1-A.mp4
</pre>
 
A note about the definition of the picture: although the conversion from PDF to JPG could be made at any resolution with ImageMagick, the default density is 72 dpi. This means that if the size of the PDF page is 15 inches by 15 inches (equivalent to 1080 pixels by 1080 pixels, or 38.1 cm by 38.1 cm at a definition of 72 dpi), the resulting image will also be 1080 pixels by 1080 pixels. Therefore, if the intention is to create a UHD video, add the following line at the end of the code (line 18):
 
<pre>
currentpicture := currentpicture xysized (4096,2160);
</pre>
== More animated objects ==
36

edits

Navigation menu