Coder Social home page Coder Social logo

twitch-stream-script's Introduction

twitch-stream-script

A script that uses ffplay, ffmpeg and flv to stream to Twitch

Install the packages

sudo apt install vlc libluajit-5.1-2 libluajit-5.1-common libobs0 libxcb-xinput0 vlc-bin vlc-l10n vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-splitter vlc-plugin-visualization ffmpeg wget

Get the script

wget -O ~/streamscript.sh https://raw.githubusercontent.com/BeanGreen247/twitch-stream-script/master/streamscript-sample.sh

Things to change

ffmpeg part

  • 1680x1050 to your resolution

  • :0.0+1280 to :0.0 if you use one monitor

  • xxxx_xxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx in "rtmp://live-lax.twitch.tv/app/xxxx_xxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" by replacing the Xs with your Twitch dashboard >> Preferences >> Channel >> Clik on Copy button in Primary Stream key section and put the copied stuff like this "rtmp://live-lax.twitch.tv/app/1234_567891234_567891234567891234567891234567" (just an example)

  • in the -f pulse -filter_complex amerge -ac 2 -i 3 section change the 3 acording to the output of the following command

pacmd list-sources
  • And look for Monitor of CM106 Like Sound Device Analog Stereo and replace the 2 in -f pulse -ac 2 -i 2 with the index number

  • -f alsa -i default -vol 2000 - sets microphone input volume and make sure that your default microphone is the one you want to use

  • -f pulse -i 2 - get desktop audio from pulse

  • -filter_complex "[1:0][2:0]amix=inputs=2:duration=shortest" - mix both audio streams into one

ffplay part

  • -left 1325 -top 730 -video_size 380x360 - make sure to change these values as you need

Make executable

chmod +x streamscript.sh

To use

./streamscript.sh

videos

screenrecorder.sh - screen recording script finalized, new features

twitch-stream-script's People

Contributors

beangreen247 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.