Sign inSign up

ekrekeler/video-proxy

By ekrekeler

Updated about 5 years ago

Video search plugin for SyncTube

Image
0

1.2K

ekrekeler/video-proxy repository overview

Video search plugin for SyncTube

Installation

  • Install and open SyncTube project folder
  • Create user/res/js/custom.js file:
'use strict';
const JsApi = client.JsApi;
JsApi.addPlugin('videosearch');
  • Create user/res/plugins/videosearch folder
  • Open folder in terminal: cd user/res/plugins/videosearch
  • Download plugin:
curl -fsSLO https://raw.githubusercontent.com/ekrekeler/video-search/dev/index.js
curl -fsSLO https://raw.githubusercontent.com/ekrekeler/video-search/dev/style.css
  • Start the containers:
docker run -d --name="video-search" ekrekeler/video-search
docker run -d --name="video-proxy" -v video-cache:/proxy-cache -p 8080:8080 \
    -e "CACHE_SIZE=16g" -e "CACHE_AGE=1d" -e "SLICE_SIZE=1m" \
    -e "AUTH_HOST=video-search" -e "AUTH_PORT=5000" ekrekeler/video-proxy

Now there should be a button in synctube that can search for (anime) videos and queue them into the player.

Notes

  • While the nginx proxy isn't required, it comes in handy when video links are IP-restricted. It also has a caching feature to save on bandwidth when multiple users are requesting the same video through it. It is configured to check against the video-proxy container to ensure only previously retrieved URLs can be proxied through it.
  • Ideally the SyncTube server should have a decent network uplink speed to support the number of streams you plan to proxy. Usually, running this on a dedicated VPS to proxy 1080p video to multiple viewers isn't an issue.
  • Currently I am using traefik to proxy reqests to the Synctube server and the nginx server with the same domain name based on URL rules. The nginx server can be configured to do the same thing with a custom configuration file. See "Complex configuration" in the documentation for the nginx image.

Issues and Contributing

I have barely any experience with JavaScript. This plugin is basically a Frankenstein made of pieces from the octosubs and QSwitcher plugins. Thus, I do not plan on actively maintaining this. If you have an issue or an improvement to suggest, please create a pull request for it and I will see if I can merge it in.

Currently only searches anime sites using Anime Downloader. Really this wouldn't be possible without such an existing library that can scrape for video links. If you would the search to support other non-anime sites, you are welcome to fork this project and add your own integrations.

TODO:

  • Make it look pretty. Right now it resembles the state of my room.
  • Provide a docker compose file example

Tag summary

Content type

Image

Digest

Size

9.4 MB

Last updated

about 5 years ago

docker pull ekrekeler/video-proxy