Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MelonEncoder/pdf-to-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

76 Commits

Repository files navigation

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 <int>x<int> : set output resolution. Use 0 to preserve resolution of original content, default: 1280x720
 -f <float> : frames per second.
 -s <float> : seconds per frame.
 -d <float> : 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\
 --rev-seq : load numbered imgs from dir in decending order, larger # to smaller #

Dependencies

  1. poppler >= 25.01.0 - pdf to image
  2. opencv >= 4.12.0 - image manipulation
  3. ffmpeg >= 7.0.0 - video rendering backend (not a build dependency)

Build System

I'm using the Meson build system for my project. It's simple, modern, and easy to learn.

AltStyle によって変換されたページ (->オリジナル) /