docker
docker-compose
youtube-dl
binary (http://rg3.github.io/youtube-dl/)ffmpeg
binaryffprobe
binary
- Create an
.env
file (see included.env.dist
) and fill in the variable for the environment you want (e.g.prod
ordev
) - Create a your_env.json config file in
config/
and name it the same as your intended environment (see includeddev.json
) - Download the required binaries from their respective websites and put them in
volumes/vendor
docker-compose run producer npm i
docker-compose run consumer npm i
docker-compose run consumer npm run build
docker-compose run producer npm run build
docker-compose up
(-d)producer
docker-compose up
(-d)consumer
Post orders here.
{
"url" : "https://www.youtube.com/watch?v=9pCYyrlnRiY",
"swarm_hash" : "your_swarm_hash",
"quality" : "hd",
"upload_to" : "beefree",
"output" : "video",
"album_id" : 1
}
- "url" is the piece of content to download
- "swarm_hash" is the location to upload the content to (beefree profile hash in the case of beefree)
- "quality" :
hd
orsd
- "upload_to" :
beefree
,swarm
, ors3
* - "output" :
audio
orvideo
(video includes audio)
- *Be sure to fill out the required keys in the app config.
BeeFree specific:
- "album_id" : an album id for BeeFree to upload the videos to. If value is undefined/null, then new album is created.
Query this endpoint to get a work order. This will be popped from the redis queue and marked as pulled by a consumer.
Query this endpoint to get a specific order by the uuid provided
Query this endpoint to post a new order
Query this endpoint to post a order update
{
"uuid" : "https://www.youtube.com/watch?v=9pCYyrlnRiY",
"status" : "your_status",
"result" : "job_results" //optional
}
- All endpoints are configured to require a successful BASIC authentication with username/password.
- External in the sense that this is an advertised endpoint for the outside to request new orders.
- Internal in the sense that these are endpoints for communication between consumers and the producer.
Set env & config file, install docker (+compose), send an order to /api/post/order
. Producer takes the order, registers it in the SQLite DB, and pushes a work order to the Redis queue. Consumers pull from the Redis queue through the producer, and does work on the order (downloading, transcoding, uploading).
youtube-dl
is used for the downloading and transcoding of the videos, see http://rg3.github.io/youtube-dl/ffmpeg
andffprobe
are used as well.