feat:get timestamp for each command with flag --with-timestamp or -t#616
feat:get timestamp for each command with flag --with-timestamp or -t#616Exar04 wants to merge 1 commit intocharmbracelet:mainfrom
Conversation
|
|
||
| func init() { | ||
| rootCmd.Flags().BoolVarP(&publishFlag, "publish", "p", false, "publish your GIF to vhs.charm.sh and get a shareable URL") | ||
| rootCmd.Flags().BoolVarP(&withTimestampFlag, "with-timestamp", "t", false, "Get timestamp for each command in the output") |
There was a problem hiding this comment.
I think is ok to leave as timestamp instead of with-timestamp
|
Hey @Exar04 thank you for the PR, it's indeed a nice feature to add. Two things though, could you add tests about this functionality? and second would be nice |
|
One issue with this is that there isn't a separate timecode for each typed letter. One use case for the timecode is being able to add audio and this wouldn't be enough to add audio to each keystroke. |
|
I see @Soviut @raphamorim yeah I will add tests at the end, after the complete feature is implemented. |
|
Perfect, please lemme know if need help with anything. Feel free to ping on my discord |
You could infer the current typing speed which is how frequently the https://github.com/charmbracelet/vhs?tab=readme-ov-file#set-typing-speed The To handle timecodes with milliseconds it's usually |
Does something like this works for you @Soviut ?
Also what should be the names for the the tags @Soviut @raphamorim |
I mean its just a stopwatch. should it have dates and stuff? |
|
Hey @Exar04 timestamp term isn't just about dates when comes to unix, but sure just allow formating time (hour, minute, second, millisecond) would be ok imho |
That's definitely more useful. I think the
Do you mean the flags in the CLI? Where |
|
@Exar04 Here's a really good resource about timecode. |
|
No stress/rush @Exar04 please take your time |
|
Just a thought here: making the timecodes compatible with the FFmpeg metadata format (https://ffmpeg.org/ffmpeg-formats.html#Metadata-2) would allow for relatively easy tagging of videos with chapter markers (http://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg or https://medium.com/@dathanbennett/adding-chapters-to-an-mp4-file-using-ffmpeg-5e43df269687 for details). In fact, imagine |
|
@Exar04 this "inconsistency" seems normal to me - computers don't always perfectly execute everything at the same speed. The |
|
I don’t think wall clock is sufficient as drift becomes large. Instead, I used the captured frame to derive the timestamp as I describe in discussion #702. |



Adds feature #584