Linux

Tag Archives: Gamers

So apparently i am writing this like a new post. I had a script for streaming to twitch.tv with ffmpeg, but apparently it doesn’t work for that anymore. So i found a script on github that i will share with you. This time it is using avconv.

Open a terminal, and create a file in your home directory or where ever you want, and name it “twitch-stream“, with this command “touch twitch-stream“. Then open it with a editor, and add this script to it.

4.) you can set your QUAL= <– i have it set to ultrafast. Really depends on your bandwith

5.) this script is telling us to put your live twitch key in a file in your home directory called “.twitch_key” .. so in our home directory we just type in “touch .twitch_key“, and then get our key from http://twitch.tv/broadcast. (you must be logged in to twitch.tv, and press the “Show Key” button on the right) Copy and past your key into “.twitch_key”, then save it.

6.) then run “chmod +x twitch-stream“

I just tested this out on my laptop and i had to install something extra, because it was giving me an error “Unrecognized option ‘preset’ Failed to set value ‘ultrafast’ for option ‘preset’“. So i did “sudo apt-get install libavcodec-extra-53", and tried to run my script again. It started up, and i was able to view it on my twitch page. Also found out that sound wasn't working, so i noticed in the script that it is using libmp3lame. So make sure you install lame with "sudo apt-get install lame". It should now work well.

I hope this works out better than the last script with ffmpeg. I know it was working for me when i first created that last one, but it wasn’t working when i just tried it. Sorry for all that confusion.

-Orkultus-

PS: if you want to stream to justin.tv, you just change the line on the bottom from “rtmp://live.twitch.tv/app/$STREAM_KEY“, to “rtmp://live.justin.tv/app/$STREAM_KEY“