# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['vcsi']

package_data = \
{'': ['*']}

install_requires = \
['jinja2>=3.1.2,<4.0.0',
 'numpy>=1.24.3,<2.0.0',
 'parsedatetime>=2.6,<3.0',
 'pillow>=9.5.0,<10.0.0',
 'texttable>=1.6.7,<2.0.0']

entry_points = \
{'console_scripts': ['vcsi = vcsi.vcsi:main']}

setup_kwargs = {
    'name': 'vcsi',
    'version': '7.0.15',
    'description': 'Create video contact sheets, thumbnails, screenshots',
    'long_description': '# vcsi\n\n![Build Status](https://github.com/amietn/vcsi/actions/workflows/testing.yml/badge.svg)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n[![PyPI version](https://badge.fury.io/py/vcsi.svg)](https://badge.fury.io/py/vcsi)\n\nCreate video contact sheets. A video contact sheet is an image composed of video capture thumbnails arranged on a grid.\n\n## Examples\n\n```\n$ vcsi bbb_sunflower_2160p_60fps_normal.mp4 \\\n-t \\\n-w 850 \\\n-g 4x4 \\\n--background-color 000000 \\\n--metadata-font-color ffffff \\\n--end-delay-percent 20 \\\n--metadata-font /usr/share/fonts/TTF/DejaVuSans-Bold.ttf\n```\n![Image](<http://i.imgur.com/rAItOp3.png>)\n\n```\n$ vcsi bbb_sunflower_2160p_60fps_normal.mp4 \\\n-t \\\n-w 850 \\\n-g 3x5 \\\n--end-delay-percent 20 \\\n--timestamp-font /usr/share/fonts/TTF/DejaVuSans.ttf \\\n-o output.png\n```\n![Image](<http://i.imgur.com/TA4JXal.jpg>)\n\n\nThe above contact sheets were generated from a movie called "Big Buck Bunny".\n\n## Installation\n\n### PyPi\n\n`vcsi` can be installed from PyPi:\n\n```\n$ pip install vcsi\n```\n\n### Poetry\n\nFirst install [Poetry](https://python-poetry.org/docs/#installation), then run:\n\n```\n$ poetry build\n$ pip install dist/*.whl\n```\n\n### Distribution packages\n\nvcsi is currently packaged for the following systems:\n\n| Linux packages | |\n| -------------- | --- |\n| Arch (AUR) | https://aur.archlinux.org/packages/vcsi/ |\n| Arch (AUR, git master) | https://aur.archlinux.org/packages/vcsi-git/ |\n| Gentoo | https://packages.gentoo.org/packages/media-video/vcsi |\n\nYour system is not listed?\n\n```\n$ apt-get install ffmpeg\n```\n\nThen use the Poetry installation method above.\n\nRunning Windows? See the note below.\n\n\n## Note for Windows users\n\nDownload a binary build of ffmpeg from Zeranoe here (e.g. 64bit static): http://ffmpeg.zeranoe.com/builds/\n\nExtract the archive and add the `bin` directory to your PATH so that `ffmpeg` and `ffprobe` can be invoked from the command line.\n\nIf you have issues installing numpy with pip, download an already built version of numpy here: http://sourceforge.net/projects/numpy/files/NumPy/\n\n\n## Requirements\n\nPython modules:\n\n* numpy\n* pillow\n* jinja2\n* texttable\n* parsedatetime\n\n\nMust be in your PATH:\n\n* ffmpeg\n* ffprobe\n\n\n## Usage\n\n```\n$ vcsi -h\nusage: vcsi [-h] [-o OUTPUT_PATH] [-c CONFIG]\n            [--start-delay-percent START_DELAY_PERCENT]\n            [--end-delay-percent END_DELAY_PERCENT]\n            [--delay-percent DELAY_PERCENT] [--grid-spacing GRID_SPACING]\n            [--grid-horizontal-spacing GRID_HORIZONTAL_SPACING]\n            [--grid-vertical-spacing GRID_VERTICAL_SPACING] [-w VCS_WIDTH]\n            [-g GRID] [-s NUM_SAMPLES] [-t]\n            [--metadata-font-size METADATA_FONT_SIZE]\n            [--metadata-font METADATA_FONT]\n            [--timestamp-font-size TIMESTAMP_FONT_SIZE]\n            [--timestamp-font TIMESTAMP_FONT]\n            [--metadata-position METADATA_POSITION]\n            [--background-color BACKGROUND_COLOR]\n            [--metadata-font-color METADATA_FONT_COLOR]\n            [--timestamp-font-color TIMESTAMP_FONT_COLOR]\n            [--timestamp-background-color TIMESTAMP_BACKGROUND_COLOR]\n            [--timestamp-border-color TIMESTAMP_BORDER_COLOR]\n            [--template METADATA_TEMPLATE_PATH] [-m MANUAL_TIMESTAMPS] [-v]\n            [-a] [-A ACCURATE_DELAY_SECONDS]\n            [--metadata-margin METADATA_MARGIN]\n            [--metadata-horizontal-margin METADATA_HORIZONTAL_MARGIN]\n            [--metadata-vertical-margin METADATA_VERTICAL_MARGIN]\n            [--timestamp-horizontal-padding TIMESTAMP_HORIZONTAL_PADDING]\n            [--timestamp-vertical-padding TIMESTAMP_VERTICAL_PADDING]\n            [--timestamp-horizontal-margin TIMESTAMP_HORIZONTAL_MARGIN]\n            [--timestamp-vertical-margin TIMESTAMP_VERTICAL_MARGIN]\n            [--quality IMAGE_QUALITY] [-f IMAGE_FORMAT]\n            [-T TIMESTAMP_POSITION] [-r] [--timestamp-border-mode]\n            [--timestamp-border-size TIMESTAMP_BORDER_SIZE]\n            [--capture-alpha CAPTURE_ALPHA] [--version]\n            [--list-template-attributes] [--frame-type FRAME_TYPE]\n            [--interval INTERVAL] [--ignore-errors] [--no-overwrite]\n            [--exclude-extensions EXCLUDE_EXTENSIONS] [--fast]\n            [-O THUMBNAIL_OUTPUT_PATH] [-S]\n            [--timestamp-format TIMESTAMP_FORMAT]\n            filenames [filenames ...]\n\nCreate a video contact sheet\n\npositional arguments:\n  filenames\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -o OUTPUT_PATH, --output OUTPUT_PATH\n                        save to output file (default: None)\n  -c CONFIG, --config CONFIG\n                        Config file to load defaults from (default:\n                        C:\\Users\\zacke\\.config/vcsi.conf)\n  --start-delay-percent START_DELAY_PERCENT\n                        do not capture frames in the first n percent of total\n                        time (default: 7)\n  --end-delay-percent END_DELAY_PERCENT\n                        do not capture frames in the last n percent of total\n                        time (default: 7)\n  --delay-percent DELAY_PERCENT\n                        do not capture frames in the first and last n percent\n                        of total time (default: None)\n  --grid-spacing GRID_SPACING\n                        number of pixels spacing captures both vertically and\n                        horizontally (default: None)\n  --grid-horizontal-spacing GRID_HORIZONTAL_SPACING\n                        number of pixels spacing captures horizontally\n                        (default: 5)\n  --grid-vertical-spacing GRID_VERTICAL_SPACING\n                        number of pixels spacing captures vertically (default:\n                        5)\n  -w VCS_WIDTH, --width VCS_WIDTH\n                        width of the generated contact sheet (default: 1500)\n  -g GRID, --grid GRID  display frames on a mxn grid (for example 4x5). The\n                        special value zero (as in 2x0 or 0x5 or 0x0) is only\n                        allowed when combined with --interval or with\n                        --manual. Zero means that the component should be\n                        automatically deduced based on other arguments passed.\n                        (default: 4x4)\n  -s NUM_SAMPLES, --num-samples NUM_SAMPLES\n                        number of samples (default: None)\n  -t, --show-timestamp  display timestamp for each frame (default: False)\n  --metadata-font-size METADATA_FONT_SIZE\n                        size of the font used for metadata (default: 16)\n  --metadata-font METADATA_FONT\n                        TTF font used for metadata (default:\n                        C:/Windows/Fonts/msgothic.ttc)\n  --timestamp-font-size TIMESTAMP_FONT_SIZE\n                        size of the font used for timestamps (default: 12)\n  --timestamp-font TIMESTAMP_FONT\n                        TTF font used for timestamps (default:\n                        C:/Windows/Fonts/msgothic.ttc)\n  --metadata-position METADATA_POSITION\n                        Position of the metadata header. Must be one of\n                        [\'top\', \'bottom\', \'hidden\'] (default: top)\n  --background-color BACKGROUND_COLOR\n                        Color of the background in hexadecimal, for example\n                        AABBCC (default: 000000FF)\n  --metadata-font-color METADATA_FONT_COLOR\n                        Color of the metadata font in hexadecimal, for example\n                        AABBCC (default: FFFFFFFF)\n  --timestamp-font-color TIMESTAMP_FONT_COLOR\n                        Color of the timestamp font in hexadecimal, for\n                        example AABBCC (default: FFFFFFFF)\n  --timestamp-background-color TIMESTAMP_BACKGROUND_COLOR\n                        Color of the timestamp background rectangle in\n                        hexadecimal, for example AABBCC (default: 000000AA)\n  --timestamp-border-color TIMESTAMP_BORDER_COLOR\n                        Color of the timestamp border in hexadecimal, for\n                        example AABBCC (default: 000000FF)\n  --template METADATA_TEMPLATE_PATH\n                        Path to metadata template file (default: None)\n  -m MANUAL_TIMESTAMPS, --manual MANUAL_TIMESTAMPS\n                        Comma-separated list of frame timestamps to use, for\n                        example 1:11:11.111,2:22:22.222 (default: None)\n  -v, --verbose         display verbose messages (default: False)\n  -a, --accurate        Make accurate captures. This capture mode is way\n                        slower than the default one but it helps when\n                        capturing frames from HEVC videos. (default: False)\n  -A ACCURATE_DELAY_SECONDS, --accurate-delay-seconds ACCURATE_DELAY_SECONDS\n                        Fast skip to N seconds before capture time, then do\n                        accurate capture (decodes N seconds of video before\n                        each capture). This is used with accurate capture mode\n                        only. (default: 1)\n  --metadata-margin METADATA_MARGIN\n                        Margin (in pixels) in the metadata header. (default:\n                        10)\n  --metadata-horizontal-margin METADATA_HORIZONTAL_MARGIN\n                        Horizontal margin (in pixels) in the metadata header.\n                        (default: 10)\n  --metadata-vertical-margin METADATA_VERTICAL_MARGIN\n                        Vertical margin (in pixels) in the metadata header.\n                        (default: 10)\n  --timestamp-horizontal-padding TIMESTAMP_HORIZONTAL_PADDING\n                        Horizontal padding (in pixels) for timestamps.\n                        (default: 3)\n  --timestamp-vertical-padding TIMESTAMP_VERTICAL_PADDING\n                        Vertical padding (in pixels) for timestamps. (default:\n                        1)\n  --timestamp-horizontal-margin TIMESTAMP_HORIZONTAL_MARGIN\n                        Horizontal margin (in pixels) for timestamps.\n                        (default: 5)\n  --timestamp-vertical-margin TIMESTAMP_VERTICAL_MARGIN\n                        Vertical margin (in pixels) for timestamps. (default:\n                        5)\n  --quality IMAGE_QUALITY\n                        Output image quality. Must be an integer in the range\n                        0-100. 100 = best quality. (default: 100)\n  -f IMAGE_FORMAT, --format IMAGE_FORMAT\n                        Output image format. Can be any format supported by\n                        pillow. For example \'png\' or \'jpg\'. (default: jpg)\n  -T TIMESTAMP_POSITION, --timestamp-position TIMESTAMP_POSITION\n                        Timestamp position. Must be one of [\'north\', \'south\',\n                        \'east\', \'west\', \'ne\', \'nw\', \'se\', \'sw\', \'center\'].\n                        (default: TimestampPosition.se)\n  -r, --recursive       Process every file in the specified directory\n                        recursively. (default: False)\n  --timestamp-border-mode\n                        Draw timestamp text with a border instead of the\n                        default rectangle. (default: False)\n  --timestamp-border-size TIMESTAMP_BORDER_SIZE\n                        Size of the timestamp border in pixels (used only with\n                        --timestamp-border-mode). (default: 1)\n  --capture-alpha CAPTURE_ALPHA\n                        Alpha channel value for the captures (transparency in\n                        range [0, 255]). Defaults to 255 (opaque) (default:\n                        255)\n  --version             show program\'s version number and exit\n  --list-template-attributes\n  --frame-type FRAME_TYPE\n                        Frame type passed to ffmpeg\n                        \'select=eq(pict_type,FRAME_TYPE)\' filter. Should be\n                        one of (\'I\', \'B\', \'P\') or the special type \'key\' which\n                        will use the \'select=key\' filter instead. (default:\n                        None)\n  --interval INTERVAL   Capture frames at specified interval. Interval format\n                        is any string supported by `parsedatetime`. For\n                        example \'5m\', \'3 minutes 5 seconds\', \'1 hour 15 min\n                        and 20 sec\' etc. (default: None)\n  --ignore-errors       Ignore any error encountered while processing files\n                        recursively and continue to the next file. (default:\n                        False)\n  --no-overwrite        Do not overwrite output file if it already exists,\n                        simply ignore this file and continue processing other\n                        unprocessed files. (default: False)\n  --exclude-extensions EXCLUDE_EXTENSIONS\n                        Do not process files that end with the given\n                        extensions. (default: [])\n  --fast                Fast mode. Just make a contact sheet as fast as\n                        possible, regardless of output image quality. May mess\n                        up the terminal. (default: False)\n  -O THUMBNAIL_OUTPUT_PATH, --thumbnail-output THUMBNAIL_OUTPUT_PATH\n                        Save thumbnail files to the specified output\n                        directory. If set, the thumbnail files will not be\n                        deleted after successful creation of the contact\n                        sheet. (default: None)\n  -S, --actual-size     Make thumbnails of actual size. In other words,\n                        thumbnails will have the actual 1:1 size of the video\n                        resolution. (default: False)\n  --timestamp-format TIMESTAMP_FORMAT\n                        Use specified timestamp format. Replaced values\n                        include: {TIME}, {DURATION}, {THUMBNAIL_NUMBER}, {H}\n                        (hours), {M} (minutes), {S} (seconds), {c}\n                        (centiseconds), {m} (milliseconds), {dH}, {dM}, {dS},\n                        {dc} and {dm} (same as previous values but for the\n                        total duration). Example format: \'{TIME} /\n                        {DURATION}\'. Another example: \'{THUMBNAIL_NUMBER}\'.\n                        Yet another example: \'{H}:{M}:{S}.{m} /\n                        {dH}:{dM}:{dS}.{dm}\'. (default: {TIME})\n\n\n```\n\n## Metadata templates\n\n`vcsi` now supports metadata templates thanks to jinja2. In order to use custom templates one should use the `--template` argument to specifiy the path to a template file.\n\nHere is a sample template file:\n\n```\n{{filename}}\nFile size: {{size}}\n{% if audio_sample_rate %}\nAudio sample rate: {{audio_sample_rate/1000}} KHz\n{% endif %}\n\n{% if audio_bit_rate %}\nAudio bitrate: {{audio_bit_rate/1000}} Kbps\n{% endif %}\n\n{{frame_rate}} fps\n\nResolution: {{sample_width}}x{{sample_height}}\n```\n\n## Exposed metadata template attributes\n\n| Attribute name | Description | Example |\n| --- | --- | --- |\n| size | File size (pretty format) | 128.3 MiB |\n| size_bytes | File size (bytes) | 4662788373 |\n| filename | File name | video.mkv |\n| duration | Duration (pretty format) | 03:07 |\n| sample_width | Width of samples (pixels) | 1920 |\n| sample_height | Height of samples (pixels) | 1080 |\n| display_width | Display width (pixels) | 1920 |\n| display_height | Display height (pixels) | 1080 |\n| video_codec | Video codec | h264 |\n| video_codec_long | Video codec (long name) | H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 |\n| video_bit_rate | Video bitrate | 371006 |\n| display_aspect_ratio | Display aspect ratio | 16:9 |\n| sample_aspect_ratio | Sample aspect ratio | 1:1 |\n| audio_codec | Audio codec | aac |\n| audio_codec_long | Audio codec (long name) | AAC (Advanced Audio Coding) |\n| audio_sample_rate | Audio sample rate (Hz) | 44100 |\n| audio_bit_rate | Audio bit rate | 192000 |\n| frame_rate | Frame rate (fps) | 23.974 |\n\n\n## Testing\n\nTo run the test suite, run:\n\n```\npoetry run pytest\n```\n\nTo measure code coverage:\n\n```\npoetry run pytest --cov=vcsi.vcsi\n```',
    'author': 'Nils Amiet',
    'author_email': 'amietn@foobar.tld',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'None',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.8,<4.0',
}


setup(**setup_kwargs)
