Personal video streaming server.

Overview

tube GoDoc

This is a Golang project to build a self hosted "tube"-style video player for watching your own video collection over HTTP or hosting your own channel for others to watch.

Some of the key features include:

  • Easy to add videos (just move a file into the folder)
  • No database (video info pulled from file metadata)
  • No JavaScript (the player UI is entirely HTML)
  • Easy to customize CSS and HTML template
  • Automatically generates RSS feed (at /feed.xml)
  • Builtin Tor onion service support
  • Clean, simple, familiar UI

Currently only supports MP4 video files so you may need to re-encode your media to MP4 using something like ffmpeg.

Since all of the video info comes from metadata it's also useful to have a metadata editor such as EasyTAG (which supports attaching images as thumbnails too).

By default the server is configured to run on 127.0.0.1:0 which will assign a random port every time you run it. This is to avoid conflicting with other applications and to ensure privacy. You can configure this to be any specific host:port by editing config.json before running the server. You can also change the RSS feed details and library path from config.json.

installation

from release

  1. Download release for your platform
  2. Extract zip archive
  3. Run tube executable to start server (this will output the URL for accessing from a browser)
  4. Move videos to videos directory
  5. Open the URL from step 3 and enjoy!

from source

  1. Install Golang if you don't already have it
  2. go get github.com/wybiral/tube
  3. cd $GOPATH/src/github.com/wybiral/tube
  4. go run main.go (this will output the URL for accessing from a browser)
  5. Move videos to $GOPATH/src/github.com/wybiral/tube/videos
  6. Open the URL from step 4 and enjoy!
