{"id":16412578,"url":"https://github.com/0x48piraj/smearhash","last_synced_at":"2025-10-06T22:58:07.111Z","repository":{"id":218547009,"uuid":"746714685","full_name":"0x48piraj/smearhash","owner":"0x48piraj","description":"A hashing algorithm to create compact representations of videos.","archived":false,"fork":false,"pushed_at":"2024-01-28T19:46:32.000Z","size":84,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T22:58:06.552Z","etag":null,"topics":["blur","data-manipulation","hashing-algorithm","placeholder","video"],"latest_commit_sha":null,"homepage":"https://piyushraj.org/projects/smearhash","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/0x48piraj.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-22T14:30:20.000Z","updated_at":"2025-07-24T15:55:22.000Z","dependencies_parsed_at":"2024-11-10T02:03:45.155Z","dependency_job_id":null,"html_url":"https://github.com/0x48piraj/smearhash","commit_stats":null,"previous_names":["0x48piraj/smearhash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0x48piraj/smearhash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x48piraj%2Fsmearhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x48piraj%2Fsmearhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x48piraj%2Fsmearhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x48piraj%2Fsmearhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x48piraj","download_url":"https://codeload.github.com/0x48piraj/smearhash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x48piraj%2Fsmearhash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278692917,"owners_count":26029405,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blur","data-manipulation","hashing-algorithm","placeholder","video"],"created_at":"2024-10-11T06:49:18.425Z","updated_at":"2025-10-06T22:58:07.097Z","avatar_url":"https://github.com/0x48piraj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmearHash\n\nIn today's era, video dominates our world. SmearHash is a compact representation of a placeholder for a video. It's similar to BlurHash but with the following advantages:\n\n- Encodes more detail in the same space\n- Encodes the aspect ratio\n- Gives more accurate colors\n- **It's for videos!**\n\n\n## Why would you want this?\n\n- Does your designer cry every time you load their beautifully designed screen, which is full of empty boxes because all the videos have not loaded yet?\n\n- Does your database engineer cry when you want to solve this by trying to cram little video reels into your data to show as placeholders?\n\n**SmearHash** will solve your problems! How? Like this:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/woltapp/blurhash/master/Media/WhyBlurHash.png\" /\u003e\n    \u003csub\u003eCredits to \u003ca href=\"https://github.com/woltapp/blurhash\" target=\"_blank\"\u003e@WoltApp/BlurHash\u003c/a\u003e developers for this, clearly I am no designer.\u003c/sup\u003e\n\u003c/p\u003e\n\n\n## Is this only useful as a video-loading placeholder?\n\nWell, that is what it's designed for originally, but it turns out to be useful for a few other things:\n\n- Masking videos without having to use expensive blurs\n\n- The data representation makes it quite easy to extract color features of the video for different areas.\n\nYou can also see the demo and try it out at [@raj/smearhash](https://piyushraj.org/smearhash).\n\n\n## How does it work?\n\nIn short, SmearHash takes a video, and gives you a short list of strings (only 20-30 characters!) that represents the placeholder for that video. You do this on the backend of your service, and store the strings list along with the video. When you send media to your client, you send both the URL to the video, and the SmearHash strings list. Your client then takes the list, and decodes it into an video that it shows while the real video is loading over the network. The strings are short enough that it comfortably fits into whatever data format you use. For instance, it can easily be added as a field in a JSON object.\n\n### In summary:\n\nWant to know all the gory technical details? Read the [algorithm description](Algorithm.md).\n\nImplementing the algorithm is actually quite easy! Implementations are short and easily ported to your favourite language or platform.\n\n## Implementations\n\nSo far, we have created these implementations:\n\n* [JavaScript](jSmearHash) - Decoder implementation, animation library and a demo.\n* [Python](smearhash) - Encoder and decoder implementations, and a larger library offering advanced features.\n\nThese cover our use cases, but could probably use polishing, extending and improving. There are also these third party implementations that we know of:\n\n* _Your designed implementation here?_\n\nCan't find the language you're looking for? Try your luck with the GitHub search. For example, here are the search results for [repos which have \"smearhash\" in their name](https://github.com/search?q=smearhash+in%3Aname\u0026type=repositories).\n\nPerhaps you'd like to help extend this list? Which brings us to...\n\n## Contributing\n\nWe'd love contributions! The algorithm is [very simple](Algorithm.md) - less than two hundred lines of code - and can easily be\nported to your platform of choice. And having support for more platforms would be wonderful! So, Java decoder? Golang encoder?\nHaskell? Rust? We want them all!\n\nWe will also try to tag any issues on our [issue tracker](https://github.com/0x48piraj/smearhash/issues) that we'd love help with, so\nif you just want to dip in, go have a look.\n\nYou're welcome to submit a pull request to our repository or initiate your own project to handle everything independently (just mention us for reference). We're open to both options.\n\n\n## Users\n\nWho uses SmearHash? Here are some projects we know about:\n\n* I'm ofcourse using it myself. SmearHashes are used in different personal projects as placeholders during video loading.\n\n\n* _Your name here?_\n\n\n### Fun fact\n\nThe project got its name from a technique called [Smear framing](https://en.wikipedia.org/wiki/Smear_frame).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x48piraj%2Fsmearhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x48piraj%2Fsmearhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x48piraj%2Fsmearhash/lists"}