-
-
Notifications
You must be signed in to change notification settings - Fork 2
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time quantization #14
Comments
@sickill any opinion about this? |
That's an interesting idea. I have a feeling that this would be used by very small amount of users. I'm on the fence here... On one hand I really like the idea, on the other I know that it would add fair amount of code, code that will need to be maintained for probably 1% of users (prove me wrong as for the estimates here ;)) What about this: I had this idea for a while to create a separate set of tools for processing asciicasts. Stuff like speed it up 2x, apply We could have a mechanism for adding extra commands to Having above, we could create I'm open to other suggestions! |
Actually I was thinking about the same: doing it externally, just processing the record json file. The other thing is that I don't have much time right now to learn Go, but if this external commands integration would work with any executables named by the convention, this could make extension of asciinema much easier. Btw, I guess you know about asciinema2gif which is quite useful and just works. I saw some discussion here about gif conversion and that it's not in the plans, and I perfectly understand it, but still as users may have different needs, such extensibility could be a very nice way to let users fulfill their specific needs themselves. |
Glad to hear similiar opinion. Are you more familiar with Python? What's the lang you would implement this in? |
@sickill well, actually I was using jq with some primitive filters so far. For example: jq '.stdout |= map(.[0] *= 0.5)' record.json > record.twice-faster.json Will produce a json which will be played by jq '.stdout |= map(.[0] |= ([., 1.234] | min))' record.json > record.cut.json is the same as setting This can be, of course, wrapped in any kind of shell script with specified options. But if you want some more integration, it can be also done in a very similar manner using JMESPath, which has various implementations including Python and Go. |
Hey @laughedelic , I had pretty much the same requirement as yours, so I ended up creating this https://github.com/cirocosta/asciinema-edit It takes an asciinema cast (v2) and then mutates the event stream according to what you need. I just finished adding quantization in the way you described, btw 👍 Hope it's useful for you! Thx! |
Hi @cirocosta! Thanks for pinging me! It's awesome that you've made it into a tool and that it works with the v2 format. I'll try it next time I record an asciinema cast. |
If you also prescribed that any delay below the shortest specified one should be annulled (i.e., all content displayed with less delay should be merged), it could both improve storage efficiency and compressibility (as per asciinema/asciinema#515 ) and potentially mitigate privacy concerns regarding publishing keystroke typing biometrics. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Based on the asciinema/asciinema#156 that was recently merged, I want to propose the following feature:
--max-wait
option could take a sequence of maximum wait bounds (or there could be another option for that). For example:(the format is discussable, probably something with a non-space separator is better/easier to parse:
0.4,0.8,1,3
)This would mean that
max-wait
)This would allow to make some more adjustments to the time flow of the recording, such as minimizing typing delays (making it more fluent), while still being able to make short and long pauses (to point out something).
What do you think about this feature? I think it's not hard to do and I could implement it.
The text was updated successfully, but these errors were encountered: