{"id":13448951,"url":"https://github.com/cirocosta/asciinema-edit","last_synced_at":"2025-04-06T03:11:54.323Z","repository":{"id":46656995,"uuid":"139443860","full_name":"cirocosta/asciinema-edit","owner":"cirocosta","description":"asciinema casts post-production tools","archived":false,"fork":false,"pushed_at":"2023-06-28T22:07:22.000Z","size":2105,"stargazers_count":327,"open_issues_count":15,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T02:09:38.644Z","etag":null,"topics":["asciinema","golang","post-processing","terminal","terminal-recording","termtosvg","tty"],"latest_commit_sha":null,"homepage":"https://ops.tips","language":"Go","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/cirocosta.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}},"created_at":"2018-07-02T12:56:39.000Z","updated_at":"2025-03-25T22:29:55.000Z","dependencies_parsed_at":"2024-01-15T15:16:40.073Z","dependency_job_id":"322ea9d1-1a62-4ca4-9139-47ada192a4c3","html_url":"https://github.com/cirocosta/asciinema-edit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fasciinema-edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fasciinema-edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fasciinema-edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Fasciinema-edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cirocosta","download_url":"https://codeload.github.com/cirocosta/asciinema-edit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427012,"owners_count":20937214,"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":["asciinema","golang","post-processing","terminal","terminal-recording","termtosvg","tty"],"created_at":"2024-07-31T06:00:26.054Z","updated_at":"2025-04-06T03:11:54.296Z","avatar_url":"https://github.com/cirocosta.png","language":"Go","funding_links":[],"categories":["Go","terminal"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003easciinema-edit 🎬 \u003c/h1\u003e\n\n\u003ch5 align=\"center\"\u003eAuxiliary tools for dealing with ASCIINEMA casts\u003c/h5\u003e\n\n\u003cbr/\u003e\n\n`asciinema-edit` is a tool who's purpose is to post-process asciinema casts (V2), either from [asciinema](https://github.com/asciinema/asciinema) itself or [termtosvg](https://github.com/nbedos/termtosvg).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100%\" src=\"/.github/asciinema-edit-overview.svg\" alt=\"Illustration of how ASCIINEMA-EDIT works\" /\u003e\n\u003c/p\u003e\n\nThree transformations have been implemented so far:\n\n- [`quantize`](#quantize): Updates the cast delays following quantization ranges; and\n- [`cut`](#cut): Removes a certain range of time frames;\n- [`speed`](#speed): Updates the cast speed by a certain factor.\n\nHaving those, you can improve your cast by:\n\n- speeding up parts that are not very important;\n- reducing delays between commands; and\n- completely removing parts that don't add value to the cast.\n\n### Installation\n\nBeing a Golang application, you can either build it yourself with `go get` or fetch a specific version from the [Releases page](https://github.com/cirocosta/asciinema-edit/releases):\n\n```sh\n#Using `go`, fetch the latest from `master`\ngo get -u -v github.com/cirocosta/asciinema-edit\n\n#Retrieving from GitHub releases\nVERSION=0.0.6\ncurl -SOL https://github.com/cirocosta/asciinema-edit/releases/download/$VERSION/asciinema-edit_$VERSION_linux_amd64.tar.gz\n```\n\n### Quantize\n\n```sh\nNAME:\n   asciinema-edit quantize - Updates the cast delays following quantization ranges.\n\n   The command acts on the delays between the frames, reducing such\n   timings to the lowest value defined in a given range that they\n   lie in.\n\n   For instance, consider the following timestamps:\n\n      1  2  5  9 10 11\n\n   Assuming that we quantize over [2,6), we'd cut any delays between 2 and\n   6 seconds to 2 second:\n\n      1  2  4  6  7  8\n\n   This can be more easily visualized by looking at the delay quantization:\n\n      delta = 1.000000 | qdelta = 1.000000\n      delta = 3.000000 | qdelta = 2.000000\n      delta = 4.000000 | qdelta = 2.000000\n      delta = 1.000000 | qdelta = 1.000000\n      delta = 1.000000 | qdelta = 1.000000\n\n   If no file name is specified as a positional argument, a cast is\n   expected to be served via stdin.\n\n   Once the transformation has been performed, the resulting cast is\n   either written to a file specified in the '--out' flag or to stdout\n   (default).\n\nEXAMPLES:\n   Make the whole cast have a maximum delay of 2s:\n\n     asciinema-edit quantize --range 2 ./123.cast\n\n   Make the whole cast have time delays between 300ms and 1s cut to\n   300ms, delays between 1s and 2s cut to 1s and any delays bigger\n   than 2s, cut down to 2s:\n\n     asciinema-edit quantize \\\n       --range 0.3,1 \\\n       --range 1,2 \\\n       --range 2 \\\n       ./123.cast\n\nUSAGE:\n   asciinema-edit quantize [command options] [filename]\n\nOPTIONS:\n   --range value  quantization ranges (comma delimited)\n   --out value    file to write the modified contents to\n   \n```\n\n### Speed\n\n```sh\nNAME:\n   asciinema-edit speed - Updates the cast speed by a certain factor.\n\n   If no file name is specified as a positional argument, a cast is\n   expected to be served via stdin.\n\n   If no range is specified (start=0, end=0), the whole event stream\n   is processed.\n\n   Once the transformation has been performed, the resulting cast is\n   either written to a file specified in the '--out' flag or to stdout\n   (default).\n\nEXAMPLES:\n   Make the whole cast (\"123.cast\") twice as slow:\n\n     asciinema-edit speed --factor 2 ./123.cast\n\n   Cut the duration in half:\n\n     asciinema-edit speed --factor 0.5 ./123.cast\n\n   Make only a certain part of the video twice as slow:\n\n     asciinema-edit speed \\\n        --factor 2 \\\n        --start 12.231 \\\n        --factor 45.333 \\\n        ./123.cast\n\nUSAGE:\n   asciinema-edit speed [command options] [filename]\n\nOPTIONS:\n   --factor value  number by which delays are multiplied by (default: 0)\n   --start value   initial frame timestamp (default: 0)\n   --end value     final frame timestamp (default: 0)\n   --out value     file to write the modified contents to\n```\n\n\n### Cut\n\n```sh\nNAME:\n   asciinema-edit cut - Removes a certain range of time frames.\n\n   If no file name is specified as a positional argument, a cast is\n   expected to be served via stdin.\n\n   Once the transformation has been performed, the resulting cast is\n   either written to a file specified in the '--out' flag or to stdout\n   (default).\n\nEXAMPLES:\n   Remove frames from 12.2s to 15.3s from the cast passed in the commands\n   stdin.\n\n     cat 1234.cast | \\\n       asciinema-edit cut \\\n         --start=12.2 --end=15.3\n\n   Remove the exact frame at timestamp 12.2 from the cast file named\n   1234.cast.\n\n     asciinema-edit cut \\\n       --start=12.2 --end=12.2 \\\n       1234.cast\n\nUSAGE:\n   asciinema-edit cut [command options] [filename]\n\nOPTIONS:\n   --start value  initial frame timestamp (required) (default: 0)\n   --end value    final frame timestamp (required) (default: 0)\n   --out value    file to write the modified contents to\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirocosta%2Fasciinema-edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirocosta%2Fasciinema-edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirocosta%2Fasciinema-edit/lists"}