Comments
  • Add Docker support

    Add Docker support

    Hi wybiral! I saw your awesome project on GitHub, and works well. I want to add Docker support for this project, so I add Dockerfile and build an image on my Arch Linux machine, it works well. image

    image

    but I change a huge amount of files.

    1 I make a new dir call config, and move config.json to this dir, so user can use custom config.json override default when using docker container with -v /path/to/your/own/config.json:/container/default/config.json

    2 I remove vendor dir, when I clone this repo, execute go mod init go mod tidy, I can run go build -o tube . without error in project root directory. I'm a newbee in golang, correct me how can I build tube without remove vendor dir

    opened by brownchow 1
  • Documentation

    Documentation

    Don't release an official v0.0.1 until this thing is better documented. Both in terms of README and in terms of code comments.

    This should be the last thing done before v0.0.1 and will probably involve a general code review to catch any missing documentation and to make sure the behavior is consistent with the docs.

    documentation 
    opened by wybiral 1
  • RSS Feed

    RSS Feed

    An RSS feed should be generated from the scanned files and provided at some endpoint (maybe /feed.xml). Even better if it supports JSON feeds too (/feed.json).

    Most likely implementation: https://github.com/gorilla/feeds

    enhancement 
    opened by wybiral 1
  • Library Update

    Library Update

    Having to restart the server to update the library is really annoying and it would interrupt any streams currently playing. Here are some possibilities:

    • Watch the videos directory for file changes and update (best)
    • Provide a way to force an update on demand
    • Update at a configurable interval
    enhancement 
    opened by wybiral 1
  • Build zip archives

    Build zip archives

    Requiring a proper Go environment setup is messy and not user friendly at all. The solution will be to build the project as a zip archive for each platform containing the relative static files and binary application.

    This will probably be done with a Python script.

    enhancement 
    opened by wybiral 0
  • Better error messages

    Better error messages

    Errors like #15 should be more clear about why they're happening. In that case it was because the Tor controller port wasn't open so the application should notify the user about this and possibly recommend a solution (disable Tor or check the daemon, in this case).

    enhancement 
    opened by wybiral 0
  • Cache the feed

    Cache the feed

    Currently the RSS feed is generated every time it's requested. That's pretty wasteful if people are requesting the feed at some frequency, especially if there are a lot of videos in the library. It would be best to only build the feed after the library changes.

    It's probably easiest to move the feed generating portion into the Library type. It is a feed of the library, after all. Otherwise we'd need some kind of messaging to trigger the outside components when the library is changed.

    bug 
    opened by wybiral 0
  • Use onion address for feed defaults

    Use onion address for feed defaults

    If no explicit external_url or link values are supplied in config.json and you run the server as a Tor onion service the server should plug in the onion address for those values.

    This will make it easier to subscribe from RSS readers through a Tor proxy without any setup from a hosting perspective.

    enhancement 
    opened by wybiral 0
  • Tor hidden service

    Tor hidden service

    Add the following (optional) structure to config.json:

    "tor": {
      "onion_file": "/path/to/key/file",
      "controller": {
        "host": "127.0.0.1",
        "port": 9051
      }
    }
    

    If it exists the server will start a Tor hidden service using the onion key file routed to the local host:port TCP server. If the tor structure is in the config file but onion_file is blank a random onion will be generated.

    To make things even smoother, when the external_url property of feed is blank it can be filled with the onion address.

    This will make it easy to publish content on Tor in a way that RSS readers can subscribe to and remotely access.

    Outside the scope of this project: if someone implemented a Tor proxied feed reader into the backend of this you could build a YouTube-like application where people could subscribe to peer videos and host their own. Just an idea.

    enhancement 
    opened by wybiral 0
  • Debounce watcher

    Debounce watcher

    Currently the watcher is working overtime while a large file is being copied into the library because every flush during the copy triggers a write event in fsnotify which results in a bunch of unnecessary Library.Remove & Library.Add calls.

    This can be fixed by debouncing the watcher so that events don't cause an action on a specific path until a fixed amount of time passes with no events. It may even be optimal to just accumulate all changes to the library and perform them in batch after a reasonable debounce time.

    bug 
    opened by wybiral 0
  • Multiple library paths

    Multiple library paths

    It would be useful to support multiple library paths instead of just one. Something like this in the config.json file:

    {
      "libraries": [
        {"path": "/path/to/season01", "prefix": "s01"},
        {"path": "/path/to/season02", "prefix": "s02"}
      ]
    }
    

    The prefixes will be included in the URL paths, so you might have /v/s01/e01 and so on. This will ensure that all names are unique across multiple library paths and allow for some hierarchical structuring.

    Using "prefix" as the key may be too ambiguous though. Consider using "name" or "id" or something.

    One question this opens is how to visually convey the path difference in the UI. Especially in the sidebar video selection. Could be another line like the modified field?

    enhancement 
    opened by wybiral 0
  • About the number of visits supported at the same time

    About the number of visits supported at the same time

    Hi: I want to know how many people can access this system at the same time on the premise that the network bandwidth is not a problem? After the deployment of the intranet, I found that the response speed of about 6 or 7 simultaneous accesses became very slow or even stuck. Is there any optimization method?

    opened by dht-hedaihua 0
  • Can't find config.json under ubuntu server

    Can't find config.json under ubuntu server

    Hey,

    1)about config.json When I try to run tube as a service under ubuntu 16 tls , tube can't load the config.json file automatic,but it can work well under command line in the tube folder. how about add a function like -c /path/config.json ?

    1. If organize videos with folders ,will tube support it ?

    best regards

    opened by shangyanjin 0
  • Add Container support

    Add Container support

    Hi wybiral I add a Dockerfile to make this project able to run in container. to mount a config.json file from host machine, I change the project structure, move config.json to config dir. and, I also update the README.md image

    thanks!

    opened by brownchow 0
Releases(v1.1.0)
Owner
davy wybiral
making and breaking
davy wybiral
Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Take control over your content and stream it yourself. Explore the docs » View Demo · Use Our Server for Testing · FAQ · Report Bug Table of Contents

Owncast 6.7k Nov 21, 2022
Go-video-preview-ffmpeg-wrapper - A simple helper wrapper to generate small webm video previews using ffmpeg, useful for web previews.

Go-video-preview-ffmpeg-wrapper A simple helper wrapper to generate small webm video previews using ffmpeg, useful for web previews. Getting Started u

Robert van Alphen 0 Jan 5, 2022
live streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

