voodfy-transcocder
Voodfy Transcoder is an open source alternative to the existent cloud encoding services. It is a Queue system that encode videos by tasks.
Join us on our public Discord channel for news, discussions, and status updates.
Warning This project is still pre-release and is not ready for production usage.
Table of Contents
Prerequisites
To build from source, you need to have Go 1.14 or newer installed.
Design
Voodfy Transcoder is a queue system used on core of Voodfy to ingest videos using Livepeeer and sendding to IPFS/Filecoin using Powergate
Here's a high-level overview of the main components, and how Powergate interacts with IPFS and a Filecoin client:
Note in the diagram that the Lotus, Filecoin, IPFS, and Powrgate client node doesn't need to be in the same host where Voodfycli is running. They can, but isn't necessary.
To build and install the CLI, run:
$ make build-cli
The binary will be placed automatically in $GOPATH/bin
which in general is in $PATH
, so you can immediately run voodfycli
in your terminal.
You can run voodfycli
with the --help
flag to see the available commands:
$ voodfycli --help
NAME:
voodfycli - voodfycli it is the command line interface to add task on voodfy transcoder
USAGE:
main [global options] command [command options] [arguments...]
VERSION:
0.0.1
AUTHOR:
Voodfy <contact@voodfy.com>
COMMANDS:
signup, s setup an account at Voodfy
login, l login at Voodfy
add, a add a video to transcode
ipfs, ipfs send the result video transcoded to IPFS
directory, dt get a directory giving the resource id
store_config, sc show the default config at Filecoin
store, st store the resources on Filecoin
ping, p ping the queue
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
Example
Setup an account at Voodfy
Use the signup
or login
before any action
Using the signup
the prompt will ask your a secret after this store the ouput with safety
$ REDIS_BROKER="localhost:6379" REDIS_RESULT="localhost:6379" voodfycli signup
To login use the secret generated by signup
$ REDIS_BROKER="localhost:6379" REDIS_RESULT="localhost:6379" voodfycli login
Example using the command add
to transcode a video
Adding a video it's necessary to specify the full directory path
$ REDIS_BROKER="localhost:6379" REDIS_RESULT="localhost:6379" voodfycli add `environment` `directory` `filename` `resource_id` `tracker`
Adding to IPFS
To add to IPFS it's necessary the resourceId
directory
tracker
$ REDIS_BROKER="localhost:6379" REDIS_RESULT="localhost:6379" voodfycli ipfs `directory` `resourceID`
Storing a resource id on Filecoin
Storing the directory at Filecoin by Powergate is very simple.
$ REDIS_BROKER="localhost:6379" REDIS_RESULT="localhost:6379" voodfycli store `resource_id`
Installation
Voodfy transcoder installation involves running external dependencies, and wiring them correctly with Filecoin/Lotus IPFS and Powergate.
Please copy the example_conf/app.ini
example hosted in this repository creating a folder called with app.ini inside conf/app.ini
External dependencies
Powergate needs external dependencies in order to provide full functionality, in particular a synced Filecoin client and a IPFS node and a Redis running.
Filecoin client
Currently, we support the Lotus Filecoin client.
Fully syncing a Lotus node can take time, so be sure to check you're fully synced doing ./lotus sync status
.
IPFS node
A running IPFS node is needed.
Its Dockerhub repository if you want to run a contanerized version. Currently we're supporting v0.5.1. The API endpoint should be accessible to Powergate (port 5001, by default).
Queue system
To build the Powergate server, run:
$ make up
We'll soon provide better information about the integration with Lotus/Filecoin, IPFS and Powergate configurations, stay tuned! 📻
Contributing
This project is a work in progress. As such, there's a few things you can do right now to help out:
- Ask questions! We'll try to help. Be sure to drop a note (on the above issue) if there is anything you'd like to work on and we'll update the issue to let others know. Also get in touch on Discord.
- Open issues, file issues, submit pull requests!
- Perform code reviews. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
- Take a look at the code. Contributions here that would be most helpful are top-level comments about how it should look based on your understanding. Again, the more eyes the better.
- Add tests. There can never be enough tests.
Before you get started, be sure to read our contributors guide and our contributor covenant code of conduct.
Changelog
Changelog is published to Releases.
License
MIT