Microsoft Windows Users
For other operating systems, please rise your both hands.
Create a template file, name it template.tex
, save it below the local texmf folder (I am not sure my terminology is correct here).
\documentclass[border=12pt]{standalone}% cannot use preview
\usepackage{animate,graphicx}
\begin{document}
\animategraphics[palindrome,controls,loop,autoplay,scale=\OutputScale]{\FrameRate}{"\InputFileName"}{}{}
\end{document}
Create a batch file as follows. Name it, for example, animator.bat
. Save it in any safe place and register its path to PATH
to make it accessible from everywhere.
echo off
rem %1 PDF filename without extension
rem %2 frame rate
rem %3 scale
if exist "%~1.pdf" rename "%~1.pdf" "%~1-animate.pdf"
rem need 2 compilations
if exist "%~1-animate.pdf" pdflatex -interaction=batchmode --jobname="%~1" "\def\InputFileName{%~1-animate}\def\FrameRate{%2}\def\OutputScale{%3}\input{template}"
if exist "%~1-animate.pdf" pdflatex --jobname="%~1" "\def\InputFileName{%~1-animate}\def\FrameRate{%2}\def\OutputScale{%3}\input{template}"
if exist "%~1-animate.pdf" del "%~1-animate.pdf"
for %%x in (aux log out toc) do (if exist "%~1.%%x" del "%~1.%%x")
Now you can call the batch animator.bat
as follows.
animator mypdffilenamewithoutextension 25 1
Done, see the result. A standalone PDF animation viewed on Acrobat Reader.

Miscellaneous
You can also create a new build profile (in TeXnicCenter, TeXStudio, or any editors) to invoke the batch such that you can save more time and energy.
animate
? tex.stackexchange.com/q/401886/138900