BigSillyBear 27 Nov 10, 2022
Parse and generate m3u8 playlists for Apple HTTP Live Streaming (HLS) in Golang (ported from gem https://github.com/sethdeckard/m3u8)

go-m3u8 Golang package for m3u8 (ported m3u8 gem https://github.com/sethdeckard/m3u8) go-m3u8 provides easy generation and parsing of m3u8 playlists d

Tan Quang Ngo 102 Nov 19, 2022
A live streaming tool more suitable for non-graphical servers

KPlayer KPlayer可以帮助你快速的在服务器上进行视频资源的循环直播推流。

null 148 Nov 20, 2022
Short video direct link acquisition 短视频直连获取工具

Glink 短视频去水印一键解析应用 Short video direct link acquisition 短视频直连获取工具 Glink是一款基于go语言开发的短视频解析应用,前端使用vue+argon主题,后端使用go-fiber框架,支持web在线模式、客户端模式。

佰阅 155 Nov 27, 2022
Quik.do is a video conferencing tool.

Quik.do is a video conferencing tool.

Bora Tanrıkulu 117 Nov 20, 2022
LiveKit - Open source, distributed video/audio rooms over WebRTC

LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. It's designed to give you everything you need to build real time video/audio capabilities in your applications.

LiveKit 4.2k Nov 25, 2022
Go4vl is Go library for working with the Video for Linux API (V4L2) natively, without any C bindings.

go4vl A Go library for working with the Video for Linux user API (V4L2). Gov4l hides all the complexities of working with V4L2 and exposes idiomatic G

Vladimir Vivien 128 Nov 17, 2022
A simple library to extract video and audio frames from media containers (based on libav).

Reisen A simple library to extract video and audio frames from media containers (based on libav, i.e. ffmpeg). Dependencies The library requires libav

NightGhost 73 Nov 15, 2022
Stream video from ffmpeg to webrtc

ffmpeg-to-webrtc demonstrates how to send video from ffmpeg to your browser using pion.

Artur Shellunts 870 Nov 24, 2022
Project to get Youtube video descriptions and search those videos as required

FamPayProject Project to get Youtube video descriptions and search those videos as required Prerequisities Postgres DB for persisting data Youtube Dat

null 0 Nov 5, 2021
Synthetic media is a realistic transformation of audio and video using artificial intelligence.

Synthetic media is a realistic transformation of audio and video using artificial intelligence.

null 1 Nov 20, 2021
Video converter with golang

Requirements Debian-like system (ubuntu, mint, etc...) with apt package manager Golang >1.15 Command tool make (use sudo apt install make -y to instal

Anaxita 2 Sep 10, 2022
golang function that download a video from youtube, and convert it to a mp3 file using ffmpeg

echedwnmp3 echedwnmp3 is a function that download a video from youtube, and convert it to a mp3 file using ffmpeg example package main import(echedwn

pai 4 Dec 7, 2021
lmmp3 is a little golang library that download a video from youtube, and convert it to a mp3 file using ffmpeg

lmmp3 lmmp3 is a function that download a video from youtube, and convert it to a mp3 file using ffmpeg You need to have installed ffmpeg in your syst

pai 8 Aug 12, 2022
ffcommander - An easy frontend to FFmpeg and Imagemagick to automatically process video and manipulate subtitles.

% FFCOMMANDER(1) ffcommander 2.39 % Mikael Hartzell (C) 2018 % 2021 Name ffcommander - An easy frontend to FFmpeg and Imagemagick to automatically pro

Mikael Hartzell 2 May 9, 2022
A go program that relies on back-end ffmpeg to process video-related content

Video Compress A go program that relies on back-end ffmpeg to process video-related content Installation v-go You can download the corresponding v-go

JokerHeyra 0 Dec 22, 2021
👾 Annie is a fast, simple and clean video downloader built with Go.

?? Annie is a fast, simple and clean video downloader built with Go. Installation Prerequisites Install via go install Homebrew (macOS only) Arch Linu

Rohan 1 Jun 1, 2022