{ "info": { "author": "Antonio Verdone", "author_email": "averdones@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Quick guide\n## Installation\n pip install video-kf\n## Usage\nOpen a command line, or a terminal, from the same directory where your video is located and run:\n\n video-kf \"My_video.mp4\"\n\nIf the command line was open in a different directory from where the video is located, then the full path would be \nneeded.\n\n# Extended documentation\nVideo-kf is a Python package that can be run either from the command line, or from inside Python, by importing it.\nIt extracts the most relevant keyframes of a video, based on different methods.\n\nAt the moment, there are 3 methods available:\n\n- **iframes**: it extracts the [iframes](https://en.wikipedia.org/wiki/Video_compression_picture_types) of the video, \ncalculated by ffmpeg. This is the default option.\n\n Use in the command line:\n\n ```\n video-kf \"My_video.mp4\"\n ```\n\n or\n\n ```\n video-kf \"My_video.mp4\" -m \"iframes\"\n ```\n\n Use inside Python:\n\n ```python\n import videokf as vf\n\n vf.extract_keyframes(\"My_video.mp4\")\n ```\n\n or\n\n ```python\n import videokf as vf\n\n vf.extract_keyframes(\"My_video.mp4\", method=\"iframes\")\n ```\n\n- **color**: it returns the average frame, based on color, of every shot sequence. Shot sequences are group of frames \nthat start with an iframe.\n\n Use in the command line:\n\n ```\n video-kf \"My_video.mp4\" -m \"color\"\n ```\n\n Use inside Python:\n\n ```python\n import videokf as vf\n\n vf.extract_keyframes(\"My_video.mp4\", method=\"color\")\n ```\n\n- **flow**: it returns the most still frame with respect of the previous frame of every shot sequence. Shot sequences \nare group of frames that start with an iframe.\n\n Use in the command line:\n\n ```\n video-kf \"My_video.mp4\" -m \"flow\"\n ```\n\n Use inside Python:\n\n ```python\n import videokf as vf\n\n vf.extract_keyframes(\"My_video.mp4\", method=\"flow\")\n ```\n\n### Caution\n\nThe methods *color* and *flow* **will download all the frames** of the video. Keep in mind that if the video is long, \nthis will take time, as well as space to save the frames.\n\nThis is not the case for the method *iframes* that will only download the iframes.\n\n## Use of Ffmpeg and Ffprobe\nVideo-kf automatically downloads the executable files of *ffmpeg* and *ffprobe* and saves them, by default, in a \nfolder called \"Ffmpeg\" located in your *home* directory. You can choose to save the executable files in a different \nlocation by running:\n\n```\nvideo-kf \"My_video.mp4\" -dir \"PATH_RO_A_DIFFERENT_LOCATION\"\n```\n\nIf you already have *ffmpeg* or *ffprobe* installed, you can also use your own executable files. There are various ways \nof doing this, all of them equivalent. Choose the one that best suits you:\n\n- Using the command line options *ffmpeg* and *ffprobe* (you can choose to use just one of the two):\n\n ```\n video-kf \"My_video.mp4\" -ffmpeg \"PATH_TO_FFMPEG\" -ffprobe \"PATH_TO_FFPROBE\"\n ```\n\n- Saving *ffmpeg* and *ffprobe* as environmental variables named respectively FFMPEG and FFPROBE.\n- Saving manually *ffmpeg* and *ffprobe* in the folder called \"Ffmpeg\", which by default is located in your *home* \ndirectory, and running the program normally (either in the command line or inside python). You can also choose a \ndifferent directory through the command line with the ```-dir``` option\n\n# Command line options\n positional arguments:\n video_file Path to the video file to extract the keyframes from.\n\n optional arguments:\n -h, --help show this help message and exit\n -m METHOD, --method METHOD\n Method to extract the keyframes\n -o OUTPUT_DIR_KEYFRAMES, --output_dir_keyframes OUTPUT_DIR_KEYFRAMES\n Directory where to extract keyframes. If it is a\n string instead of a directory, keyframes will be saved\n in a folder named as this string, located in the same\n directory of the video\n -ffmpeg FFMPEG, --ffmpeg FFMPEG\n Path to the Ffmpeg executable\n -ffprobe FFPROBE, --ffprobe FFPROBE\n Path to the Ffprobe executable\n -dir DIR_FFMPEG_FFPROBE, --dir_ffmpeg_ffprobe DIR_FFMPEG_FFPROBE\n Path to the directory containing both Ffmpeg and\n Ffprobe executables\n --no-frames-rm If present, this option will NOT remove the directory\n with the extracted frames, if they were extracted\n (only for 'color' and 'flow' methods)\n\n### References\n\nFFmpeg Developers. (2016). Ffmpeg tool [Software].\nAvailable from http://ffmpeg.org/\n\nBinaries obtained from: https://ffbinaries.com/readme\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/averdones/video-kf", "keywords": "keyframes iframes video extractor", "license": "", "maintainer": "", "maintainer_email": "", "name": "video-kf", "package_url": "https://pypi.org/project/video-kf/", "platform": "", "project_url": "https://pypi.org/project/video-kf/", "project_urls": { "Homepage": "https://github.com/averdones/video-kf" }, "release_url": "https://pypi.org/project/video-kf/0.0.3/", "requires_dist": [ "numpy (>=1.17)", "opencv-python (>=4)", "requests (>=2.22)" ], "requires_python": ">=3.6", "summary": "A keyframes and ffmpeg iframes extractor", "version": "0.0.3" }, "last_serial": 5767089, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "7d4665b1166ba1714008de98351554da", "sha256": "7c9ca271de831ea67be786553dc5311d580108e4c6dbace2ccd09ecf366c20b2" }, "downloads": -1, "filename": "video_kf-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7d4665b1166ba1714008de98351554da", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14562, "upload_time": "2019-09-01T12:56:33", "url": "https://files.pythonhosted.org/packages/21/dd/30113773f1eb98a7b4b18bfa153c0badcb1c89ab2b3cc56b991ec6890eb5/video_kf-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "98f6adcd63b98fda83f78bc4d27c0cbf", "sha256": "57bcf11a3da5a002804551527899ff94c0646039d7ee225f39de6302febf2b52" }, "downloads": -1, "filename": "video-kf-0.0.2.tar.gz", "has_sig": false, "md5_digest": "98f6adcd63b98fda83f78bc4d27c0cbf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10268, "upload_time": "2019-09-01T12:56:34", "url": "https://files.pythonhosted.org/packages/a6/3d/bd0d51507668f1cbd659f9f522e45d2627d419354d0b7711eef57d889119/video-kf-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7b3eed96869076be1d239b67afe447ca", "sha256": "ade371022a2b38cd831f7097488f2e008a078ff893a2df2f24bf6194c2c2546e" }, "downloads": -1, "filename": "video_kf-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7b3eed96869076be1d239b67afe447ca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14674, "upload_time": "2019-09-01T14:14:33", "url": "https://files.pythonhosted.org/packages/eb/2b/56c48babf39da35c5cc969b6106cf4e355da3577699a8fd7d765546dc1af/video_kf-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "079da387dc50a2c80281e05b380a15d3", "sha256": "40c55c2576a6ef4704e7526c1da931b88b910e7ae36a87fa74575f8061165a8b" }, "downloads": -1, "filename": "video-kf-0.0.3.tar.gz", "has_sig": false, "md5_digest": "079da387dc50a2c80281e05b380a15d3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10373, "upload_time": "2019-09-01T14:14:34", "url": "https://files.pythonhosted.org/packages/e5/07/48955f621ec2f11d61eff932f8f01df3e4381aee86d29f15b5228e4aadac/video-kf-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b3eed96869076be1d239b67afe447ca", "sha256": "ade371022a2b38cd831f7097488f2e008a078ff893a2df2f24bf6194c2c2546e" }, "downloads": -1, "filename": "video_kf-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7b3eed96869076be1d239b67afe447ca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14674, "upload_time": "2019-09-01T14:14:33", "url": "https://files.pythonhosted.org/packages/eb/2b/56c48babf39da35c5cc969b6106cf4e355da3577699a8fd7d765546dc1af/video_kf-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "079da387dc50a2c80281e05b380a15d3", "sha256": "40c55c2576a6ef4704e7526c1da931b88b910e7ae36a87fa74575f8061165a8b" }, "downloads": -1, "filename": "video-kf-0.0.3.tar.gz", "has_sig": false, "md5_digest": "079da387dc50a2c80281e05b380a15d3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10373, "upload_time": "2019-09-01T14:14:34", "url": "https://files.pythonhosted.org/packages/e5/07/48955f621ec2f11d61eff932f8f01df3e4381aee86d29f15b5228e4aadac/video-kf-0.0.3.tar.gz" } ] }