---
title: "Visually Create Video Clips with mpv, FFmpeg and a Lua Extension — Nick Janetakis"
url: https://daily.dev/posts/visually-create-video-clips-with-mpv-ffmpeg-and-a-lua-extension-nick-janetakis-w4plmjut0
source_url: https://nickjanetakis.com/blog/visually-create-video-clips-with-mpv-ffmpeg-and-a-lua-extension
type: article
source: "Nick Janetakis"
published: 2026-06-23T11:47:37.543Z
updated: 2026-06-23T11:48:02.091Z
tags: ["backend", "shell", "lua"]
reading_time: 5
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Visually Create Video Clips with mpv, FFmpeg and a Lua Extension — Nick Janetakis

**[Nick Janetakis](https://daily.dev/sources/nickjanetakis)** · 5 min read · 1 upvotes · 0 comments

## Summary

A walkthrough of a custom Lua script for mpv that enables visual video clip creation using chapter markers and FFmpeg. The script adds four key bindings to set start/end markers, create clips, and clear markers. FFmpeg handles the actual clip extraction without re-encoding. Quality-of-life features include auto-pausing after setting the end mark, on-screen timestamp display, safe auto-incrementing file names, and preserving the original file's modification timestamp.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nickjanetakis.com/blog/visually-create-video-clips-with-mpv-ffmpeg-and-a-lua-extension>

## Similar posts on daily.dev

- [mpv Is the MVP of Video and Image Viewing — Nick Janetakis](https://daily.dev/posts/mpv-is-the-mvp-of-video-and-image-viewing-nick-janetakis-xk0fetpcy) · Nick Janetakis · 0 upvotes · 0 comments
- [I thought VLC was unbeatable until I tried this open-source media player](https://daily.dev/posts/i-thought-vlc-was-unbeatable-until-i-tried-this-open-source-media-player-tmwluvrze) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#backend](https://daily.dev/tags/backend), [#shell](https://daily.dev/tags/shell), [#lua](https://daily.dev/tags/lua)

[View this post on daily.dev](https://daily.dev/posts/visually-create-video-clips-with-mpv-ffmpeg-and-a-lua-extension-nick-janetakis-w4plmjut0)
