{"id":15140960,"url":"https://github.com/seatedro/asciigen","last_synced_at":"2025-12-30T16:18:55.644Z","repository":{"id":254656426,"uuid":"847175800","full_name":"seatedro/asciigen","owner":"seatedro","description":"convert images, video to ascii!","archived":false,"fork":false,"pushed_at":"2025-02-19T05:00:37.000Z","size":386,"stargazers_count":313,"open_issues_count":9,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T01:14:33.701Z","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-02-19T12:39:45.000Z","dependencies_parsed_at":"2024-12-07T18:24:55.224Z","dependency_job_id":"25fe6339-490f-430a-8107-c95167195b42","html_url":"https://github.com/seatedro/asciigen","commit_stats":{"total_commits":54,"total_committers":3,"mean_commits":18.0,"dds":0.2407407407407407,"last_synced_commit":"38240db30522b10a7dcee1e62a0a568d89ef5f06"},"previous_names":["seatedro/asciigen"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fasciigen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fasciigen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fasciigen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seatedro%2Fasciigen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seatedro","download_url":"https://codeload.github.com/seatedro/asciigen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241305113,"owners_count":19941105,"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":"2024-09-26T08:42:42.716Z","updated_at":"2025-03-01T02:15:53.124Z","avatar_url":"https://github.com/seatedro.png","language":"Zig","readme":"# ascii from media\n\nconverts images/video to ascii art\n\n## installation\n\n### brew\n```bash\nbrew install asciigen\n```\n\nmake sure you have ffmpeg installed (along with the respective headers)\n\nusually on linux you just install the headers like so:\n```bash\nsudo apt-get install libavutil-dev libavformat-dev libavcodec-dev libswscale-dev\n```\n\non macos you would do\n```bash\nbrew install ffmpeg pkgconf\n```\n\non windows:\n```bash\nchoco install ffmpeg-full pkg-config\n```\n\n\n### i'm not doing pre-built binaries\n\nit is getting too annoying to handle cross plat binary releases using my apple silicon mac. just build from source.\n\nor wait till i release the web app!\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/asciigen [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   asciigen -i input.jpg -o output.png\n   ```\n\n   text file output:\n   ```bash\n   asciigen -i input.jpg -o output.txt\n   ```\n\n   using color:\n   ```bash\n   asciigen -i input.png -o output.png -c\n   ```\n\n   with edge detection, color, and custom downscale:\n   ```bash\n   asciigen -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   asciigen -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   asciigen -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   asciigen -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   asciigen -i /path/to/input/video.mp4 --stretched -c\n   ```\n\n   with input video and custom ffmpeg encoder options:\n   ```bash\n   asciigen -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   asciigen -i /path/to/input/video.mp4 -o ascii.mp4 -c --codec libx264 --keep_audio-- -preset fast -crf 20\n   ```\n\n4. 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\nthe zig version is the only one i'll be working on from here on. the c code was just to get me started until i figured out some issues with the build.zig\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"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseatedro%2Fasciigen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseatedro%2Fasciigen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseatedro%2Fasciigen/lists"}