John Smith
John Smith

Reputation: 6197

Streaming with ffmpeg kills my internet connection

Im trying to stream with ffmpeg to twitch.tv. Basically it works, but in time, my internet connection get knock-outed. I mean, if I run an infinite ping, I stop getting replies. Or I just cant browse on the internet.

Basically I used it like this:

ffmpeg -f dshow -i video="screen-capture-recorder" -vcodec libx264 -r 25 -pix_fmt yuv420p -preset ultrafast -f flv "rtmp://live.twitch.tv/app/live_****************"

it works for minutes.

But when I modify the command:

ffmpeg -rtbufsize 1500M -f dshow -i video="screen-capture-recorder" -vcodec libx264 -r 25 -pix_fmt yuv420p -preset ultrafast -f flv "rtmp://live.twitch.tv/app/live*******************"

it just wont send anything and floods my connection (I mean, connection breaks)

Of course, it sends me tons of "real-time buffer [screen-capture-recorder] [video input] too full or near too full (100% of size: 1500000000 [rtbufsize parameter])! frame dropped!" messages.

Cant it be set to adapt to my internet bandwidth, or at least dont kill my connection?

Upvotes: 1

Views: 2419

Answers (2)

Mike Versteeg
Mike Versteeg

Reputation: 1623

Have you tried uploading large files (simulating continuous streaming)? I have the exact same problem but then noticed it happens with all uploads, not just streaming. I suspect the cheap (Speedtouch) modem I got with my ADSL simply overheats and shuts down. Same thing does not happen when downloading btw.

Upvotes: 1

You should add -b:v 2500k -maxrate:v 2500k -minrate:v 2500k (Before -f flv) wich forces bitrate to 2.5 Mbps. Check your current upload and twist the values to fit it. I recommend not filling 100% of upload speed with this.

Also -b:a will force audio bitreate. 96k is a good value.

Upvotes: 2

Related Questions