diff --git a/package.json b/package.json index 85125ab..2dd52f4 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "private": "true", "scripts": { "debug": "DEBUG=* npx @11ty/eleventy", - "dev": "npx concurrently \"npx gulp\" \"npx @11ty/eleventy --serve\"", + "dev": "npx concurrently \"npx gulp\" \"npx @11ty/eleventy --serve --port 8082\"", "build": "npx gulp processAdoc && npx @11ty/eleventy" }, "keywords": [], diff --git a/posts/2023-11-07-ffmpegai.md b/posts/2023-11-07-ffmpegai.md new file mode 100644 index 0000000..0304e79 --- /dev/null +++ b/posts/2023-11-07-ffmpegai.md @@ -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? diff --git a/public/img/posts/2023-11-07-ffmpegai/cover.png b/public/img/posts/2023-11-07-ffmpegai/cover.png new file mode 100644 index 0000000..90e6761 Binary files /dev/null and b/public/img/posts/2023-11-07-ffmpegai/cover.png differ diff --git a/public/img/posts/2023-11-07-ffmpegai/example.png b/public/img/posts/2023-11-07-ffmpegai/example.png new file mode 100644 index 0000000..b465934 Binary files /dev/null and b/public/img/posts/2023-11-07-ffmpegai/example.png differ diff --git a/public/styles/post.css b/public/styles/post.css index 8913c1b..c93dbdb 100644 --- a/public/styles/post.css +++ b/public/styles/post.css @@ -147,6 +147,10 @@ figure { text-align: center; } +figure img { + width: 100%; +} + figcaption { font-style: italic; text-align: center;