https://github.com/melonencoder/pdf-to-video
Convert PDFs and Image Sequences to Video
https://github.com/melonencoder/pdf-to-video
cpp ffmpeg image-sequence opencv pdf pdf-to-video poppler video video-processing
Last synced: about 1 month ago
JSON representation
Convert PDFs and Image Sequences to Video
- Host: GitHub
- URL: https://github.com/melonencoder/pdf-to-video
- Owner: MelonEncoder
- Created: 2024-10-14T05:24:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-23T05:28:06.000Z (12 months ago)
- Last Synced: 2025-06-23T06:19:42.552Z (12 months ago)
- Topics: cpp, ffmpeg, image-sequence, opencv, pdf, pdf-to-video, poppler, video, video-processing
- Language: C++
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About PTV
This is a CLI tool used to convert **PDF** files and numbered **image sequences** into a **video** (.mp4) file.
## Features
- Convert .pdf files to video
- Convert image_sequence/ directories to video
- Animation styles:
- sequence (each image is a frame, on by default)
- scroll
- Chain PDFs and/or Image Sequences together. Ex:
```
ptv 1.pdf 2.pdf seq/ --> output.mp4
```
- Change output settings (fps, resolution, duration, output path)
- Minimal support for .gif files
### Flags
```
Help Options:
-h, --help : show this help text.
Application Options:
[pdf_paths...] : PDF file path. /home/usr/example.pdf
[img_sequence_dirs...] : image sequence directory. /home/usr/example_seq/
-r x : set output resolution. Use 0 to preserve resolution of original content, default: 1280x720
-f : frames per second.
-s : seconds per frame.
-d : duration in seconds. NOTE: overides -s (seconds per frame)
-o [output_path] : currently only support .mp4 files, leave blank for auto output
-a [Up|Down|Left|Right] : scrolls content instead of making each page a frame (like a slideshow).
--gif : render .gif files in image sequences\n\
--reverse-seq : load numbered imgs from dir in decending order, larger # to smaller #
```
## Dependencies
1. [poppler](https://poppler.freedesktop.org/) >= 25.01.0 - pdf to image
2. [opencv](https://opencv.org/) >= 4.10.0 - image manipulation
3. [ffmpeg](https://ffmpeg.org/) >= 7.0.0 - video rendering backend (not a build dependency)
## Build System
I'm using the [Meson](https://mesonbuild.com/) build system for my project. It's simple, modern, and easy to learn.