项目作者: alfg

项目描述 :
FFmpeg websocket server for ffmpeg-commander.
高级语言: Go
项目地址: git://github.com/alfg/ffmpegd.git
创建时间: 2021-02-23T08:10:38Z
项目社区:https://github.com/alfg/ffmpegd

开源协议:MIT License

下载


ffmpegd

FFmpeg websocket server and API for FFmpeg Commander.

*Currently a work-in-progress! Bugs and breaking changes are expected.

GoDoc
Go Report Card

Docker Pulls
Docker Automated build

Go
Docker Image Push
goreleaser

How It Works

ffmpegd connects FFmpeg Commander to ffmpeg by providing a websocket server to send encode tasks and receive realtime progress updates back to the browser. This allows using ffmpeg-commander as a GUI for ffmpeg.

The goal is to provide a simple interface for sending FFmpeg tasks from the browser (and other supported clients in the future) to your local machine.

See Usage for more details.

  1. process websocket
  2. [ffmpeg] <-------> [ffmpegd] <-----------> [ffmpeg-commander]

Install

Go

  1. $ go install github.com/alfg/ffmpegd@latest

Download

Release binaries for your platform at:
https://github.com/alfg/ffmpegd/releases

Docker

A Docker image is available with alfg/ffmpeg build installed:

  1. $ docker run -it -p 8080:8080 -v /tmp/:/home alfg/ffmpegd

Or via GitHub Container Registry:

  1. $ docker run -it -p 8080:8080 -v /tmp/:/home ghcr.io/alfg/ffmpegd

Or using the docker-compose example:

  1. $ docker-compose up ffmpegd

Homebrew

TBD

Usage

  • ffmpeg must be installed and available on your $PATH.
  • Run ffmpegd:
    1. $ ffmpegd

This wil start the websocket server in your current working directory and wait for a connection.

Example

ffmpegd with a job in progress from ffmpeg-commander

  1. $ ffmpegd
  2. ███████╗███████╗███╗ ███╗██████╗ ███████╗ ██████╗ ██████╗
  3. ██╔════╝██╔════╝████╗ ████║██╔══██╗██╔════╝██╔════╝ ██╔══██╗
  4. █████╗ █████╗ ██╔████╔██║██████╔╝█████╗ ██║ ███╗██║ ██║
  5. ██╔══╝ ██╔══╝ ██║╚██╔╝██║██╔═══╝ ██╔══╝ ██║ ██║██║ ██║
  6. ██║ ██║ ██║ ╚═╝ ██║██║ ███████╗╚██████╔╝██████╔╝
  7. ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚═════╝
  8. v0.0.8
  9. [ffmpegd] - websocket server for ffmpeg-commander.
  10. Checking FFmpeg version....4.3.1
  11. Checking FFprobe version...4.3.1
  12. Server started on port :8080.
  13. - Go to https://alfg.github.io/ffmpeg-commander to connect!
  14. - ffmpegd must be enabled in ffmpeg-commander options!
  15. Encoding... 6111 / 17620 (34.68%) 3.37x @ 80.77

ffmpeg-commander

WebSocket Demo

See demo for a websocket client example.

Develop

  1. go build -v
  2. ./ffmpegd

Tests

  1. go test ./...

TODO

  • Logging levels and output

License

MIT