Project

hardcode

0.0
No commit activity in last 3 years
No release in over 3 years
stack-encode on steroids (using a rabbitmq worker queue)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 2.9.2
~> 2.1
~> 3.1
~> 2.7
~> 0.20
 Project Readme

Hardcode

stack-encode on steroids (using a rabbitmq worker queue)

Installation

Install the gem:

$ gem install hardcode

Dependencies

  • ruby >= 2.0
  • RabbitMQ
  • lsof

Usage

run harcode help for instructions

Example: Enqueue Encoding Jobs in RabbitMQ

Scan a directory for multimedia files, move them to the tmp directory and enqueue transcoding jobs if needed:

hardcode enqueue /home/media/import --destination /var/www/videos

Example: Start workers

Starts the sneakers based workers which will wait for transcoding jobs coming from the RabbitMQ queue:

hardcode work --debug

Running worker in production

Put the following systemd configuration under /usr/lib/systemd/system/hardcode-worker.service (for RHEL/CentOS 7) and adapt it to your needs:

[Unit]
Description=Hardcode Worker
After=syslog.target
After=network.target
After=rabbitmq-server.target

[Service]
EnvironmentFile=-/etc/sysconfig/hardcode
Type=forking
User=root
Group=root
ExecStart=/usr/local/bin/hardcode work

# Give a reasonable amount of time for the workers to start up/shut down
TimeoutSec=300

[Install]
WantedBy=multi-user.target

Start workers using systemd and enable it at boottime:

systemctl start hardcode-worker.service
systemctl enable hardcode-worker.service

Contributing

  1. Fork it ( https://github.com/[my-github-username]/hardcode/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request