thumbnails


Namethumbnails JSON
Version 0.1.12 PyPI version JSON
download
home_pagehttps://github.com/pysnippet/thumbnails
SummaryVideo thumbnail generator for modern web video players such as Plyr, Videojs, Flowplayer, Fluid Player, etc.
upload_time2024-03-03 10:02:29
maintainer
docs_urlNone
authorArtyom Vancyan
requires_python>=3.8
licenseApache 2.0
keywords vtt json plyr video fluid player videojs thumbnail generator flowplayer thumbnails thumbnail-generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Thumbnails <img src="https://github.com/pysnippet.png" align="right" height="64" />

[![PyPI](https://img.shields.io/pypi/v/thumbnails.svg)](https://pypi.org/project/thumbnails/)
[![Tests Ubuntu | MacOS](https://github.com/pysnippet/thumbnails/actions/workflows/tests.yml/badge.svg)](https://github.com/pysnippet/thumbnails/actions/workflows/tests.yml)
[![Tests Windows](https://img.shields.io/circleci/build/gh/pysnippet/thumbnails?token=c63e2b94c69393ab3e47a0f20de802fe6265ecf4&label=Tests%20Windows&logo=circleci&logoColor=959da5&labelColor=3e464f)](https://app.circleci.com/pipelines/github/pysnippet/thumbnails)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ab5414af4c9546fe97ad64365e2a66f0)](https://www.codacy.com?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=pysnippet/thumbnails&amp;utm_campaign=Badge_Grade)
[![License](https://img.shields.io/pypi/l/thumbnails.svg)](https://github.com/pysnippet/thumbnails/blob/master/LICENSE)

This tool stands out for its unparalleled optimization for lightning-fast thumbnail generation. By utilizing minimal
resources, you can generate more in less time. And with a user-friendly CLI and a convenient Python API, this tool is
the ultimate solution for efficient and streamlined thumbnail creation.

## Compatible with Major Video Players

Modern web video players use the **WebVTT** formatted files to preview thumbnails at a pointed time.
[WebVTT](https://www.w3.org/TR/webvtt1/) is a format for displaying timed text tracks (such as subtitles or captions).
Open-source video players such as [Plyr](https://github.com/sampotts/plyr), [Video.js](https://github.com/videojs/video.js),
[Flowplayer](https://github.com/flowplayer/flowplayer), [Fluid Player](https://github.com/fluid-player/fluid-player),
and more, use this format for showing the thumbnails. And, with the use of [external plugins](https://github.com/brightcove/videojs-thumbnails),
Video.js even has the capability to handle **JSON** formatted thumbnail metadata. This is where our tool comes in,
offering the ability to generate the perfect thumbnails to match your needs.

## Features

- Wide-ranging video format compatibility, accommodating all major video formats as input files. (mp4, mkv, avi, mov, ogv, webm, mpeg, mpg, wmv, etc.)
- Flexible output options, supporting both WebVTT and JSON formats.
- Generating video thumbnails through the CLI and the Python API.
- Customize your thumbnail creation to fit your specific needs with various options.
- Image compression technology, ensuring optimized file sizes for quick and efficient loading times.

## How to Use?

### CLI Tool Usage

The CLI is a convenient way to generate thumbnails for a video file. And it accepts files or directories as arguments.
For the complete list of options, run `thumbnails --help`.

```bash
thumbnails --base /media/ --output /var/www/movie.com/media/thumbnails/ --interval 5 ~Videos/movies
```

### Python API Usage

The Python API provides a flexible way to integrate video thumbnail generation into your existing applications.
Both the CLI and the Python API share the same set of options.

```python
from thumbnails import Generator

inputs = (
    "~Downloads/movie.mp4",
    "~Videos/movies/1.avi",
    "~Videos/movies/2.ogv",
)

generator = Generator(inputs)
generator.base = "/media/"
generator.skip = True  # skip existing thumbnails
generator.output = "/var/www/movie.com/media/thumbnails/"
generator.interval = 5
generator.generate()
```

## Development

Run the following command in the package's root directory to install it in editable mode.
```bash
python3 -m pip install -e .
```
This command will install the package in your local environment and allow you to make changes to the code and see the
updates immediately. It will also install all the required dependencies.

## Contribute

Everyone is welcome to contribute to this project. Please read and follow the [contribution guidelines](CONTRIBUTING.md)
before you start. Contributions can be considered:
- Reporting an issue
- Opening a pull-request
- Suggesting an idea at [discussions](https://github.com/pysnippet/thumbnails/discussions)
- Starring the repository if you like it

Before you open a PR, please run the unit tests in the local environment to ensure everything is working. You need to
install [tox](https://github.com/tox-dev/tox) and run the tests for configured environments.
```bash
python3 -m pip install tox && tox
```

If you want to run tests only for the current environment with your local Python interpreter, you can use the following
commands.

```bash
python3 -m pip install -r tests/requirements.txt
python3 -m pytest
```

## License

Copyright (C) 2023 Artyom Vancyan. [Apache 2.0](https://github.com/pysnippet/thumbnails/blob/master/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pysnippet/thumbnails",
    "name": "thumbnails",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "vtt,json,plyr,video,fluid,player,videojs,thumbnail,generator,flowplayer,thumbnails,thumbnail-generator",
    "author": "Artyom Vancyan",
    "author_email": "artyom@pysnippet.org",
    "download_url": "https://files.pythonhosted.org/packages/c0/35/1f0b43f939617c2a1cab23d38c2f27ad7fe37ce959c0b3fe66090f9c629a/thumbnails-0.1.12.tar.gz",
    "platform": "unix",
    "description": "# Thumbnails <img src=\"https://github.com/pysnippet.png\" align=\"right\" height=\"64\" />\n\n[![PyPI](https://img.shields.io/pypi/v/thumbnails.svg)](https://pypi.org/project/thumbnails/)\n[![Tests Ubuntu | MacOS](https://github.com/pysnippet/thumbnails/actions/workflows/tests.yml/badge.svg)](https://github.com/pysnippet/thumbnails/actions/workflows/tests.yml)\n[![Tests Windows](https://img.shields.io/circleci/build/gh/pysnippet/thumbnails?token=c63e2b94c69393ab3e47a0f20de802fe6265ecf4&label=Tests%20Windows&logo=circleci&logoColor=959da5&labelColor=3e464f)](https://app.circleci.com/pipelines/github/pysnippet/thumbnails)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ab5414af4c9546fe97ad64365e2a66f0)](https://www.codacy.com?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=pysnippet/thumbnails&amp;utm_campaign=Badge_Grade)\n[![License](https://img.shields.io/pypi/l/thumbnails.svg)](https://github.com/pysnippet/thumbnails/blob/master/LICENSE)\n\nThis tool stands out for its unparalleled optimization for lightning-fast thumbnail generation. By utilizing minimal\nresources, you can generate more in less time. And with a user-friendly CLI and a convenient Python API, this tool is\nthe ultimate solution for efficient and streamlined thumbnail creation.\n\n## Compatible with Major Video Players\n\nModern web video players use the **WebVTT** formatted files to preview thumbnails at a pointed time.\n[WebVTT](https://www.w3.org/TR/webvtt1/) is a format for displaying timed text tracks (such as subtitles or captions).\nOpen-source video players such as [Plyr](https://github.com/sampotts/plyr), [Video.js](https://github.com/videojs/video.js),\n[Flowplayer](https://github.com/flowplayer/flowplayer), [Fluid Player](https://github.com/fluid-player/fluid-player),\nand more, use this format for showing the thumbnails. And, with the use of [external plugins](https://github.com/brightcove/videojs-thumbnails),\nVideo.js even has the capability to handle **JSON** formatted thumbnail metadata. This is where our tool comes in,\noffering the ability to generate the perfect thumbnails to match your needs.\n\n## Features\n\n- Wide-ranging video format compatibility, accommodating all major video formats as input files. (mp4, mkv, avi, mov, ogv, webm, mpeg, mpg, wmv, etc.)\n- Flexible output options, supporting both WebVTT and JSON formats.\n- Generating video thumbnails through the CLI and the Python API.\n- Customize your thumbnail creation to fit your specific needs with various options.\n- Image compression technology, ensuring optimized file sizes for quick and efficient loading times.\n\n## How to Use?\n\n### CLI Tool Usage\n\nThe CLI is a convenient way to generate thumbnails for a video file. And it accepts files or directories as arguments.\nFor the complete list of options, run `thumbnails --help`.\n\n```bash\nthumbnails --base /media/ --output /var/www/movie.com/media/thumbnails/ --interval 5 ~Videos/movies\n```\n\n### Python API Usage\n\nThe Python API provides a flexible way to integrate video thumbnail generation into your existing applications.\nBoth the CLI and the Python API share the same set of options.\n\n```python\nfrom thumbnails import Generator\n\ninputs = (\n    \"~Downloads/movie.mp4\",\n    \"~Videos/movies/1.avi\",\n    \"~Videos/movies/2.ogv\",\n)\n\ngenerator = Generator(inputs)\ngenerator.base = \"/media/\"\ngenerator.skip = True  # skip existing thumbnails\ngenerator.output = \"/var/www/movie.com/media/thumbnails/\"\ngenerator.interval = 5\ngenerator.generate()\n```\n\n## Development\n\nRun the following command in the package's root directory to install it in editable mode.\n```bash\npython3 -m pip install -e .\n```\nThis command will install the package in your local environment and allow you to make changes to the code and see the\nupdates immediately. It will also install all the required dependencies.\n\n## Contribute\n\nEveryone is welcome to contribute to this project. Please read and follow the [contribution guidelines](CONTRIBUTING.md)\nbefore you start. Contributions can be considered:\n- Reporting an issue\n- Opening a pull-request\n- Suggesting an idea at [discussions](https://github.com/pysnippet/thumbnails/discussions)\n- Starring the repository if you like it\n\nBefore you open a PR, please run the unit tests in the local environment to ensure everything is working. You need to\ninstall [tox](https://github.com/tox-dev/tox) and run the tests for configured environments.\n```bash\npython3 -m pip install tox && tox\n```\n\nIf you want to run tests only for the current environment with your local Python interpreter, you can use the following\ncommands.\n\n```bash\npython3 -m pip install -r tests/requirements.txt\npython3 -m pytest\n```\n\n## License\n\nCopyright (C) 2023 Artyom Vancyan. [Apache 2.0](https://github.com/pysnippet/thumbnails/blob/master/LICENSE)\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Video thumbnail generator for modern web video players such as Plyr, Videojs, Flowplayer, Fluid Player, etc.",
    "version": "0.1.12",
    "project_urls": {
        "Homepage": "https://github.com/pysnippet/thumbnails"
    },
    "split_keywords": [
        "vtt",
        "json",
        "plyr",
        "video",
        "fluid",
        "player",
        "videojs",
        "thumbnail",
        "generator",
        "flowplayer",
        "thumbnails",
        "thumbnail-generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "178e12605b9de5044cab416a3d2a701c77fcdbedeab0ae7720dd72bdefc417f3",
                "md5": "f4169a5137c94a3c43cbd310d16cc516",
                "sha256": "826a671ba23fb5f7ddcc30b68a1fff576163d01d476531a1e8c6ffea53bb98cb"
            },
            "downloads": -1,
            "filename": "thumbnails-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f4169a5137c94a3c43cbd310d16cc516",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18052,
            "upload_time": "2024-03-03T10:02:28",
            "upload_time_iso_8601": "2024-03-03T10:02:28.277492Z",
            "url": "https://files.pythonhosted.org/packages/17/8e/12605b9de5044cab416a3d2a701c77fcdbedeab0ae7720dd72bdefc417f3/thumbnails-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0351f0b43f939617c2a1cab23d38c2f27ad7fe37ce959c0b3fe66090f9c629a",
                "md5": "c908adeae4ed2ab0508be5a648e63817",
                "sha256": "f31a97fb7ae7dca945e4c13d0ea0d6062fe68c7df735a2516d289c5da3a6b4a4"
            },
            "downloads": -1,
            "filename": "thumbnails-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "c908adeae4ed2ab0508be5a648e63817",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 18242,
            "upload_time": "2024-03-03T10:02:29",
            "upload_time_iso_8601": "2024-03-03T10:02:29.956059Z",
            "url": "https://files.pythonhosted.org/packages/c0/35/1f0b43f939617c2a1cab23d38c2f27ad7fe37ce959c0b3fe66090f9c629a/thumbnails-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-03 10:02:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pysnippet",
    "github_project": "thumbnails",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "tox": true,
    "lcname": "thumbnails"
}
        
Elapsed time: 0.22512s