{"id":25936668,"url":"https://github.com/seatedro/glyph","last_synced_at":"2025-12-11T22:13:01.238Z","repository":{"id":254656426,"uuid":"847175800","full_name":"seatedro/glyph","owner":"seatedro","description":"convert images, video to ascii!","archived":false,"fork":false,"pushed_at":"2025-03-11T21:54:03.000Z","size":414,"stargazers_count":398,"open_issues_count":3,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-23T03:48:54.146Z","etag":null,"topics":["ascii","ascii-art","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/seatedro.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-08-25T04:22:03.000Z","updated_at":"2025-04-23T00:45:07.000Z","dependencies_parsed_at":"2024-12-07T18:24:55.224Z","dependency_job_id":"25fe6339-490f-430a-8107-c95167195b42","html_url":"https://github.com/seatedro/glyph","commit_stats":{"total_commits":54,"total_committers":3,"mean_commits":18.0,"dds":0.2407407407407407,"last_synced_commit":"38240db30522b10a7dcee1e62a0a568d89ef5f06"},"previous_names":["seatedro/asciigen","seatedro/glyph"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fglyph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fglyph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fglyph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fglyph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seatedro","download_url":"https://codeload.github.com/seatedro/glyph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"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":["ascii","ascii-art","zig"],"created_at":"2025-03-04T02:45:15.995Z","updated_at":"2025-12-11T22:12:56.211Z","avatar_url":"https://github.com/seatedro.png","language":"Zig","readme":"# glyph - ascii from media\n\nconverts images/video to ascii art\n\n\n## Dependencies\n\nthese dependencies are only for the `av` library to output videos. This will be opt-in in the future.\n\n#### Linux:\n```bash\nsudo apt-get install libavutil-dev libavformat-dev libavcodec-dev libswscale-dev\n```\n\n#### MacOS:\n```bash\nbrew install ffmpeg pkgconf\n```\n\n#### Windows:\n```bash\nchoco install ffmpeg-shared\n```\n\n## Installing\n\n#### Homebrew\n```bash\nbrew install glyph\n```\n\n### build from source\n\n`zig build -Doptimize=ReleaseFast`\n\nthe above command builds an executable found at `./zig-out/bin`\n\nif you want to just directly run the executable, run:\n\n`zig build run -Doptimize=ReleaseFast -- [options]`\n\nsee below for explanations for available options\n\n## Usage\n\nrun the program with the following options (the default zig install directory is `./zig-out/bin`):\n   ```\n   /path/to/glyph [options]\n   ```\n1. options:\n   - `-h, --help`: print the help message and exit\n   - `-i, --input \u003cfile\u003e`: specify the input media file path (local path/URL) (required)\n   - `-o, --output \u003cfile\u003e`: specify the output media file (txt/img/vid) (required)\n   - `-c, --color`: use color ascii characters (optional)\n   - `-n, --invert_color`: Inverts the color values (optional)\n   - `-s, --scale \u003cfloat\u003e`: set the downscale or upscale factor (optional, default: 1)\n   - `-e, --detect_edges`: enable edge detection (optional)\n   - `    --sigma1 \u003cfloat\u003e`: set the sigma1 value for DoG filter (optional, default: 0.3)\n   - `    --sigma2 \u003cfloat\u003e`: set the sigma2 value for DoG filter (optional, default: 1.0)\n   - `    --dither floydstein`: enable dithering (currently only supports floydstein algorithm)\n   - `-b, --brightness_boost \u003cfloat\u003e`: increase/decrease perceived brightness (optional, default: 1.0)\n   advanced options:\n   - `    --full_characters`: Uses all ascii characters in generated output.\n   - `    --ascii_chars \u003cstring\u003e`: Use what characters you want to use in the generated output. (default: \" .:-=+*%@#\")\n   - `    --disable_sort`: Prevents sorting of the ascii_chars by size.\n   - `    --block_size \u003cu8\u003e`: Set the size of the blocks. (default: 8)\n   - `    --threshold_disabled`: Disables the threshold.\n   - `    --codec \u003cstring\u003e`: Set the encoder codec like \"libx264\" or \"hevc_videotoolbox\". (default: searches for encoders on your machine)\n   - `    --keep_audio`: Preserves audio from input video.\n   - `    --stretched`: Resizes media to fit terminal window\n   - `-f, --frame_rate`: Target frame rate for video output (default: matches input fps)\n\n\u003eTo render on the terminal directly, just omit the output option.\n\n\u003eTo output to a text file, use the .txt extension when setting the output option\n\n2. examples:\n\n   ### Image\n\n   basic usage:\n   ```bash\n   glyph -i input.jpg -o output.png\n   ```\n\n   text file output:\n   ```bash\n   glyph -i input.jpg -o output.txt\n   ```\n\n   using color:\n   ```bash\n   glyph -i input.png -o output.png -c\n   ```\n\n   with edge detection, color, and custom downscale:\n   ```bash\n   glyph -i input.jpeg -o output.png -s 4 -e -c\n   ```\n\n   with brightness boost and url input:\n   ```bash\n   # bonus (this is a sweet wallpaper)\n   glyph -i \"https://w.wallhaven.cc/full/p9/wallhaven-p9gr2p.jpg\" -o output.png -e -c -b 1.5\n   ```\n\n   terminal output (just omit the output option):\n   ```bash\n   glyph -i \"https://w.wallhaven.cc/full/p9/wallhaven-p9gr2p.jpg\" -e -c -b 1.5\n   ```\n\n   ### Video\n\n   with an input video (no urls allowed):\n   ```bash\n   glyph -i /path/to/input/video.mp4 -o ascii.mp4 --codec hevc_nvenc --keep_audio\n   ```\n\n   with an input video and rendering on the terminal (stretched to fit terminal):\n   ```bash\n   glyph -i /path/to/input/video.mp4 --stretched -c\n   ```\n\n   with input video and custom ffmpeg encoder options:\n   ```bash\n   glyph -i /path/to/input/video.mp4 -o ascii.mp4 -c --codec libx264 --keep_audio-- -preset fast -crf 20\n   ```\n\n   with input video and custom ffmpeg encoder options:\n   ```bash\n   glyph -i /path/to/input/video.mp4 -o ascii.mp4 -c --codec libx264 --keep_audio-- -preset fast -crf 20\n   ```\n\n3. the program will generate an ascii art version of your input media and save it as a new media file.\n\nfor images: output file needs to be a `.png` since i saw some weird issues with jpegs.\n\n4. using the long arguments on windows may or may not work. please use the short arguments for now.\n","funding_links":[],"categories":["Zig","Generators \u0026 Converters"],"sub_categories":["Imported: Upstream Snippet Gallery"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseatedro%2Fglyph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseatedro%2Fglyph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseatedro%2Fglyph/lists"}