Skip to main content

Use GPT to generate ffmpeg commands

Project description

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): 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ffmpeg-gpt-0.1.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page