README 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # -*- mode: org; org-html-head-include-default-style: nil; org-html-postamble: nil; after-save-hook: 'org-md-export-to-markdown; -*-
  2. #+OPTIONS: toc:nil num:nil
  3. * Tubo
  4. Tubo is a streaming front-end focused on bringing the [[https://github.com/TeamNewPipe/NewPipe][NewPipe]] experience to the web. It aims at providing a clean and simple user interface to consume media from your favorite streaming platforms. It currently supports the same services as NewPipe, including YouTube, SoundCloud, Bandcamp, and more.
  5. To retrieve the data, it wraps the excellent [[https://github.com/TeamNewPipe/NewPipeExtractor][NewPipe Extractor]] library and it exposes the extracted data over a REST API that is consumed by a local re-frame SPA.
  6. ** Screenshots
  7. | https://files.migalmoreno.com/tubo_stream.jpg | https://files.migalmoreno.com/tubo_channel.jpg |
  8. |-----------------------------------------------+------------------------------------------------|
  9. | https://files.migalmoreno.com/tubo_queue.jpg | https://files.migalmoreno.com/tubo_search.jpg |
  10. ** Features
  11. - [X] No ads
  12. - [X] Background player
  13. - [X] Playback queue
  14. - [X] Bookmarked Playlists
  15. - [X] Settings
  16. - [ ] Subscriptions
  17. - [ ] User login
  18. ** Instances
  19. | URL | Country |
  20. |-----------------------------------------+---------|
  21. | https://tubo.migalmoreno.com (Official) | 🇪🇸 |
  22. | [[https://tubo.reallyaweso.me][https://tubo.reallyaweso.me]] | 🇩🇪 |
  23. | [[https://tubo.ducks.party][https://tubo.ducks.party]] | 🇩🇪 |
  24. ** Installation
  25. *** Packaging
  26. **** Uberjar
  27. To bundle the whole project into a self-contained uber-jar you need to follow these build steps:
  28. #+begin_src sh
  29. npm i
  30. npm run build
  31. clojure -T:frontend:build uberjar
  32. #+end_src
  33. After the last command is completed, you'll get a path to the uber-jar, which you can run like this:
  34. #+begin_src sh
  35. java -jar target/tubo-<VERSION>.jar
  36. #+end_src
  37. **** Docker
  38. Alternatively, you can use Docker to set up Tubo. Simply invoke this:
  39. #+begin_src sh
  40. docker-compose up -d
  41. #+end_src
  42. **** Manual
  43. You can also set up Tubo manually via the [[https://guix.gnu.org/][GNU Guix]] package manager. First, download the necessary tooling:
  44. #+begin_src sh
  45. cd /path/to/tubo
  46. guix shell
  47. #+end_src
  48. Then, compile the downloader ahead-of-time:
  49. #+begin_src sh
  50. clojure -M -e "(compile 'tubo.downloader-impl)"
  51. #+end_src
  52. Fetch the front-end dependencies and build the front-end assets.
  53. #+begin_src sh
  54. npm i
  55. npm run build
  56. #+end_src
  57. Finally, compile the front-end.
  58. #+begin_src sh
  59. clojure -M:frontend release tubo
  60. #+end_src
  61. You can now start a local server that listens on port 3000 by running this:
  62. #+begin_src sh
  63. clojure -M:run
  64. #+end_src
  65. Access the front-end in your browser at =http://localhost:3000=.
  66. *** Reverse Proxy
  67. If you want to self-host Tubo and make it publicly accessible you'll need to set up a reverse proxy.
  68. **** Nginx
  69. #+begin_src nginx
  70. server {
  71. listen 443 ssl http2;
  72. server_name tubo.<YOUR_DOMAIN>;
  73. ssl_certificate /etc/letsencrypt/live/tubo.<YOUR_DOMAIN>/fullchain.pem;
  74. ssl_certificate_key /etc/letsencrypt/live/tubo.<YOUR_DOMAIN>/privkey.pem;
  75. location / {
  76. proxy_pass http://localhost:3000;
  77. proxy_set_header X-Forwarded-For $remote_addr;
  78. proxy_set_header HOST $http_host;
  79. }
  80. }
  81. #+end_src
  82. ** Browser Extension Support
  83. *** [[https://github.com/einaregilsson/Redirector][Redirector]]
  84. You can manually add any redirect rule based on regex patterns with this extension. Below are some sample configurations to redirect links from supported services to Tubo so you can get a basic idea of how to write manual Redirector rules. Note the =serviceId= of each service is: YouTube (0), SoundCloud(1), media.ccc.de(2), PeerTube(3), and Bandcamp(4). Replace https://tubo.migalmoreno.com/ in the redirect rule to the instance of your choice.
  85. #+begin_src
  86. Description: YouTube video to Tubo stream
  87. Example URL: https://www.youtube.com/watch?v=YE7VzlLtp-4
  88. Include pattern: ^((?:https?://)(?:www.)?youtube.com/(watch\?v.*|shorts/.*))
  89. Redirect to: https://tubo.migalmoreno.com/stream?url=$1
  90. Example result:
  91. https://tubo.migalmoreno.com/stream?url=https://www.youtube.com/watch?v=YE7VzlLtp-4
  92. Pattern type: Regular Expression
  93. Apply to: Main window (address bar)
  94. #+end_src
  95. #+begin_src
  96. Description: SoundCloud stream to Tubo stream
  97. Example URL: https://soundcloud.com/unfa/stop-the-panic
  98. Include pattern: ^((?:https?://)(?:www.)?soundcloud.com/.*/.*)
  99. Redirect to: https://tubo.migalmoreno.com/stream?url=$1
  100. Example result:
  101. https://tubo.migalmoreno.com/stream?url=https://soundcloud.com/unfa/stop-the-panic
  102. Pattern type: Regular Expression
  103. Apply to: Main window (address bar)
  104. #+end_src
  105. #+begin_src
  106. Description: Bandcamp album to Tubo playlist
  107. Example URL: https://unfa.bandcamp.com/album/suppressed
  108. Include pattern: ^((?:https?://)(.*\.)?bandcamp.com/album/.*)
  109. Redirect to: https://tubo.migalmoreno.com/playlist?url=$1
  110. Example result: https://tubo.migalmoreno.com/playlist?url=https://unfa.bandcamp.com/album/suppressed
  111. Pattern type: Regular Expression
  112. Apply to: Main window (address bar)
  113. #+end_src
  114. #+begin_src
  115. Description: PeerTube (Framatube) channel to Tubo channel
  116. Example URL: https://framatube.org/accounts/framasoft@framatube.org
  117. Include pattern: ^((?:https?://)(?:www.)?framatube.org/accounts/.*)
  118. Redirect to: https://tubo.migalmoreno.com/channel?url=$1
  119. Example result:
  120. https://tubo.migalmoreno.com/channel?url=https://framatube.org/accounts/framasoft@framatube.org
  121. Pattern type: Regular Expression
  122. Apply to: Main window (address bar)
  123. #+end_src
  124. #+begin_src
  125. Description: media.ccc.de search query to Tubo search query
  126. Example URL: https://media.ccc.de/search/?q=37c3
  127. Include pattern: ^(?:https?://)media.ccc.de/search/\?q=(.*)
  128. Redirect to: https://tubo.migalmoreno.com/search?query=$1&serviceId=2
  129. Example result: https://tubo.migalmoreno.com/search?query=37c3&serviceId=2
  130. Pattern type: Regular Expression
  131. Apply to: Main window (address bar)
  132. #+end_src
  133. *** [[https://github.com/libredirect/browser_extension][LibRedirect]]
  134. Redirects many popular services to their alternative front-ends. Has a ton of features and an active community. Tubo is supported by default for YouTube and SoundCloud, so no need to do anything for these. The rest of services are pending as per [[https://github.com/libredirect/browser_extension/issues/884][#884]].
  135. *** [[https://github.com/dybdeskarphet/privacy-redirector][Privacy Redirector]]
  136. A userscript that redirects popular social media platforms to their privacy respecting front-ends.