Skip to main content

Simple helper utility to convert a video file to PDF image series

Project description

vid2pdf

Simple helper utility to convert a video file to PDF image series

External Requirements

vid2pdf requires ffmpeg to be extracted to the /utils/ffmpeg folder. The latest version of ffmpeg can be downloaded from ffmpeg.org. Existing local ffmpeg installations are not currently supported.

If not using a precompiled build, Python must be installed on your local machine. You can download the latest version of Python for your OS from python.org

Installation

This project utilizes poetry for dependency & environment management. Clone or download this repository to your local machine and create a new environment:

$ cd <project_dir>
$ poetry install

Though it's recommended to utilize poetry, the project may also be installed via pip:

$ cd <project_dir>
$ pip install .

Alternatively, prebuilt binaries are provided at https://github.com/sco1/vid2pdf/releases

Usage

vid2pdf can be invoked using Python:

$ python vid2pdf.py

Or, if a prebuilt binary is present, this may be called directly

$ vid2pdf.exe

Input Parameters

Unless otherwise noted, all input parameters are prompted in the CLI

input_video

The default behavior is to open a GUI dialog for the user to specify a the input video file. An optional -cli flag may be passed to bypass this GUI and instead prompt for the video file path in the CLI.

output_dir

PDF output directory. If this value is not specified, this defaults to the parent directory of the input video.

start_time

Video start time for capture, as hh:mm:ss.sss. If this value is not specified, the beginning of the video is used.

end_time

Video end time for capture, as hh:mm:ss.sss. If this value is not specified, the end of the video is used.

Examples

$ python vid2pdf.py
Enter the output directory path [X:\vid2pdf\test]:
Enter start time (hh:mm:ss.sss). Leave blank to use the video start:
Enter end time (hh:mm:ss.sss). Leave blank to use the video end: 00:00:01.000
<ffmpeg output snipped>
Loading 30 frames...
100%|███████████████████████████████████████| 29/29 [00:00<00:00, 852.82it/s]
Generating PDF ... done
$ python vid2pdf.py -cli
Enter the video file path: X:\vid2pdf\test\test_video.mp4
Enter the output directory path [X:\vid2pdf\test]:
Enter start time (hh:mm:ss.sss). Leave blank to use the video start:
Enter end time (hh:mm:ss.sss). Leave blank to use the video end: 00:00:01.000
<ffmpeg output snipped>
Loading 30 frames...
100%|███████████████████████████████████████| 29/29 [00:00<00:00, 852.82it/s]
Generating PDF ... done

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vid2pdf-1.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

vid2pdf-1.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file vid2pdf-1.1.0.tar.gz.

File metadata

  • Download URL: vid2pdf-1.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.5 Windows/10

File hashes

Hashes for vid2pdf-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1b998b0b2e1cf1306ebfebaecc575a63c04f03bb9a7820b444ba2ee39495ceae
MD5 e650216c53454a8552d4851f1123efb0
BLAKE2b-256 60a66ac6dd02ac58c9af3ea128aa9c9d882a2d2973a34460cd34269ae7cbef28

See more details on using hashes here.

File details

Details for the file vid2pdf-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: vid2pdf-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.5 Windows/10

File hashes

Hashes for vid2pdf-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3997ad6c296ed83aa60aebc75e62125647d4fe359a2b3332e19f1c0742cf80a
MD5 bff17f908b81925553f955ab794d5054
BLAKE2b-256 aefc89cc63f5c4b5f19e01c6dc2441ed135ed5ece0792895dec32dd595d84139

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page