GithubHelp home page GithubHelp logo

hauxir / rapidbay Goto Github PK

View Code? Open in Web Editor NEW
720.0 13.0 49.0 440 KB

Self-hosted torrent video streaming service compatible with Chromecast, AppleTV & Kodi deployable in the cloud

License: MIT License

Dockerfile 0.80% JavaScript 32.71% Python 51.94% HTML 9.74% CSS 4.60% Shell 0.21%
streaming-video p2p torrent torrent-stream peerflix tv-shows stream subtitles apple-tv chromecast

rapidbay's Introduction

RapidBay

Rapid bay is a self hosted video service/torrent client that makes playing videos from torrents as easy as:

  1. Opening the webapp on a phone/laptop/tablet/smartTV.
  2. Searching for content.
  3. Selecting desired video file.
  4. Waiting for Download/Conversion.
  5. Playing on the device or cast to AppleTV/Chromecast

Features:

  • Uses Jackett as a search backend.
  • Pick individual video files you want to play and the system takes care of the rest to make it streamable.
  • Automatic download of Closed Captions/Subtitles
  • Automatically converts the video file and subtitles to be playable on all browsers/chromecast/appletv
  • Automatically converts audio that is unsupported by browsers to AAC
  • Allows registering as a handler for any magnet link
  • Automatically cleans up disk space so you don't need to manage it yourself
  • Kodi support

Demo:

Setting up Jackett as a search backend:

Rapidbay requires the torrent indexer Jackett for searching. Have a look here on how to set it up using Docker.

There's also a docker-compose example file to show how you can connect rapidbay and jackett together.

Running:

Requires Docker

docker run -p 5000:5000 -e JACKETT_HOST="http://your.jacket.host" -e JACKETT_API_KEY="YourAPIKey" hauxir/rapidbay

App will be running at http://localhost:5000

Subtitles

You'll need a VIP account at OpenSubtitles.org for it to work:

-e OPENSUBTITLES_USERNAME=someusername -e OPENSUBTITLES_PASSWORD=yourpassword

Configuring which subtitles to download:

The default setting downloads english subtitles.

Add the env variable SUBTITLE_LANGUAGES to your docker params like so to get more languages:

-e SUBTITLE_LANGUAGES="['en', 'de', 'es']"

Require a password:

Add the env variable PASSWORD to your docker params like so to prompt for a password when opening rapidbay:

-e PASSWORD=YOURPASSWORD

Registering as a handler for any magnet link:

  • Go to https://<RAPIDBAY_HOST>/registerHandler and it should prompt you to register your running RapidBay instance as a default handler for torrent links on any torrent site!
  • You can also copy/paste a magnet link directly into the search bar to open magnet links manually.

Developing

Requires Docker + docker-compose

docker-compose up

Running RapidBay on a VPS

Setting RapidBay up on a VPS and tunnel torrent traffic through NordVPN

Using Kodi as a frontend

Setting up Rapidbay with Kodi

Using Real Debrid caching

rapidbay's People

Contributors

hauxir avatar olipayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rapidbay's Issues

`AttributeError: 'tuple' object has no attribute 'get'` with magnet link

Hi!

Thanks a lot for this project.
rapidbay displays results, but I get the following error when I click on a torrent provided by a magnet link:

