mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[GH-ISSUE #70] Decouple terminal recording from asciinema.org #665
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#665
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ku1ik on GitHub (Aug 11, 2014).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/70
Recording should not be tied to asciinema.org.
You should be able to:
asciinema rec <filename>,asciinema play <filename>,asciinema play <url>,This is a prerequisite for #49, it is in fact a simpler version of it.
Saving/sharing/replaying from a local file means we have to decide on the data format.
Requirements for data format:
asciinemaand external toolsOption 1: use current format used by asciinema.org
zip file with custom extension (like
.asciicastfor ex), including 3 files:meta.json- with metadata like width/height of terminal, title, etcstdout- raw stdout bytes,stdout.timing- timing information.Current implementation uses these 3 files when uploading the recording to asciinema.org.
This however isn't really compatible with live streaming idea and doesn't address all the requirements above.
Option 2: new JSON based format
With frames inlined, to be used when persisted:
With frames delegated to an URL, to be used when streaming:
frames_urlis a URL to streaming endpoint, either http or websocket.Format of the single frame:
JSON isn't suited to store arbitrary binary data in strings and raw stdout output contains lots of non-printable bytes so we should encode them. Base64 or encoding each byte in hex or utf would do.
or
Streaming endpoint(s) could be implemented to spit out each new frame in a separate line.