Skip to content

Using GPT to generate bash scripts that use ffmpeg commands to process videos

Notifications You must be signed in to change notification settings

apirrone/ffmpeg_gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ffmpeg_gpt

Using GPT to generate bash scripts that use ffmpeg commands to process videos.

Installation

From pypi

pip install ffmpeg_gpt

From source

git clone https://github.com/apirrone/ffmpeg_gpt
cd ffmpeg_gpt
pip install .

Set yout openai api key as an environment variable (put it in your .bashrc or equivalent for convenience)

export OPENAI_API_KEY=<your_api_key>

Usage examples

$ ffmpeg-gpt "flip the video input.mp4 vertically, and export all its frames in a directory named out"

Generated script: 
===========
#!/bin/bash

mkdir out
ffmpeg -i input.mp4 -vf "vflip" -q:v 1 out/frame%04d.jpg
===========
Do you want to run this script? ([Y]/n): 

About

Using GPT to generate bash scripts that use ffmpeg commands to process videos

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages