Node.js FFMPEG Command to Convert PDF to MP4 Video in Command Line Using Javascript Full Project For Beginners



here is script to convert pdf to video:



exec("convert -geometry 1600x1600 -density 200x200 -quality 100 -resize 800x $pdf_path $temp_images");
exec("ffmpeg -loop 1 -f image2 -framerate 0.5 -b 1800 -i $temp_images_wildcard -c:v libx264 -preset slow -tune stillimage -r 5 -t 22 -y $frame_target 2>&1",$output);



Assuming your PDF files are in your working directory, to create a movie file from a set of PDF files you can execute:



exec("mogrify -verbose -density 500 -resize 800 -format png ./*.pdf")
exec("convert -delay 600 *.png movie.mp4")

Leave a Reply