Skip to content

A simple video archive including video transcoding

License

Notifications You must be signed in to change notification settings

Seitenbau/SBideo

Repository files navigation

SBideo Build Status Dependencies

DEMO: https://seitenbau.github.io/SBideo/

A very simplistic video archive including video transcoding and following features:

  • web interface for listing all videos in a flexible multi-level folder structure
  • video player
  • editable metadata for videos and folders e.g. title, description, speaker, tags
  • ultra fast client-side fuzzy search through video metadata
  • async video transcoding from any ffmpeg supported format to mp4
  • simple file system based data structure, no database required
  • deep links for every video, including exact start time
  • integrated web- and pseudo-streaming server (express)
  • very lightweight client-side code: total 28kb JS + 6kb CSS gzipped (based on preact-cli)

Basic Usage

The easiest way to run SBideo is using Docker, there are ready-built containers available at Docker Hub.

Frontend Container

Just pull the frontend container and mount it to your local data folder. Look at the the data folder in this repo as a reference for your directory layout.

docker pull seitenbau/sbideo
docker run -it -d -P -p 3000:3000 --mount type=bind,source=/data,target=/data sbideo:latest

Now the frontend is available at http://localhost:3000/

Transcoding Container

The SBideo frontend is only able to handle mp4 video, as it's the best format for showing videos on the web. To convert other video files to mp4, SBideo comes with a transcoding option which handles all sorts of video formats. All the video files you put in your /incoming folder will be automatically transcoded and transferred to the /data folder in this example:

docker pull seitenbau/sbideo-transcoder
docker run -it -d -P --mount type=bind,source=/incoming,target=/incoming --mount type=bind,source=/data,target=/data sbideo-transcoder:latest

Now every time you add video files into the folder incoming, the transcoding will start automatically. After transcoding is done, the new videos will be visible in the frontend.

Security

SBideo is kept very simple. Therefore, it has no built-in permission management etc (see #9). Everyone who is able to access the frontend is allowed to edit the video meta data. In case you want to restrict editing rights, you may want to simple restrict POST requests to the server via a reverse proxy.

Development

SBideo is based on preact-cli; for detailed explanation on how things work, checkout the CLI Readme.

Basic CLI Commands

# install dependencies
yarn install

# serve with hot reload at localhost:8080
yarn dev

# build for production with minification
yarn build

# test the production build locally
yarn serve

# run tests with jest and preact-render-spy
yarn test

# code linting
yarn lint

Migrate script

In case you want to migrate an old file based video archive, check the branch migrateScript; maybe it helps.

Credits

This project was initially created at SEITENBAU Hackathon 2017.

Demo videos: (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org