Giter Site home page Giter Site logo

ffmpeg-distributed's Introduction

ffmpeg-distributed

Distributed processing of videos using docker swarms Somewhat working - still need to implement searching through nested folders for video files, automatically joining encoded video segments and better error handling. Also need to delete docker services when they are completed

What is this?

Have high quality video files but not enough disk space? Don't mind using lossy compression? This project aims to use FFMPEG's ability to split videos into keyframe segments to simultaneously encode the same video across multiple physical machines. By default, this uses CPU only and HEVC encoding for the best quality for a given bitrate.

Is this for you?

  • You have access to cheap/free machines
  • Not overly expensive electricity
  • Lots of videos to encode

Otherwise, it may be cheaper to use some online video encoding services which provision cloud services to do the processing instead.

Deployment

Some steps are still not automated :(

You will need to provision a machine for NFS reasons - docker containers can nicely bind to NFS mounts :) NFS machines should have static IP addresses. By default, this project mounts NFS shares as /mnt/nfs-ffmpeg in manager and worker machines.

You will need to manually install docker on manager machines and initialise the docker swarm.

Scripts have been tested on fresh Ubuntu 18.04 installs. Make sure you update the node-install.sh file with the correct docker swarm worker token and the correct NFS address.

chmod +x node-install.sh
./node-install.sh

There may be a bug in which the node has not joined the swarm - in that case you may have to manually join the swarm (though necessary packages should be successfully installed)

You will then need to manually add the hostname and MAC addresses of your nodes to scheduler/global_var.py if you wish to take advantage of Wake-on-lan for power saving measures when nodes are inactive. You may also need to update the mount point of the NFS partition.

After you are done, simply run scheduler/scheduler.py :) The script will automatically run any files it finds in the NFS directory that requires processing, split it and encode each segment.

You will need to manually rejoin the encoded segments using FFMPEG :(

ffmpeg-distributed's People

Contributors

twelfthghast avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

luongvy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.