This is a CLI tool that is written in C++ and is used to convert a .pdf
to .mp4
file. It can also convert image sequences into videos.
- Convert PDF to video
ptv example.pdf
-->example.mp4
- Convert image sequence to video
ptv img_seq/
-->img_seq.mp4
- Video animation styles:
- sequence (on by default)
- vertical scroll
- Chain PDFs or Image Sequences together. (1.pdf + 2.pdf -> output.mp4)
- Change output settings (fps, resolution, duration, output path)
-r <int> <int> : set output resolution. use -1 to keep scale, default: 1280 720
-f <float> : frames per second.
-s <float> : seconds per frame.
-d <float> : duration in seconds. NOTE: overides -s
-o [output_path] : currently only support .mp4 files, leave blank for auto
--scroll
- poppler>=25.01.0 - pdf to image
- opencv>=4.10.0 - image manipulation
- ffmpeg>=7.0.0 - video rendering backend (not a build dependency)
I'm using the Meson build system for my project. It's simple, modern, and easy to learn.