{"id":19432813,"url":"https://github.com/truethari/thumb-gen","last_synced_at":"2025-04-24T20:31:12.890Z","repository":{"id":45627388,"uuid":"348801450","full_name":"truethari/thumb-gen","owner":"truethari","description":"Python application that can be used to generate video thumbnail for mp4 and mkv file types.","archived":false,"fork":false,"pushed_at":"2021-12-05T01:36:48.000Z","size":236,"stargazers_count":23,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-15T11:22:59.582Z","etag":null,"topics":["pip","pypi","python","python3","screenshot","thumbnail","thumbnail-generator","video-thumbnail"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/thumb-gen/","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/truethari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-17T17:49:12.000Z","updated_at":"2024-03-15T09:34:06.000Z","dependencies_parsed_at":"2022-09-10T02:23:45.518Z","dependency_job_id":null,"html_url":"https://github.com/truethari/thumb-gen","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truethari%2Fthumb-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truethari%2Fthumb-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truethari%2Fthumb-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truethari%2Fthumb-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truethari","download_url":"https://codeload.github.com/truethari/thumb-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223967317,"owners_count":17233365,"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","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":["pip","pypi","python","python3","screenshot","thumbnail","thumbnail-generator","video-thumbnail"],"created_at":"2024-11-10T14:37:14.584Z","updated_at":"2024-11-10T14:37:15.258Z","avatar_url":"https://github.com/truethari.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thumbnail Generator 🎬\n\n[![github actions](https://github.com/truethari/thumb-gen/actions/workflows/thumb-gen.yml/badge.svg)](https://github.com/truethari/thumb-gen/actions/workflows/thumb-gen.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/01b66feeb94743ac80e413e4e9075595)](https://www.codacy.com/gh/truethari/thumb-gen/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=truethari/thumb-gen\u0026utm_campaign=Badge_Grade)\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![PyPI version](https://badge.fury.io/py/thumb-gen.svg)](https://badge.fury.io/py/thumb-gen)\n[![Downloads](https://pepy.tech/badge/thumb-gen)](https://pepy.tech/project/thumb-gen)\n\n## What is This\n\n---\n\nThis is a Python application that can be used to generate video thumbnail for mp4 and mkv file types.\n\n[![Imgur](https://i.imgur.com/qRHQRK7.png)](https://imgur.com/a/xpkkyqH)\n\n## Installation\n\nYou can use pip:\n\n```console\n~$ pip3 install thumb-gen\n```\n\n## Configurations\n\n- The number of screen images that should be included in the final thumbnail image\n- Thumbnail image quality\n- Font type in the video info panel. You can add a file path of a font file (.ttf) to this\n- Font size in the video info panel\n- Custom text in the video info panel\n- Background color of the thumbnail (Hex codes are also supported)\n- Font colour of the thumbnail (Hex codes are also supported)\n\nDownload font files : [FontSquirrel](https://www.fontsquirrel.com/)\n\n```console\n~$ thumb-gen -c\n```\n\nor\n\n```console\n~$ thumb-gen --config\n```\n\nBy program default:\n\n```ini\nIMAGES = 12\nIMAGE_QUALITY = 80\nFONT =\nFONT_SIZE = 20\nCUSTOM_TEXT =\nBG_COLOUR = white\nFONT_COLOUR = black\n```\n\n## Usage\n\n### Usage options\n\n```text\nUsage: thumb-gen file file\nusage: thumb-gen dir dir\n\nOptions:\n  -h, --help     show this help message and exit\n  -c, --config   configurations (images, image quality, font, font size,\n                 custom text, bg color, font color)\n  -v, --version  show thumb-gen version and exit\n```\n\n### Console\n\n```console\n~$ thumb-gen -h\n~$ thumb-gen --help\n\n~$ thumb-gen -c\n~$ thumb-gen --config\n\n~$ thumb-gen -v\n~$ thumb-gen --version\n\n~$ thumb-gen input.mp4\n~$ thumb-gen input.mp4 input2.mp4\n~$ thumb-gen \"d:/videos/input.mp4\"\n\n~$ thumb-gen \"/videos\"\n~$ thumb-gen \"/videos\" \"/videos2\"\n~$ thumb-gen \"d:/videos\"\n```\n\n### Python\n\n- If you don't set an output folder, thumbnail images will be saved in the video folder (video_path).\n- If you don't need a custom text and custom font file (including font size) and you have already set these for the configuration file (using console or defaults), it will be added automatically. To avoid this set the `custom_text` value to `False` and add a custom font file location.\n- If you do not set the `columns` size, it will use the default value (3)\n\n```python\nGenerator(video_path, output_path='', rows=0, columns=0, imgCount=0, custom_text='True', font_dir='', font_size=0, bg_colour='', font_colour='')\n```\n\n#### Example 1\n\n```python\nfrom thumb_gen import Generator\n\napp = Generator(video_path=\"C:/input/video.mp4\",\n                output_path=\"C:/output/\",\n                custom_text=\"www.example.com\",\n                font_dir=\"C:/Windows/Fonts/Arial.ttf\",\n                font_size=30)\napp.run()\n```\n\n#### Example 2\n\n```Python\nimport os\nfrom thumb_gen import Generator\n\nfolder = 'C:/input'\nfor video in os.listdir(folder):\n    if video.endswith('.mp4') or video.endswith('.mkv'):\n        app = Generator(video_path=os.path.join(folder, video),\n                        custom_text=False,\n                        font_dir=\"C:/Project/font.ttf\",\n                        font_size=25,\n                        bg_colour='blue',\n                        font_colour='red')\n        app.run()\n```\n\n#### Example 3\n\n```Python\nimport os\nfrom thumb_gen import Generator\n\nfolder = 'C:/input'\nfor video in os.listdir(folder):\n    if video.endswith('.mp4') or video.endswith('.mkv'):\n        app = Generator(video_path=os.path.join(folder, video),\n                        columns=5,\n                        rows=10,\n                        custom_text=False,\n                        font_dir=\"C:/Project/font.ttf\",\n                        font_size=25,\n                        bg_colour='blue',\n                        font_colour='red')\n        app.run()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruethari%2Fthumb-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruethari%2Fthumb-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruethari%2Fthumb-gen/lists"}