drewp 5 days ago

That's where I am now. I'd like to optimize out the retyping and duplication of time strings.

I want the player ui (I'm using mpv) to have a command that:

1. Remembers the last end time to use as this chapter's start time

2. Gets the current time to use as chapter-end.

3. Accepts the name (e.g. 'chapter1').

4. Runs the ffmpeg copy command.

Perhaps mpv+lua can already handle this. I see commands for setting a loop range and for calling a subprocess. Not sure how I'd input the chapter name. Maybe I'll have an LLM name the chapters for me :)

1
pdyc 5 days ago

u r on right track with llm, just tell it that you will give input file and set of start, end times and that it should generate the command for u. As a bonus ask it to give u the example as well so that it doesn't misunderstands! i think even chatgpt mini should be able to do it.

drewp 5 days ago

I found some existing mpv scripts:

https://github.com/oltodosel/mpv-scripts/blob/master/show_ch... display chapter names as OSD

https://gitlab.com/lvml/mpv-plugin-excerpt press 'i' and 'o' for in/out points, then 'x' to make a new (auto-named) file.

https://github.com/shinchiro/mpv-createchapter press 'shift-c' to mark chapters; export as xml file.

https://github.com/mar04/chapters_for_mpv mark chapter times, input titles, save as txt file

By having an LLM name the chapters, I meant having whisper do speechrec on the chapter and then asking an LM to summarize the content into a name up to k chars.