{"id":13607758,"url":"https://github.com/yahoo/hecate","last_synced_at":"2025-04-04T20:15:43.766Z","repository":{"id":39351645,"uuid":"65501204","full_name":"yahoo/hecate","owner":"yahoo","description":"Automagically generate thumbnails, animated GIFs, and summaries from videos","archived":false,"fork":false,"pushed_at":"2023-05-20T20:10:42.000Z","size":1959,"stargazers_count":493,"open_issues_count":2,"forks_count":115,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-28T19:12:37.653Z","etag":null,"topics":["animated-gifs","hecate","keyframes","shot-boundary-detection","thumbnail-images","video-summaries"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yahoo.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,"governance":null}},"created_at":"2016-08-11T20:59:28.000Z","updated_at":"2025-03-13T22:00:36.000Z","dependencies_parsed_at":"2023-01-19T03:16:22.238Z","dependency_job_id":"14d754b9-55b5-4d0a-ac4b-513a79d6b8fc","html_url":"https://github.com/yahoo/hecate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fhecate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fhecate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fhecate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fhecate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yahoo","download_url":"https://codeload.github.com/yahoo/hecate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242681,"owners_count":20907134,"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":["animated-gifs","hecate","keyframes","shot-boundary-detection","thumbnail-images","video-summaries"],"created_at":"2024-08-01T19:01:21.318Z","updated_at":"2025-04-04T20:15:43.748Z","avatar_url":"https://github.com/yahoo.png","language":"C++","readme":"# HECATE\nHecate [hek-uh-tee] is a video processing library that auto-magically generates thumbnails, animated GIFs, and video summaries from videos. This library is developed and maintained by Yahoo Research, New York.\n\nThe source code is Copyright 2016 Yahoo Inc. and is licensed under the terms of the Apache 2.0 License. See the [LICENSE](https://github.com/yahoo/hecate/blob/master/LICENSE) in the project root file for terms.\n\nThe technology behind this library is based on our research work. If you find this library useful in your work, we ask you to cite our research paper:\n```\n\"To Click or Not To Click: Automatic Selection of Beautiful Thumbnails from Videos.\"\nYale Song, Miriam Redi, Jordi Vallmitjana, Alejandro Jaimes, \nProceedings of the 25th ACM International on Conference on Information and Knowledge Management, CIKM 2016\n```\n\n## Installation\nHecate has one dependency: [OpenCV library](https://github.com/opencv/opencv) with an [FFMPEG](https://github.com/FFmpeg/FFmpeg) support. You will need to install the library properly before trying out Hecate!\n\nOnce you install the dependenct library correctly, follow the instruction below:\n```\n$ git clone https://github.com/yahoo/hecate.git\n$ cd hecate\n$ vim Makefile.config\n - Set INCLUDE_DIRS and LIBRARY_DIRS to where your \n   opencv library is installed. Usually under /usr/local.\n - If your OpenCV version is 2.4.x, comment out the line \n   OPENCV_VERSION := 3\n - Save and exit\n$ make all\n$ make distribute\n```\n\nOnce you've successfully compiled hecate, it will generate a binary executable under `distribute/bin/`. Run the following command to check if everything works properly:\n```\n$ ./distribute/bin/hecate\n\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n HECATE Copyright 2016 Yahoo Inc.\n   Licensed under the terms of the Apache 2.0 License.\n   Developed by : Yale Song (yalesong@yahoo-inc.com)\n   Built on  : 11:46:03 Aug 11 2016\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nUSAGE: hecate -i infile [options]\n\n  -i  --in_video      (string)    Input video file\n  -o  --out_dir       (string)    Output directory (./output)\n  -s  --step          (int)       Frame subsampling step size (1)\n  -n  --njpg          (int)       Number of thumbnails to be generated (5)\n  -q  --ngif          (int)       Number of GIFs to be generated (5)\n  -r  --lmov          (int)       Length of video summary to be generated (in seconds) (15)\n  -u  --jpg_width_px  (int)       Pixel width of thumbnail images (360)\n  -v  --gif_width_px  (int)       Pixel width of animated GIFs (360)\n  -w  --mov_width_px  (int)       Pixel width of summary video (360)\n  --generate_jpg                  Generate thumbnail images\n  --generate_gif                  Generate animated GIFs\n  --generate_mov                  Generate a summary video\n  --generate_gifsum               Generate animated GIFs summary\n  --generate_gifall               Generate all possible animated GIFs\n  --print_shot_info               Print shot boundary detection results\n  --print_keyfrm_info             Print keyframe indices\n```\n\nCongratulations! You have successfully installed hecate!\n\n\n## Get started\nIn order to get started, we will need a video file to play with. In this example, we will use the video [\"The Spirit of '43\" by Walt Disney](https://archive.org/details/TheSpiritOf43_56) from [The Internet Archive](https://archive.org). \n\nLet's download the video and save it as `examples/video.mp4`:\n```\n$ wget https://archive.org/download/TheSpiritOf43_56/The_Spirit_of__43_512kb.mp4 \\\n  --output-document examples/video.mp4 --no-check-certificate\n```\n\nHecate provides three main functionalities through a binary executable `hecate`: Thumbnail extraction, GIF generation, and video summarization. There are various other functionalities the library provides, such as shot boundary detection and keyframe extraction. \n\nWe will explain each case below.\n\n### Shot boundary detection and keyframe extraction\nShot boundary detection and keyframe extraction are often the first steps towards various video processing methods. With Hecate, obtaining shot and keyframe information is easier than ever! Simply run the following command to get the result:\n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --print_shot_info  --print_keyfrm_info\n```\n\nBelow is the results we obtained on our dev machine (OS X 10.10 with OpenCV v3.1):\n```\nshots: [0:81],[84:93],[96:102],[108:270],[272:418],...,[9966:10131],[10135:10164]\nkeyframes: [52,85,98,128,165,208,242,259,265,273,...,10127,10141]\n```\nThe units are frame indices (zero-based). You will notice that shot ranges are non-continuous; there are \"gaps\" between shots, e.g., two frames are missing between the first two shots [0:81] and [84:93]. This is normal and intentional: Hecate discards low-quality frames that aren't ideal in producing nicely looking thumbnails, animated GIFs, and video summaries. We refer to our CIKM 2016 paper for the rational behind our reason to invalidate low-quality frames.\n\n### Thumbnail generation\nHecate uses computer vision to determine frames that are most \"suitable\" as video thumbnails. By suitable, we mean a frame that is the most relevant to the video content and that is the most beautiful in terms of computational aesthetics; technical details are explained in our CIKM 2016 paper.\n\nYou can generate thumbnail images using Hecate. Run the following command to generate one thumbnail image from the video.\n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --generate_jpg --njpg 1\n```\nYou will see the generated thumbnail image under the output directory (set as `output` by default; you can change this using the option `--out_dir YOUR_DIRECTORY`). On our dev machine we get this thumbnail image:\n\n![alt text](https://github.com/yahoo/hecate/blob/master/examples/video_00.jpg \"Hecate Thumbnail Image\")\n\nIn the above example, we generated only one thumbnail image. Are you not satisfied with the thumbnail image? Hecate can generate any number of thunbmail images! Let's generate five thumbnail images.\n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --generate_jpg --njpg 3\n```\n\nThe output files are named `\u003cvideo_filename\u003e_\u003crank\u003e.jpg`. The files are ranked by their quality (rank 0 means it's the best one).\n\n### Animated GIF generation\nDo you want to create animated GIFs from a video without the hassle of using manual tools? Hecate can automatically create them for you! Run the following command to create one animated GIF from the video.\n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --generate_gif --ngif 1\n```\nOn our dev machine, we get this animated GIF:\n\n![alt text](https://github.com/yahoo/hecate/blob/master/examples/video_00.gif \"Hecate Animated GIF\")\n\nYou can, of course, create more than just one GIF by setting the paramter `--ngif N` with an appropriate number N. When there are multiple GIFs, you can also generate a \"summary GIF\" by concatenating them, using this command:\n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --generate_gif --ngif 3 --generate_gifsum\n```\n\nIf you'd rather want to obtain all available GIFs from the video, use the following command: \n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --generate_gifall\n```\n\n### Video summary generation\nLast but not least, Hecate can summarize a video! Run the following command to create a video summary of length 15 seconds.\n```\n$ ./distribute/bin/hecate -i examples/video.mp4 --generate_mov --lmov 15\n```\nWe included the video summary generated on our dev machine here: \n[https://github.com/yahoo/hecate/blob/master/examples/video_sum.mp4](https://github.com/yahoo/hecate/blob/master/examples/video_sum.mp4)\n\n\n## Developer\n\nYale Song: [github](https://github.com/yalesong), [website](http://people.csail.mit.edu/yalesong)\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fhecate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyahoo%2Fhecate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fhecate/lists"}