Skip to content

eladg/ffmpeg-by-example

Repository files navigation

Logo of the project

FFmpeg By Example dot com

CC BY 4.0 Netlify Status

ffmpegbyexample.com is a documentation website to showcase all unique and different ways to use FFmpeg.

Contributing

Add Your Examples

One of the best and easy ways to contribute to the project is to showcase your ffmpeg script on the site. Send your contribution over at https://ffmpegbyexample.com/contribute

Building The Site Locally

The site is staticly generated using hugo and deployed on netlify. The serverless API is based on Netlify Functions.

Initial Configuration

Start by setting baseURL and apiURL on config.toml

title = "FFmpeg By Example"
baseURL = "https://www.ffmpegbyexample.com" or "http://localhost:1313"
enableRobotsTXT = true

[params]
  apiURL = "https://www.ffmpegbyexample.com" or "http://localhost:8888"

Developing

This project has two main components:

Static Website

The run the static site generator install hugo, and run the following commands:

$ git clone https://github.com/eladg/ffmpeg-by-example.git
$ cd ffmpeg-by-example
$ hugo server --disableFastRender --port 1313

You can now test the site locally by opening your browser at: http://localhost:1313

Serverless API

To develop & test the Serverless API, install netlify cli and run the following commands:

$ git clone https://github.com/eladg/ffmpeg-by-example.git
$ cd ffmpeg-by-example
$ netlify functions:serve -p 8888

You can now test the serverless API locally using something like:

curl 'http://localhost:8888/.netlify/functions/post_new_example' \
  -X POST 
  --data-raw '{
    "id":"JYU1IMXO",
    "version": "1.0",
    "enabled": true,
    "title": "Convert mp4 to aac file",
    "description": "A command to convert an mp4 video to aac audio",
    "author_name": "Elad Gariany",
    "author_email": "elad@gariany.com",
    "terminal_command": "ffmpeg -i input.mp4 -vn -c:a aac -q:a 1 output.aac",
    "categories": ["audio"], 
    "tags": ["aac"],
    "example_type": "no-preview",
    "example_player_data": "",
  }'

Deploying / Publishing

the main branch is set to auto deploy to https://ffmpeg-by-example.netlify.app for every successful build. Submit your PR to the main branch, once approved, it will be release automatically.

Licensing

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published