Re:Show HN: FFmpeg UI
by taylorfinley on Thursday June 15, 2023 @02:32AM
(#36337109)
ChatGPT makes a wonderful natural language interface for ffmpeg. I like to ask for a bash script that uses ffmpeg to achieve my goal. Recent example output:
[ Parent
| on HN ]
Same with the GPT-4 API for embedding within apps!
Example (in Go):
post_json := `{"model": "gpt-4-0613", "messages": [{"role": "system", "content": "You are an AI assistant for an instance of ffmpeg. Respond to the user message by running the run_ffmpeg_command function with command line parameters for the video conversion functionality that the user asked for. Use input.mp4 for the input filename and use output.mp4 for the output filename."}, {"role": "user", "content": ` + string(user_message_json) + `}], "functions": [{ "name": "run_ffmpeg_command", "description": "Run a ffmpeg command with parameters", "parameters": { "type": "object", "properties": { "params": { "type": "array", "items": { "type": "string", "description": "a parameter for the ffmpeg command" }, "description": "The parameters to pass into the ffmpeg command" } }, "required": ["params"] } } ], "function_call": { "name": "run_ffmpeg_command" } }`