194.110.113.73 - - [23/Feb/2023:09:15:09 +0000] "GET /api/search/big%20buck%20bunny HTTP/1.0" 200 17464 "https://rapidbay.example.org/search/big%20buck%20bunny" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0"
[2023-02-23 09:15:22,589] ERROR in app: Exception on /api/torrent_url_to_magnet/ [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/app.py", line 114, in decorated_function
    return f(*args, **kws)
  File "/app/app.py", line 185, in torrent_url_to_magnet
    magnet_link = torrent.make_magnet_from_torrent_file(filepath)
  File "/app/torrent.py", line 33, in make_magnet_from_torrent_file
    subj = metadata.get(b"info", {})
AttributeError: 'tuple' object has no attribute 'get'
194.110.113.73 - - [23/Feb/2023:09:15:22 +0000] "POST /api/torrent_url_to_magnet/ HTTP/1.0" 500 265 "https://rapidbay.example.org/torrent/https%3A%2F%2Fjackett.example.orgf%2Fdl%2Frutracker%2F%3Fjackett_apikey%3MYAPIKEY%26path%3DQ2ZESjhEZ09JNVo2TkxSSGxqaWxHR0lQaXJfUzhBNktjNEtLcVpFUGVKVzctZnlGdkRSQTFGZUU5SXU0LW9vR0ZIa2wxNWJXOWJwZDFaUVl2WTR5cEVieTlIeFlscTNwQm1jbzR4ckdJdE5ZRkkzdmdhRmJTU183dkJWM0dNVjRyNmtjTE9mWVpUT29ubFRzVlRQWUUxZzYyUjYxQTR4NEttNkZwU3NkN0RzOElJM0c%26file%3DBig%2BBuck%2BBunny%2B(Sacha%2BGoedegebure)%2B%255B2008%252C%2BBDRip%255D" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0"

Is it a problem with my setup?

Thanks a lot,
ev

Search results not rendering any results

I am trying to use the docker-compose file given for VPS, but I am using a local server. See Docker-compose file below.

My modifications:
I have avoided the usage of Caddy as I do not want to use it outside my local network. I believe this is the only use for Caddy here.
I was able to retrieve the Jackett API key and paste it as env var for rapidbay.
I am using a custom docker image for arm using this image as base: hauxir/libtorrent-python3-ubuntu-arm64v8:latest. Docker Build was smooth and successful without any other modifications.

Logs of RapidBay:

* Serving Flask app 'app' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.22.0.2:5000/ (Press CTRL+C to quit)

docker-compose:

version: "2"
services:
  nordvpn:
    cap_add:
    - NET_ADMIN
    devices:
      - /dev/net/tun
    environment:
      - USER=email
      - PASS=password
      - COUNTRY="United States"
    image: "azinchen/nordvpn"
    container_name: nordvpn
    restart: unless-stopped

  jackett:
    image: linuxserver/jackett
    volumes:
      - jackett_config:/config
    container_name: jackett
    ports:
      - 9117:9117
    restart: unless-stopped

  rapidbay:
    network_mode: "service:nordvpn"
    image: "dockerrepo/rapidbay-arm-0.0.1:latest"
    environment:
      - PASSWORD=123456
      - JACKETT_HOST=10.0.1.30
      - JACKETT_API_KEY=PLACEHOLDER_CHANGE_THIS_LATER
    container_name: rapidbay
    restart: unless-stopped

volumes: 
  jackett_config:
    driver: local  

What URL should I visit to access rapidbay?
I understand all traffic is going through the nordvpn container (network_mode: "service:nordvpn"). So no ports are exposed for the rapidbay container itself but in Dockerfile I see EXPOSE 5000.

Please advice. I am also trying to understand the networking aspects here. Thanks!
If this is successful, I can create a PR for the arm build as well if you want.

Add a Series Binge option

For example when watching "SomeSeries.S01.x264" torrent, there are many files inside that torrent, where each file contains an episode.

Add a way to binge those episodes, where after each episode, the next one starts downloading and streaming when an episode finishes.

more search results

it would be cool to have more sites such as yts.lt / 1337x / rarbg, anything else is working just perfectly, thank you.

[bug] Casting doesn't work

Seem to be having an issue with casting, any ideas?
Chome Version 115.0.5790.170 (Official Build) (x86_64) on Mac

chromecastjs.js:43 Uncaught ReferenceError: cast is not defined
    at ChromecastJS.ChromecastJS.cast (chromecastjs.js:43:9)
    at a.cast (app.js:469:20)
    at a.n [as cast] (vue.2.5.3.min.js:6:1236)
    at click (eval at wi (vue.2.5.3.min.js:6:52326), <anonymous>:3:106)
    at t (vue.2.5.3.min.js:6:7184)
    at e._withTask.e._withTask (vue.2.5.3.min.js:6:6863)

Screen Shot 2023-08-16 at 07 51 54

Improve Chromecast support

Chromecast support currently is quite primitive. It only sends the URL + subtitle file to the chromecast, leaving the Rapidbay app out of control of the chromecast from that point, requiring the user to use Google Home app to seek/play/pause/etc.

Improve the support, allowing for example to seek and control the volume and change subtitles of a file streaming on Chromecast.

Replace Basic HTTP Auth with a login view

Currently we use Basic HTTP Auth for the login.

This has been shown to be troublesome on some smart tvs.

Create a Login page that preferrably gets a token and stores in localStorage

Feature Request: More Debrid providers

Hi, I would like to request more debrid seedboxes to be supported.
Mostly interested in Debrid-Link.fr, but AllDebrid.com would also be nice.

Jackett is in my eyes the biggest scraper package there is out there. I want to use Jackett as a search engine and want it to return straight links to torrent files or magnet links without having to browse the sites. I know, many are behind cloudflare, but there's still a lot that aren't. And supporting private trackers makes Jackett even more attractive.

Can't be compared with what Kodi addon scrapers have to offer.

Your project seems to be close to what I am looking for and I definitely want to play around with it, possibly add some features.
Why Debrid-Link? Cuz they actually seed to 1.0 ratio if specified, that's what I like about them.
AllDebrid is super fast on the other hand but sometimes they end up zipping and splitting big downloads with many files instead of offering them as a directory with original path/file structure. They have a huge shared cache though, so mostly what you want to grab is already in the cache.

https://debrid-link.fr/api_doc/v2/introduction
Feel free to contact me on discord at Morpheas_GR#6295 if you need an API key/voucher to work on this and check out DL.

https://docs.alldebrid.com/#introduction

PS: Both providers offer read-only webdav 'mounts' to access requested files or fetched files, apart from having them accessible via their web app or via their api.

Less interested in being able to download them on any device, more interested in utilizing debrid services in combination with jackett for cache lookups and sending to debrid services.

Plan B: offer direct link to torrent file (not having to browse the sites) or magnet link in the web interface so I can use 'share' or 'open' commands on android along with some http request shortcuts to directly access them and send them to DL or AD.

Any help would be appreciated and thanks for your amazing work. :)

Add ability to manually start/stop a file download

Currently when a file has been selected out of a file list, the download starts immediately.

Add "Start Download" button to manually trigger the download.

Also add a "Stop Download" button while download is in progress.

Add ability to manually start/stop a file download

Currently when a file has been selected out of a file list, the download starts immediately.

Add "Start Download" button to manually trigger the download.

Also add a "Stop Download" button while download is in progress.

Feature Request - openvpn

I'm using the following transmission+openvpn docker container for downloading my torrents normally
docker.io/haugene/transmission-openvpn:3.7.1

It would be great if rapidbay could also include openvpn support to keep our identity secret ;)
or the ability to send a magnet link to another container to download

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.