-
Notifications
You must be signed in to change notification settings - Fork 313
feat:get timestamp for each command with flag --with-timestamp or -t #616
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
base: main
Are you sure you want to change the base?
Conversation
@@ -255,6 +257,7 @@ func main() { | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
![]() 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 |
Adds feature #584