This commit is contained in:
2023-11-07 22:42:23 +07:00
parent 10812eabe1
commit 4eed7e6ed4
5 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
---
title: ffmpeg.ai
location: Pattaya, Thailand
excerpt: An OpenAI assistant to help with ffmpeg
ogType: article
cover: /public/img/posts/2023-11-07-ffmpegai/cover.png
---
![Cover](/public/img/posts/2023-11-07-ffmpegai/cover.png)
I wanted to get the first frame of a GIF.
How would I do that with ffmpeg?
With recent OpenAI announce, we can now use Assistant API.
Let's create an assistant then!
Add this function:
```json
{
"name": "ffmpeg",
"description": "Run ffmpeg with a few options",
"parameters": {
"type": "object",
"properties": {
"args": {
"type": "string",
"description": "The args to pass to ffmpeg"
}
},
"required": ["args"]
}
}
```
Cool, now we can press the little Test button in the corner and play with our assistant!
![Example](/public/img/posts/2023-11-07-ffmpegai/example.png)
Isn't that sweet?