[Guide] Two PC configuration without Capturecard

Bishops

New Member
oh well, i appreciate the help guys i really do, you both went above and beyond to try and help me, this is the first thing that has ever defeated me on the computer, usually if i put my mind to something i can do it, wether it take days of reading or not, but either something with my setup is stopping me or im just clueless to this, guess ima have to give up, ima try one more time since jack0r was nice enough to upload that code, will copy paste and setup exactly as you have it, see if it works which i doubt it will. Thanks guys !
 

Bishops

New Member
omgomg !!!! one major step closer, i can now connect to nginx via transcode ! but nothing ever comes onto my stream =( is it my ffmpeg line?
@Echo Off
:ffmpeg_start
ffmpeg -re -i rtmp://192.168.1.5:1935/transcode/720p -vcodec libx264 -preset faster -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -r 60 -b:v 2000k -maxrate 2000k -bufsize 2000k -threads 12 -s hd720 -sws_flags spline -acodec copy -f flv rtmp://192.168.1.5:1935/live/720p
goto ffmpeg_start

does ffmpeg need to be linked to nginx somehow? i got it in seperate folder running completely seperately, also when i run it my pc spools up hard but its just a blank cmd

nginx conf


worker_processes 1;

error_log logs/rtmp_error.log debug;
pid logs/nginx.pid;

events {
worker_connections 1024;
}

rtmp {
server {
listen 1935;
chunk_size 8192;

application transcode {
live on;
meta copy;
}

application live {
live on;
meta copy;
push rtmp://live-syd.twitch.tv/app/live_63013472_7v6lGfXW0vm9zF2bonUkEWMxxxxx;
}
}}



PLEASEEEE reply, this is the furthest i have got and i must be so close ! <3
 
Last edited:

Jack0r

The Helping Squad
You should probably run ffmpeg manually, without the batch file. To see its console output. After a short initialization it should show you a line like this that is counting up frames:
eYToOyi.png
 

Jack0r

The Helping Squad
Oh you open a commandline window, navigate to the folder with your ffmpeg.exe. Then paste the full ffmpeg command into the commandline and after you press enter it should start working.
 

Bishops

New Member
wow thanks heapss ! its actually workiing, for some reason quicksync stops at 2000kbs instead of 25000? nvenc and x264 both go up to 25000 bitrate but quicksync just stops at 2000ish and stays green, abit weird? thiis is obviously a different issue, thanks so much for your time !
 
Last edited:

Torey

New Member
Is there anyway I can tell if the nginx.config is activating avconv over ffmpeg after I installed ffmpeg manually?
 

firefist235

New Member
Hi all,
i have the rtmp up and running, but i have a problem with stuttering
I am streaming with a bitrate of 25000kbits and 7000k buffer to my RTMP Server. The RTMP Server uses a i5-2300 @ 2,8GHz with 4 Cores, 4 GB RAM, GBit LAN and system runs on a SSD. With my current setting file, the CPU never goes above 50% utilization. But when i watch the stream with VLC, i get the Video for about 5 secs, then it hangs for another 5 secs aprox. and so on.

My current nginx.conf
Code:
#user nobody;
worker_processes 4;

error_log /var/log/nginx/error.log;

events {
worker_connections 8096;
multi_accept on;
use epoll;
}

worker_rlimit_nofile 40000;

rtmp {
server {
listen 1935;
chunk_size 8192;

application transcode {
live on;
record off;
exec ffmpeg -re -i rtmp://localhost:1935/transcode/$name -vcodec libx264 -preset ultrafast -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -r 30 -b:v 3500k -maxrate 3500k -bufsize 3500k -threads 4 -s 1920x1200 -acodec copy -f flv rtmp://localhost:1935/live/${name};
}
application live {
live on;
record off;
#    push rtmp://live-fra.twitch.tv/app/###################################;
}
}
}
 

Jack0r

The Helping Squad
VLC is not the best way to check your stream unfortunately. The software is known to have problems with rtmp input. It sometimes seems to change from version to version.
I personally use a little webpage I set up (using nginx) with jwplayer to check the stream. You could also combine rtmpdump with vlc, that might work better than just VLC alone. Or instead of jwplayer use something like video.js.

Btw, did you check on twitch yet?
 

Jack0r

The Helping Squad
Hmm, you could try increasing your buffer to 25000. I myself barely use a custom buffer. Also make sure you have the latest version of ffmpeg. With my jwplayer test webpage I also check both streams. The original 25000kbps stream and the transcoded one, to see at which point a problem occurs.

Some users had better results using nginx after tweaking their network settings:
http://www.helping-squad.com/tweak-your-windows-network-settings-for-nginx/
(Changing registry values can break your system so do it carefully and on your own risk)
 

Torey

New Member
Where and what would someone enter if they wanted to save the 20,000 Mbps stream before it got encoded to 3500. I'd like to save it locally on the linux machine on a secondary drive for later editing videos for youtube.
This is what mine looks like at the moment.
exec ffmpeg -re -i rtmp://localhost:1935/transcode/test -vcodec libx264 -preset medium -x264opts nal-hrd=cbr:force-cfr=1:keyint=90 -r 45 -b:v 3000k -maxrate 3000k -bufsize 3000k -threads 12 -s 1280x720 -sws_flags spline -acodec copy -f flv rtmp://localhost:1935/live/test;
 

Torey

New Member
Do you have any idea what I could do to check if my end stream to the viewers is lagging because of me or my internet? Some days I can stream 4500 bitrate no lag, 3500, 2500, etc. Other days 2500 is a struggle. I'll change the Twitch server, do multiple (different) speed tests to check my upload to servers around Twitches. It's becoming quite annoying to diagnose. I'm sure it's my internet, but I'd like to confirm that somehow by catching the fully encoded stream before it leaves my network perhaps?

Edit,
Today is a good example. I used a plugin that tests the upload connection to any of twitches ingest servers. I had around 9.8 Mbps upload to each server but when streaming at 3500 bit rate it buffers/lags. I did the 5 minute version too so it shouldn't show some false speeds from a small test.
 
Last edited:

goldenh

New Member
If you're not a partnered streamer, twitch will cap your internet upload. So try uploading a file to google docs or something and see how your speed is. If it's fine, then twitch is the problem. If it's not, then your internet is the problem, and you'll have to figure out if the problem is inside your house (if you're trying to stream over WiFi, it almost certainly is that), or your provider. If you're not a partnered streamer, keep in mind a lot of people won't be able to watch your stream if it's over around 1500. So recording at higher def and then remixing it for youtube is definately the way to go.
 

alpinlol

Active Member
If you're not a partnered streamer, twitch will cap your internet upload. So try uploading a file to google docs or something and see how your speed is. If it's fine, then twitch is the problem. If it's not, then your internet is the problem, and you'll have to figure out if the problem is inside your house (if you're trying to stream over WiFi, it almost certainly is that), or your provider. If you're not a partnered streamer, keep in mind a lot of people won't be able to watch your stream if it's over around 1500. So recording at higher def and then remixing it for youtube is definately the way to go.

Twitch does not cap your Upload, please dont spread false Information. All that Twitch does is recommend not going excessively over 3500 Bitrate. For Streamers which are not affiliated with Twitch it is recommended to stay between 1500-2500 literally only to reduce the Chances of your Stream buffering on the Viewers End. Even then there are Certain Streamers that run into Buffering due to poor routing which can even happens to people with below 1000Bitrate
 
Last edited:

SwiiftYz

New Member
I'm sorry if this has been asked elsewhere in the thread, there's too many replies to go through the entire thing.

If I'm getting this right, I use my main PC with Quick Sync turned on to encode my stream and send it to the laptop running NGINX which then transcodes it and sends it through to Twitch. In doing that, will it lower my CPU/GPU usage on the main PC as Quick Sync is using my internal GPU and not my GTX 970?

I'm looking for anyway to avoid using a capture card as I only have a Display Port on this monitor.
 

firefist235

New Member
on linux you can use htop to show actual usage, there you can see the exectuted command line (if the nginx server is working)
 
Top