Giter VIP home page Giter VIP logo

tstream's Introduction

TStream - Streaming from terminal

tstream.xyz | Join our Discord | Start Streaming

TStream

Install

Download pre-built package

The easiest way to install tstream is download it form our Release page. Make sure you download the version that match your Operating System

  • Unpack it with command: tar -xzf tstream_{version}_{os}_{arch}.tar.gz
  • Setup TStream to run it anywhere: cp tstream /usr/local/bin

Build from source

  • Install the Go toolchain
  • Clone the project: https://github.com/qnkhuat/tstream
  • Cd to tstream source code: cd tstream/
  • Build: go build cmd/tstream.go
  • Setup TStream to run it anywhere: cp tstream /usr/local/bin

Start Streaming

Just type tstream in the terminal and it will instruct you 🙂

If you want to start a private session run: tstream -private

(Optional) Tstream chat inside terminal

We also have a chat client on terminal, you can start it with tstream -chat after you've started your streaming session TStream chat

(Optional) Voice chat 🔈

Inside TStream chat client, you can turn on voice chat with command /unmute and turn off it with /mute

Self Host

This diagram is an overview of all needed components to run TStream

Overview of TStream

TServer

The easiest way to install tserver is download it from our Release page

Or if you prefer to build from source

  • Clone the repo git clone https://github.com/qnkhuat/tstream
  • Install the Go toolchain
  • Build the server package: cd tstream/tstream && go build cmd/server
  • Run it ./server

Optional configurations:

  • -host localhost:3000: Address to server tserver. Default is localhost:3000
  • -db .db: path to BoltDB file. This DB is used to store data like: finished streaming. Default is $(pwd)/.db

Test the server with curl http://localhost:3000/api/health. It should return the current time

Client web app

This is what currently running at tstream.xyz.

To run it:

  • Install nodejs
  • Clone the repo: git clone https://github.com/qnkhuat/tstream
  • cd to the client folder: cd client/
  • Install dependencies: npm install
  • Tell the client your the server address by: export REACT_APP_API_URL={your server address}
  • Run server: npm run start

Now go to localhost:3001, it should be exactly like tstream.xyz

For production I recommend using service like Vercel. It's free and very easy to setup

Streaming

By default the tstream package will stream to https://server.tstream.xyz

You can override it with by running tstream -server {your server address}.

For example : tstream -server http://localhost:3000

Upcoming features

  • One command to stream terminal session to web => just like tty-share
  • In room Chat
  • Voice chat
  • Stream playback
  • Private session
  • Multiple tabs support
  • User management system

tstream's People

Contributors

kooyooman avatar pistasjis avatar qnkhuat 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

tstream's Issues

Build instructions

Thanks for this, it's pretty cool concept. It would be cool if we could set a password to restrict the stream to just selected users. Is that on the to-do? [Edit] I just saw it's planned, sorry.

Any plans on adding build instructions? I'm not a big fan of downloading precompiled binaries, which also makes it more difficult to upgrade than just git pull and build. It would also allow using tstream on ARM devices, which are now very widespread.

Not related, but I may as well mention it just in case: while the stream worked flawlessly when viewed on a Debian machine in Firefox and Chromium, glitches appeared on my Solus machine from Firefox (Chromium not tested) with part or all of the text being rendered as square characters, mostly $PS1, but not only. In Nyxt browser, the web page only shows up briefly before it turns 100% white with nothing displayed. Both issues are probably not related to tstream itself and may be just local issues but never know, maybe tstream uses something that is not properly supported in all configurations.

What is tserver used for? Is that for hosting your own instance of the website?

Unable to specify Server with tstream.

First I started tserver

$ ./tserver 
TStream server v1.3.2
Serving at: localhost:3000

When another terminal is opened and TStream is launched with the same option as an example, streaming starts with https://tstream.club/

$ ./tstream -server http://localhost:3000                                                                                             
TStream v1.3.2                                                                                                                                                 
✔ Username: █atoken                                                                                                                                            
✔ Stream title: hoge█                                                                                                                                          
Press Enter to continue!                                                                                                                                       
🔥 Streaming at: https://tstream.club/matoken 

If you change the server from http://localhost:3000 to http://localhost:3000/, it has become an error

$ ./tstream -server http://localhost:3000/
TStream v1.3.2
✔ Username: █atoken
Stream title: hoge
Press Enter to continue!
Failed to connect to server
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6575a2]

goroutine 1 [running]:
golang.org/x/term.restore(0x0, 0x0, 0x0, 0x1c)
        /go/pkg/mod/golang.org/x/[email protected]/term_unix.go:57 +0x22
golang.org/x/term.Restore(...)
        /go/pkg/mod/golang.org/x/[email protected]/term.go:43
golang.org/x/crypto/ssh/terminal.Restore(...)
        /go/pkg/mod/golang.org/x/[email protected]/ssh/terminal/terminal.go:64
github.com/qnkhuat/tstream/pkg/ptyMaster.(*PtyMaster).Restore(...)
        /go/src/github.com/qnkhuat/tstream/tstream/pkg/ptyMaster/ptyMaster.go:90
github.com/qnkhuat/tstream/pkg/streamer.(*Streamer).Stop(0xc0000c5220, 0xc00002a4e0, 0x1b)
        /go/src/github.com/qnkhuat/tstream/tstream/pkg/streamer/streamer.go:272 +0x10f
github.com/qnkhuat/tstream/pkg/streamer.(*Streamer).Start(0xc0000c5220, 0x1b, 0xba69d9)
        /go/src/github.com/qnkhuat/tstream/tstream/pkg/streamer/streamer.go:90 +0x3f8
main.main()
        /go/src/github.com/qnkhuat/tstream/tstream/cmd/tstream.go:165 +0xb25

Debian sid amd64 environment tserver_1.3.2_linux_x86_64.tar.gz And TStream_1.3.2_linux_x86_64.tar.gz was used.

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.