7 ms·
VHS: CLI home video recorder
- scohesc 4y agoWhen did Github get play/pause controls on GIF images? Pretty neat! I've always had a gripe with GIF's autoplaying after the page loads so the first time I see it it's halfway through the animation. VHS looks like a pretty neat tool! Not sure if I'd use it, but definitely some use cases out there for tutorials, guides, etc.
- sophacles 4y agoI've done a few gifs of "this happens" for bug reports and the like. One thing that this solves is the "ugh i screwed up the sequence, time to try recoring for the 10th time" problem, so that's interesting. I wonder how well it works with programs that set their input line discipline to "raw" or read from the pty directly - ncurses-like interfaces and things like sudo, etc.
- throwaway744678 4y agoI don't see the play/pause buttons (Chrome on Android): gif are autoplaying. Perhaps it comes from your browser?
- scohesc 4y agoMaybe, I'm using Firefox - I wonder if that's built into the browser now? I really wish there was a set of browser standards for at least a modicum of similarity (I guess chromium is one?)- things are all over the place still hahaha
- tarboreus 4y agoCool name and file extension. This person could be in branding.
- zero_iq 4y agoAlmost certainly trademark infringement though.
- jandrese 4y agoTrademarks are domain specific, so it wouldn't be an open and shut case.
- zero_iq 4y agoIt wouldn't get to trial. Cease and desist letter with the threat of legal action would likely do the trick, as charmbracelet likely have insufficient funds to defend themselves, and it simply wouldn't be worth the money to defend a small project name. At the very least it would be easy to force them to remove any use of VHS in relation to video tapes: they have a giant picture of a VHS video tape on their homepage! If the trademark owner discovers this, they would be legally obliged to defend their trademark if they want to keep it. JVC/Kenwood has previously successfully defended their mark when used in artworks/apparel (which are not in the same domains).
- asicsp 4y agoThis is awesome! I can see adding a demo for at least one of my projects. Based on a quick glance, I'd say the best thing about it is that can you reuse the script (for ex: something changed with the command usage/output, automate recording for different command, etc).
- dbieber 4y agoThis looks super useful. Tempted to go and add CI-maintained gifs to a whole bunch of existing projects now. Some ideas for new features: * If the prefix of the tape file is unchanged, reuse the intermediate updates through that prefix from a cache (edit: hmm, upon further thought this seems more difficult than I initially imagined, since the state would need to be cached to save time, not just the images) * Allow an option for using real-time delays in the gif or user-selected delays (I think currently delays are constant unless user-selected, but I don't see a way to use the real runtime delay in the gif)
- ndegruchy 4y agoSo, this seems to just download chrome and run some sort of terminal emulator in it (then converts it to video). Do I have that right? Seems like massive overkill for something you could do with just ffmpeg and a terminal emulator...
- taviso 4y agoI've actually used ffmpeg + GNU screen to do something very similar in the past. The benefit of using GNU screen is that the "tape" can be a shell script. I suppose if you don't like shell scripts that's not a benefit, but I do like them. For example, instead of: Type "echo 'Welcome to VHS!'" # Pause for dramatic effect... Sleep 500ms Enter With GNU screen, you would write: #!/bin/sh screen -d -m -S whatever -- bash screen -S whatever -X stuff "echo Welcome to screen" sleep 0.5 screen -S whatever -X stuff $'\n' If you want to start interacting with the session, just do screen -r whatever You can also read what is in the screen with -X hardcopy, then do something with the output, like verify the output is correct or adjust the input.
- maaslalani 4y agoThis is actually really cool. Thanks for sharing this!
- ComputerGuru 4y agoWhere/how does ffmpeg come in? How are you connecting screen output to ffmpeg input?
- taviso 4y agoffmpeg can capture an xterm as a source, it's called x11grab.
- ComputerGuru 4y agoTIL! Thanks for sharing! Edit: X11 as a source, not xterm. At least from what I can see.
- silviot 4y agoSimilar tool: https://asciinema.org/ https://asciinema.org/ It does not generate a GIF file, but can be easily published on the web. The recorded terminal session is clipboard friendly: you can select and copy.
- iamjackg 4y agoI love asciinema. A key difference between these two tools seems to be that asciinema records a human using the terminal, whereas VHS generates output based on a list of steps to execute. I can see VHS being nicer than asciinema for a lot of applications, since you can avoid typos and fumbling, and you can easily re-render the same output with different settings.
- lyarwood 4y agoI've started using demo-magic [1] to automate my asciinema recorded demos, not perfect but it gets the job done. VHS does look excellent however and I'll definitely be giving it a go the next time I need to record anything. [1] https://github.com/paxtonhare/demo-magic https://github.com/paxtonhare/demo-magic
- nvrspyx 4y ago> It does not generate a GIF file,... Although it's separate, the creator(s) does provide a utility called `agg`[0] to convert asciicast files to GIF. The GitHub appears to provide prebuilt binaries in Releases, but it's easily built using Cargo/Rust too. 0: https://github.com/asciinema/agg https://github.com/asciinema/agg
- ronilan 4y agoTo generate GIFs use: https://github.com/dstein64/gifcast https://github.com/dstein64/gifcast Works in the browser and locally. No install needed.
- stavros 4y agoBut that kind of defeats the purpose, no? If I'm going to record asciinema to convert to GIF, why not just record the terminal to GIF directly?
- politelemon 4y agoNice tool. As a nit, > Linux > brew Please don't do this, it's not safe, despite it "existing" as an option. Even a binary download is better than suggesting brew on Linux.
- Yajirobe 4y agowhy
- Hackbraten 4y agoWhat do you feel is unsafe about Homebrew?
- password4321 4y agoFor starters: auto-updating everything before installing anything (HOMEBREW_NO_AUTO_UPDATE default 0). Coupled with uninstalling before determining whether or not the OS version is still supported (not sure if this still can happen, or ever happened on Linux)... fun times all around.
- naikrovek 4y agothat's it?
- jhbadger 4y agoPerhaps you don't understand the use case. It's often the only option for users to install packages on an HPC system, as on such systems you cannot install things as root so the system package manager is infeasible. The only other possibility is Anaconda, but that has its origins as a Python tool and only has a fairly limited set of non-Python related packages.
- password4321 4y agoSemi-relevant (userspace dev tools) Asdf – language tool version manager https://news.ycombinator.com/item?id=33323261 https://news.ycombinator.com/item?id=33323261 (3 days ago)
- aliqot 4y agoCharmbracelet is a gem. Ran across their stuff a year or two ago and it's just a pleasure.
- fimdomeio 4y agoWould love to know what other people think about the overall design and comunication stategy of Charm. On one hand I already knew who did this project even before the image was fully loaded, youtube content seems interesting, and branding is very strong but I also feel a bit overwhelmed by all the brands shouting at me. they have Charm Cloud, VHS, Soft Serve, Buble Tea, Lip Gloss, Charm, Wish, Bubbles, Glamour, Harmonica, Gum, Skate, Glow.
- deleted 4y ago[deleted]
- naikrovek 4y agoI miss how CPAN required that you name modules. they were named according to their capabilities, and they were narrowly scoped. these days, you just pick a word from the dictionary, and that's your software's name. now I have 1000 names to remember.
- moondev 4y agoI personally love it. It's charming :) The other themes that all the tools have are quality, usefulness, and creativity. Personally my favorite is gum, it makes me want to write shell scripts. It's like zenity for the terminal.
- andelink 4y agoI love their branding
- 6345dhjdsf 4y agoIf the author's reading this, please consider whether a picture of a video cassette was really of value, and if it was please don't put in a bloody great 2MB image.
- elsurudo 4y agoFor what it's worth, I enjoyed the nice cassette logo :)
- maaslalani 4y agoAuthor here. Fair point! Definitely forgot to compress it and make it smaller. Thanks for the call out.
- mdaniel 4y agothey even have a tree-sitter parser for vhs/.tape -- https://github.com/charmbracelet/tree-sitter-vhs#readme https://github.com/charmbracelet/tree-sitter-vhs#readme -- but then they hand-roll the parser for it in the actual vhs repo Is tree-sitter so hard to use in anger that it's worth the diverging implementations?
- maaslalani 4y agoWe started off hand rolling the parser and had that fully implemented and then wrote the tree-sitter grammar. If I were to do it again I would probably use tree-sitter for the actual repo so that the implementations were the same for sure.
- sandreas 4y agoMaybe another alternative for inspiration: https://github.com/faressoft/terminalizer https://github.com/faressoft/terminalizer I love it because it gives you the option to record or to prepare your file... very easy and good results.
- maaslalani 4y agoWe definitely want to add an option to record a session which would output a generated file for you!
- txutxu 4y agoReally nice! Which font family can be used? I'm trying with font names from fonts that I have installed (i.e. Terminus or terminus) and it's not working.
- masukomi 4y agoI wrote a blog post[1] breaking down tools to record terminal sessions just a couple weeks ago. I wasn't aware of this particular one but it looks like it's going to have issues with recording anything that requires user input. My post describes how to make high quality recordings of terminal sessions that can be replayed in the terminal, or shared on the web. I'm defining high quality as recordings with zero typos, and relatively controlled timing between commands. I'm going to assume this works well because all the stuff from Charm seems to, BUT its limitations are ... problematic. I think the techniques i list in the post combined with agg[2] or gifcast[3] to covert it to a gif would be a better solution for non-trivial cases. I'll add notes about agg and gifcast to the post this evening hopefully. [1]: https://weblog.masukomi.org/2022/10/11/recording_and_sharing_terminal_sessions/ https://weblog.masukomi.org/2022/10/11/recording_and_sharing... [2]: https://github.com/asciinema/agg https://github.com/asciinema/agg [3]: https://github.com/dstein64/gifcast https://github.com/dstein64/gifcast
- Philip-J-Fry 4y agoSeems like it'd be fine for user input? You just tell it what the input is and it will record it.
- crummy 4y ago> VHS has an SSH server built in! When you self host VHS you can access it as though it were installed locally. VHS will have access to commands and applications on the host so you don't need to install them on your machine. That is super slick!
- 2OEH8eoCRo0 4y agoVery cool. I love their other projects as well. https://charm.sh/ https://charm.sh/
- stavros 4y agoOooh this looks great! I have a soft spot for terminal recording tools. I made the inverse of this (give it keystrokes and it plays them back as you type, for live demos: https://gitlab.com/stavros/itsalive https://gitlab.com/stavros/itsalive).
- MaintenanceMode 4y agoAt one of the Open Source Conferences (OSCON) I saw Damian Conway use a tool like this (I believe it was asciinema) to give one of the best command line based demos I've ever seen. He was typing away like mad and not one typo! It was mesmerizing and the demo was totally awesome, of course it helps that he's a superb presenter to begin with. Later he revealed the "magic trick"!
- ritonlajoie 4y agosuper cool project, any way to integrate it in mkdocs or pymarkdown ?