[HN Gopher] Lazycut: A simple terminal video trimmer using FFmpeg
       ___________________________________________________________________
        
       Lazycut: A simple terminal video trimmer using FFmpeg
        
       Author : masterpos
       Score  : 136 points
       Date   : 2026-03-16 12:05 UTC (10 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | ariym wrote:
       | I think this is the first instance I've seen of an actual
       | terminal video player. Very fun to play with.
        
         | mikkupikku wrote:
         | mplayer, mpv and I think VLC can do it, with the right output
         | driver settings (libcaca or a few other choices.)
        
           | tptacek wrote:
           | You can just use ffmpeg to extract frames, and then just
           | render the raw images with unicode blocks.
           | 
           | (There's Kitty Graphics too, but I couldn't figure out how to
           | make terminal UI layout work with it.)
        
             | mikkupikku wrote:
             | I'd use ffmpeg to downscale the frames to the terminal size
             | too. There are also various filters that could help
             | quantizing the colors to what your terminal supports. The
             | paletteuse filter will get you free dithering too.
        
           | chadrs wrote:
           | yeah I remember learning this trick in like 2007 with libaa
           | and later caca for color.
           | 
           | It looks like this app is shelling out to ffmpeg to get the
           | bitmap of a frame and then shelling to something called chafa
           | to covert to nice terminal-friendly video.
           | 
           | https://github.com/hpjansson/chafa/
        
       | mandeepj wrote:
       | I guess I can find another implementation to combine trimmed
       | parts after taking out certain scenes?
        
         | hiccuphippo wrote:
         | Write a text file with all the parts like this:
         | file 'file1.mp4'         file 'file2.mp4'         file
         | 'file3.mp4'
         | 
         | Then call ffmpeg like this:                   ffmpeg -f concat
         | -i files.txt -c copy output.mp4
         | 
         | And I guess you could make an LLM write a {G,T}UI for this if
         | you really want.
        
       | faangguyindia wrote:
       | I've been using ffmpeg with claude as video editor for long time.
        
         | hsuduebc2 wrote:
         | You mean you let create claude command or it itself runs ffmpeg
         | on your local machine and returns you finished cut?
        
       | tptacek wrote:
       | This is very cool. I built one of these myself around Christmas;
       | Claude Code can put one together in just a couple prompts (this
       | is also how I worked out how to have Claude test TUIs with tmux).
       | What was striking about my finished product --- which is much
       | less slick than this --- was how much of the heavy lifting was
       | just working out which arguments to pass to ffmpeg.
       | 
       | It's surprisingly handy to have something like this hanging
       | around; I just use mine to fix up screen caps.
       | 
       | Commenting mostly because when I did this I thought I was doing
       | something very silly, and I'm glad I'm not completely crazy.
        
         | booi wrote:
         | You can use AI to figure out the arguments to ffmpeg. But
         | indeed it seems like there's just a single call to FFmpeg CLI
         | to power the whole thing which is amazing.
         | ffmpegCmd := exec.Command("ffmpeg",         "-ss",
         | fmt.Sprintf("%.3f", position.Seconds()),         "-i", p.path,
         | "-vf", strings.Join(filters, ","),         "-vframes", "1",
         | "-f", "image2pipe",         "-vcodec", "bmp",
         | "-loglevel", "error",         "-",       )
        
       | bfrjjrhfbf wrote:
       | Having to separately download ffmpeg in the windows distribution
       | does not really make sense
       | 
       | Just bundle it
        
         | karlosvomacka wrote:
         | afaik winget can automatically manage package dependencies.
        
         | sorenjan wrote:
         | I disagree, I don't want another ffmpeg binary, I already have
         | one. Winget works well, especially since this is already a
         | terminal program.
        
         | ftchd wrote:
         | People that use GUIs/tools for things like ffmpeg, rclone etc
         | really want the developer to autodetect if they have it
         | already, and use that instead of installing a separate
         | version/binary.
         | 
         | How do I know? I built one (https://github.com/rclone-
         | ui/rclone-ui)
        
       | sorenjan wrote:
       | I don't find trimming videos with ffmpeg particularly difficult,
       | is just-ss xx -to xx -c copy basically. Sure, you need to get
       | those time stamps using a media player, but you probably already
       | have one so that isn't really an issue.
       | 
       | What I've found to be trickier is dividing a video into multiple
       | clips, where one clip can start at the end of another, but not
       | necessarily.
        
         | ramon156 wrote:
         | I don't find Sharing files with people very difficult, just
         | login to your FTP and give an account to another user. - Person
         | commenting on OneDrive
        
           | sorenjan wrote:
           | Missed opportunity to reference the famous Dropbox hn
           | comment.
           | 
           | I just think there are other closely related use cases where
           | a separate program can add more value, especially in the
           | terminal. I wouldn't suggest most people should use ffmpeg
           | instead of a gui, those are too dissimilar. Another example
           | is cutting out a part of a video, with ffmpeg you need to
           | make two temporary videos and then concatenate them, that
           | process would greatly benefit from a better ux.
        
             | tptacek wrote:
             | Point of order: the Dropbox HN comment is famously
             | misconstrued. People think it was about Dropbox; it was
             | about the Dropbox YC application, and was both well-
             | intentioned and constructive.
        
             | gyan wrote:
             | > with ffmpeg you need to make two temporary videos and
             | then concatenate them
             | 
             | It can be done in a single command, no temp files needed.
        
         | hiccuphippo wrote:
         | I used a plugin in mpv to do it but I can't find it anymore.
         | You just pressed a key to mark the start and end. And with .
         | and , you could do it at keyframe resolution not just seconds.
        
           | rigrassm wrote:
           | Found a few links to projects that fit this description in an
           | awesome-mpv repo.
           | 
           | https://github.com/stax76/awesome-mpv?tab=readme-ov-
           | file#vid...
           | 
           | Appreciate you mentioning the MPV route for making clips, I
           | might actually go through and process all the game recordings
           | I saved for clips over the years.
        
         | bolangi wrote:
         | FWIW, here's a simple command line utility for joining and
         | trimming the multiple video files produced by a video camera.
         | 
         | https://metacpan.org/dist/App-fftrim/view/script/fftrim
        
       | mhuffman wrote:
       | I have been using this one[0] and it is small, fast, and seems to
       | work pretty great for me so far.
       | 
       | [0]https://github.com/wong-justin/vic
        
         | wonger_ wrote:
         | Happy to hear! Some of my thoughts when building it:
         | 
         | - I haven't implemented audio support yet, but it would be nice
         | 
         | - I like --dry-run
         | 
         | - I didn't use a TUI widget library, but now it's at the point
         | where it's tedious to refactor the UI / make it prettier
         | 
         | - I like OP's timeline widget
         | 
         | - Wanted to focus on static binaries. I got chafa static
         | linking working for Linux, but haven't bundled ffmpeg yet
         | 
         | - which reminds me of licenses -- chafa and ffmpeg are LGPL
         | iirc
         | 
         | - a couple other notes from early on:
         | https://wonger.dev/posts/chafa-ffmpeg-progress
        
       | Acrobatic_Road wrote:
       | Could have really used this a couple days ago. I had to record a
       | video an assignment, but due to lack of global hotkeys on OBS
       | with wayland, I had to start and stop the video on the OBS GUI. I
       | tried to figure out ffmpeg but I was too tired and it was getting
       | close to the deadline so I spent some time learning how to to do
       | it with kdenlive.
        
       | chris_va wrote:
       | Invoking ffmpeg, gzip and tar commands is a sort of reverse
       | Turing test for LLMs
        
         | andai wrote:
         | To access this website, you must produce a valid tar command
         | without alt-tabbing. You have ten seconds to comply.
        
       | noiv wrote:
       | On MacOs I just press space and trim with finder. Even avoids re-
       | compressing.
        
       | kawsper wrote:
       | I asked about this tool 3 days ago, HN is a magical place!
       | https://news.ycombinator.com/item?id=47363432
        
       | rishabhjajoriya wrote:
       | Simple CLI tools like this are underrated. The moment you can
       | pipe it into other commands, it becomes much more useful in
       | automation workflows.
        
       | mystraline wrote:
       | What's weird is that I have problems getting the ffmpeg switches
       | right, even if I get llm assistance.
       | 
       | I think I understand the switches, and are demonstrably shown I
       | have no clue.
       | 
       | These days, I'm basically relegated in following pre-LLM blogs
       | and SO in hoping I find the right combination.
        
       | xenodium wrote:
       | Neat! I did the Emacs equivalent
       | https://github.com/xenodium/video-trimmer
        
       ___________________________________________________________________
       (page generated 2026-03-16 23:00 UTC)