I have this MetaPost input file:
%@ Maxime Chupin
%@ 4 février 2017
%@ animCercle.mp
prologues := 3;
outputtemplate := "svg/%j-%c.svg";
outputformat := "svg";
% unité
u:=1cm;
%rayon cercle
r:=5u;
% nombre de quartier
numeric n;
n := 16;
% l'origine
pair O;
O :=(0,0);
% le fond
picture fond;
numeric angle;
fond = image(
fill fullcircle scaled 2r withcolor black;
for i:= 0 upto n-1:
angle := (360.0/n)*i;
draw (-r*cosd(angle),-r*sind(angle)) -- (r*cosd(angle),r*sind(angle)) withcolor white;
endfor;
);
% les balles
% rayon balle
rb := 0.3u;
def balle =
fullcircle scaled 2rb
enddef;
% les différentes images
for j:= 0 upto 359:
beginfig(j);
draw fond;
for i:=0 upto n-1:
angle := (360.0/n)*i;
fill balle shifted ((r-rb)*sind(angle+j),0) rotatedaround(O,angle) withcolor white;
endfor;
endfig;
endfor;
end.
As is, it produces a set of numbered SVG files if I run mptopdf on it. Now I want mptopdf to output multipage PDF with one animation frame per page.
Is that possible without writing a wrapper (La)TeX file?
I want to use the PDF as input for building a standalone animated SVG, using the animate package.
For output in PDF format I modified the following lines of the input file:
%outputtemplate := "svg/%j-%c.svg";
%outputformat := "svg";
outputformat := "pdf";
Currently, I only get a set of numbered PDF files.

mptopdfactually calls TeX? – Henri Menke Jan 29 '19 at 02:50mptopdfis just a short Perl script which callspdftexwith the format specified bymptopdf.tex. – Henri Menke Jan 29 '19 at 05:39