{"id":31731079,"url":"https://github.com/maskingtechnology/pdf2vid","last_synced_at":"2025-10-09T07:47:54.423Z","repository":{"id":316758271,"uuid":"1064035860","full_name":"MaskingTechnology/pdf2vid","owner":"MaskingTechnology","description":"Simple tools for converting PDFs to a video with voiceovers by configuration.","archived":false,"fork":false,"pushed_at":"2025-10-03T19:09:43.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T21:13:58.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaskingTechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T13:01:40.000Z","updated_at":"2025-10-03T19:09:46.000Z","dependencies_parsed_at":"2025-09-26T15:26:05.148Z","dependency_job_id":"b2719c46-c333-47c3-afff-d0f6b490dc49","html_url":"https://github.com/MaskingTechnology/pdf2vid","commit_stats":null,"previous_names":["maskingtechnology/pdf2vid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaskingTechnology/pdf2vid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaskingTechnology%2Fpdf2vid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaskingTechnology%2Fpdf2vid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaskingTechnology%2Fpdf2vid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaskingTechnology%2Fpdf2vid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaskingTechnology","download_url":"https://codeload.github.com/MaskingTechnology/pdf2vid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaskingTechnology%2Fpdf2vid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000974,"owners_count":26082974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T07:47:51.164Z","updated_at":"2025-10-09T07:47:54.416Z","avatar_url":"https://github.com/MaskingTechnology.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# pdf2vid\n\ninternal tool\nextensive caching\nno error handling\n\n## Requirements\n\nThe following tools are required:\n\n1. [Python version 3.12](https://www.python.org).\n1. [FFmpeg](https://www.ffmpeg.org).\n1. [ImageMagick](https://imagemagick.org).\n\n### Installation (MacOs)\n\nInstall [HomeBrew](https://brew.sh/), and run the following commands in a terminal.\n\n```bash\nbrew install ffmpeg poppler\npip install -r requirements.txt\n```\n\n## Usage (MacOs)\n\nThe basic structure of a video is:\n\n1. **Scene** — the smallest unit, covering a single piece of voice-over text.\n1. **Chapter** - a group of related scenes covering one topic.\n1. **Video** - the full piece, made up of chapters.\n\nAll three can be generated independently using the provided tool.\n\n### Generating scenes\n\nConfiguration:\n\n```json\n{\n    \"chapter\": \"C1\",\n    \"scene\": \"S1\",\n    \"voice\":\n    {\n        \"text\": \"Hello and welcome!\",\n        \"speed\": 1.0,\n        \"delay\": 0.0\n    },\n    \"frames\":\n    {\n        \"source\": \"frames.pdf\",\n        \"start\": 10,\n        \"end\": 20,\n        \"duplications\": \"10:5,15:3,20:1\",\n        \"rate\": 10\n    }\n}\n```\n\nOptions:\n\n* **chapter** — the ID of the chapter this scene belongs to.\n* **scene** — the ID of the scene.\n* **voice** — voice-over options:\n  * **text** — the text to convert to speech.\n  * **speed** — the read-speed.\n  * **delay** — the delay in seconds before start playing.\n* **frames** — frames options:\n  * **source** — the path to the PDF file containing the frames.\n  * **start** — the start frame (page) to use for this scene starting from 1 (optional, default 0).\n  * **end** — the end frame (page) to use for this scene (optional, default last frame).\n  * **duplications** — specifies which frames need to be duplicated (optional, see instructions below).\n  * **rate** — the framerate (optional, default: 10).\n\nDuplication is very useful for pausing frames. Its need to be specified in the following format: `frame_number:amount`. Multiple duplications can be specified by separating the with a comma `,`.\n\nGeneration:\n\n```bash\npython path/to/tools/generate.py --type \"scene\" --config \"config.json\" --output \"dist\"\n```\n\nArguments:\n\n* **--config** — path the scene configuration file.\n* **--output** — the root directory of the output.\n\nResult:\n\n```txt\ndist\n|- cache\n|  | -C1\n|  |  |- cache\n|  |  |  |- S1\n|  |  |  |  |- _frames (frames with duplications)\n|  |  |  |  |- frames (extracted frames from the PDF)\n|  |  |  |  |- config.json (copy of the previous config)\n|  |  |  |  |- video.mp4 (generated video from the frames)\n|  |  |  |  |- voice.wav (generated voice-over)\n|  |  |- S1.mp4 (final result with video and voice combined)\n```\n\n**Note** that this will only generate a new result if one of the configuration options has changed.\n\n### Generate chapter\n\nConfiguration:\n\n```json\n{\n    \"chapter\": \"C1\",\n    \"description\": \"First chapter\",\n    \"scenes\": [\"S1\", \"S2\", \"S3\"]\n}\n```\n\nOptions:\n\n* **chapter** — the ID of the chapter.\n* **description** — the description of the topic (for yourself, not used by the tools).\n* **scenes** — the list of scene IDs in rendering order.\n\nGeneration:\n\n```bash\npython path/to/tools/generate.py --type \"chapter\" --config \"config.json\" --output \"dist\"\n```\n\nArguments:\n\n* **--config** — path the scene configuration file.\n* **--output** — the root directory of the output.\n\nResult:\n\n```txt\ndist\n|- cache\n|  | -C1\n|  |  |- cache\n|  |  |- S1.mp4\n|  |  |- S2.mp4\n|  |  |- S3.mp4\n|  |  |- playlist.txt (list of all mp4 scene files in correct order)\n|- C1.mp4 (final result with all scenes combined)\n```\n\n**Note** that this will always generate a new result.\n\n### Generate video\n\nConfiguration:\n\n```json\n{\n    \"video\": \"Instructions\",\n    \"description\": \"The most clear video ever\",\n    \"chapters\": [\"C1\", \"C2\"]\n}\n```\n\nOptions:\n\n* **video** — the name of the video.\n* **chapters** — the list of chapter IDs in rendering order.\n\nGeneration:\n\n```bash\npython path/to/tools/generate.py --type \"video\" --config \"config.json\" --output \"dist\"\n```\n\nArguments:\n\n* **--config** — path the scene configuration file.\n* **--output** — the root directory of the output.\n\nResult:\n\n```txt\ndist\n|- cache\n|  |- C1.mp4\n|  |- C2.mp4\n|  |- playlist.txt (list of all mp4 chapter files in correct order)\n|- Instructions.mp4 (final result with all chapters combined)\n```\n\n**Note** that this will always generate a new result.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaskingtechnology%2Fpdf2vid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaskingtechnology%2Fpdf2vid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaskingtechnology%2Fpdf2vid/lists"}