Boosted by jsonstein@masto.deoan.org ("Jeff Sonstein"):
simon@simonwillison.net ("Simon Willison") wrote:
I had o4-mini write most of the plugin for me, based on an example existing plugin and this prompt. Transcript here: https://gist.github.com/simonw/4f545ecb347884d1d923dbc49550b8b0#response
![llm -m o4-mini -f github:simonw/llm-hacker-news -s 'write a new plugin called llm_video_frames.py which takes video:path-to-video.mp4 and creates a temporary directory which it then populates with one frame per second of that video using ffmpeg - then it returns a list of [llm.Attachment(path="path-to-frame1.jpg"), ...] - it should also support passing video:video.mp4?fps=2 to increase to two frames per second, and if you pass ?timestamps=1 or ×tamps=1 then it should add a text timestamp to the bottom right conner of each image with the mm:ss timestamp of that frame (or hh:mm:ss if more than one hour in) and the filename of the video without the path as well.' -o reasoning_effort high](https://files.mastodon.social/cache/media_attachments/files/114/456/513/696/891/008/original/2ba7070c6b72c0cc.png)