ffmpegbyexample.com is a documentation website to showcase all unique and different ways to use FFmpeg.
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
The site is staticly generated using hugo and deployed on netlify. The serverless API is based on Netlify Functions.
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"
This project has two main components:
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
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": "[email protected]",
"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": "",
}'
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.
This work is licensed under a Creative Commons Attribution 4.0 International License.