Stream to twitch via ffmpeg

Hello guys,

before we start here… i know it does not 100% belongs to this topic, but the off-topic category was on read only…so im gonna start here…

Before you write anything… i know…some of you might think this is not a twitch thing but let me explain on why i think it is.

Just 1 Month ago i used a command to stream to twitch… i wanted a watermark in my streams…so to say…At this time it worked perfectly! Also my following test command
But then, just today… it stopped and i always got a I/O Error from ffmpeg as soon as it came to streaming to twitch…

Here is my command:

ffmpeg -re -i "YourFile.mkv" -c:v libx264 -preset veryfast -b:v 6000k -maxrate 6000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://live-ber.twitch.tv/app/live_XXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Since today, i get this error message everytime…maybe some of you have like an expierence…or is it something twitch dont support anymore?

Thank you for your help!

  1. is your stream key still correct
  2. did you try a different injest?

It might be possible that your server provider is blocking the outbound RTMP ports. So try a different injest from the berlin one and/or contact your server provider.

  1. yes quadra checked it.
  2. yea multiple times…

So the thing is, its not working on my private internet access too…
I dont have there anything blocked…so it seems to be a general thing…also tried different ffmpeg versions.
So its not twitch? 100%?

Btw thank you @BarryCarlyon so much for your help

It’s working fine here for me.

If it was twitch then every streamer using OBS would be complaining, as OBS iirc is FFMPEG under the hood.

You can also try the more basic FFMPEG test signal:

ffmpeg -re \
-f lavfi -i testsrc2=size=960x540 \
-f lavfi -i aevalsrc="sin(0*2*PI*t)" \
-vcodec libx264 \
-r 30 -g 30 \
-preset fast -vb 3000k -pix_fmt rgb24 \
-pix_fmt yuv420p \
-f flv \
rtmp://live-fra.twitch.tv/app/STREAMKEY

To exclude your source file being weird.

This paticular command is working correctly here on a server in Canada to the French injest. (Old command from my French server that I never updated to a nearer injest)

1 Like

So i finally got it to work… i tried to generate like 2-4 new stream keys…neither of them worked for me… i copy pasted it literally… and then after the fifth time…it worked! Thank you so much!!! And sry to disturb you guys… you all do an amazing job! <3

s’all good. Very odd that you needed to do that though

Yea kinda weird…but worked for me! Thanks bud, you can close it now!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.