YouTube to PDF
A WordPress custom plugin that converts YouTube videos into PDF documents by extracting frames using FFmpeg 7.1.1, fetching videos with yt-dlp (2025.10.22), and generating PDFs via TCPDF. Ideal for educators, researchers, and content creators who want to archive YouTube video frames directly inside WordPress.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/shwetharmaiya/youtube-to-pdf/archive/refs/heads/main.zipA WordPress custom plugin that converts YouTube videos into PDF documents by extracting frames using FFmpeg 7.1.1, fetching videos with yt-dlp (2025.10.22), and generating PDFs via TCPDF. Ideal for educators, researchers, and content creators who want to archive YouTube video frames directly inside WordPress.
📌 youtube-to-pdf — WordPress Custom Plugin
youtube-to-pdf is a lightweight yet powerful WordPress plugin designed to automatically convert YouTube video frames into a downloadable PDF document. It integrates three major tools — FFmpeg, yt-dlp, and TCPDF — to extract high-quality frames and assemble them into a clean PDF.
This plugin is ideal for educators, content creators, researchers, or bloggers who want to archive visual content from YouTube videos directly inside WordPress.
🚀 Features
🎥 Download YouTube Videos Uses yt-dlp (version 2025.10.22) to fetch the YouTube video in the best available format.
🖼️ Extract Frames Using FFmpeg Uses FFmpeg 7.1.1 to capture frames at intervals (configurable), generating high-quality JPEG or PNG snapshots.
📄 Generate PDF Using TCPDF Automatically compiles extracted frames into a PDF using TCPDF, with:
Automatic page sizing
Optional title, watermark, or timestamps
Custom margins and layout
🔄 Fully Automated Workflow Input a YouTube URL → plugin fetches video → extracts frames → generates PDF → stores it in WordPress uploads folder.
📥 Admin Interface Clean WordPress admin page where users can:
Enter YouTube URL
Set frame interval (e.g., 1 frame per second)
Set output PDF filename
Download the final PDF
📂 File Management Generated PDF files are stored under /wp-content/uploads/youtube-to-pdf/.
🧩 Dependencies
This plugin requires the following binaries/libraries available on your server:
FFmpeg 7.1.1
yt-dlp (master build — version 2025.10.22)
TCPDF library for PHP
Make sure these are installed and accessible from your PHP environment (shell_exec or similar must be enabled).
🏗️ How It Works (Technical Flow)
User inputs a YouTube URL in the plugin's admin page.
Plugin executes:
yt-dlp -o video.mp4
FFmpeg extracts frames:
ffmpeg -i video.mp4 -vf fps=1 frame-%03d.jpg
TCPDF initializes a PDF document and inserts each extracted frame as a full-page image.
PDF is saved in the uploads directory.
User can download the PDF or delete generated files.
🔧 Use Cases
Creating visual transcripts of video lectures.
Extracting key scenes from tutorials, webinars, or interviews.
Offline visual notes for research or study.
Archiving video content in PDF form.