[Guide] Two PC configuration without Capturecard

firefist235

New Member
i dont know why, but it runs now ;) I just installed Ubuntu Desktop all over and set ub nginx. Everything works now, except that the CPU gets nearly to 100% ;)

My ffmpeg Line:
exec ffmpeg -re -i rtmp://localhost/live/$name -vcodec libx264 -profile main -preset faster -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/live360p/${name};
 

psynaps

New Member
The faster preset is responsible. You simply need a faster CPU to run the faster preset with HD resolutions. Try veryfast, and I bet you get a HUGE reduction in CPU.
 

firefist235

New Member
The faster preset is responsible. You simply need a faster CPU to run the faster preset with HD resolutions. Try veryfast, and I bet you get a HUGE reduction in CPU.
I already considered that ^^ are there even noticeable differences between faster and veryfast?
I'm using an Intel i5-2300 @ 2,8GHz with 4 Cores, so i think no Single-Board-Computer will qualify to replace it. I'm I right?

EDIT: Should OBS do the downscaling or should nginx do that?
 
Last edited:

Torey

New Member
Does anyone have any really good settings for this? I can't get my stream to stop looking pixelated.

I have a Xeon E3 1231V3 Haswell CPU on the encoding side and using Gsync at 50K 25K or 15K doesn't seem to change much. Nor my bitrate to twitch. I tried using everything from 2K to 7K.
 
Last edited:

Torey

New Member
I already considered that ^^ are there even noticeable differences between faster and veryfast?
I'm using an Intel i5-2300 @ 2,8GHz with 4 Cores, so i think no Single-Board-Computer will qualify to replace it. I'm I right?

EDIT: Should OBS do the downscaling or should nginx do that?
You could look an i7 2600/2600K/2700 etc. 4 cores 8 threads.
 

Eska

New Member
Hello!

This is a cross post from here.

Im streaming using OBS on Windows (QuickSync), pushing 20k bitrate to 2nd PC based on linux (Debian Jessie 8.4.0, 64bit) in local network area (1gbps lan link).

Debian Jessie is a minimal linux instalation without X server (just CLI), where i compiled and installed nginx 1.10. with rtmp module.

Debian Jessie specs:

- AMD Athlon X2 64 4200
- 2GB RAM
- Regular 7200 RPM hdd


nginx.conf:

Code:
root@streamer:~# cat /usr/local/nginx/conf/nginx.conf
worker_processes 2;

error_log logs/error.log debug; events {
  worker_connections 1024;
}

rtmp {
  server {
  listen 1935;
  chunk_size 4000;

  application transcode {
  live on;
  record off;
  exec avconv -re -i rtmp://localhost:1935/transcode/1234 -c:v libx264  -preset superfast -g 60 -keyint_min 30 -b:v 2800k -minrate 2800k -maxrate 2800k  -s 1280x720 -r 30 -f flv rtmp://localhost:1935/live/1234;
  }

  application live {
  live on;
  record off;
  push rtmp://live-ams.twitch.tv/app/STREAMKEY;
  }
}
}
My question is, i can stream video using SUPERFAST preset without stutters. If ill go to VERYFAST, video on twitch is stopping every like 5 seconds for a while (not a buffering)

Is that athlon not enough to stream video with veryfast - faster preset? This machine got literally only needed stuff on the CLI Debian just to stream, so I'm not losing any resources.

I was quite sure i can push the quality as faster/veryfast with this rig.

Could anyone elaborate on the topic?

EDIT
: and could switching to ffmpeg from avconv could do any changes in performance?
EDIT2: with the ffmpeg instead of avconv i see a performance boost, but still my 2 core cpu gets up to 200% usage on "veryfast" preset, and then video on twitch shtutters.
ffmpeg version 3.0.22 - backport for jessie.

For me something is not right here, i was quite sure i can get veryfast preset with the AMD X2 64 4200+ (2.2 GHz per core) :F
Again, anyone can elaborate on this topic?
 

Jack0r

The Helping Squad
Forum Moderator
Taking a look at passmark for example, it got 1285 points, a generally recommended i5 with 4 cores (for encoding 720p footage) reaches about 6200 points (i5 2500 in this case), so about 4-5 times the "power" of your CPU.
The CPU is 9 years old and simply too slow.
 

Eska

New Member
Taking a look at passmark for example, it got 1285 points, a generally recommended i5 with 4 cores (for encoding 720p footage) reaches about 6200 points (i5 2500 in this case), so about 4-5 times the "power" of your CPU.
The CPU is 9 years old and simply too slow.
How about if ill upgrade to AMD Phenom II X4 920, will it do?
I mean, I simply can't put more money into that rig and can't afford a new one atm.
 

Eska

New Member
After messing up with that Athlon X2 i can OC it to around 2.9Ghz but still i dont think it will maintain stable while used 200% of it all the time and the boost wont be noticable :/
 

UL 42L

New Member
Hey guys, sorry to bother. Would anyone be able to help me with this problem? I'm unable to get anything out of my dedicated server, and when I run my ffmpeg command alone it waits until I start a stream, then gives an error. Full output:

http://pastebin.com/raw/CRZ7GRcW

My nginx.conf file includes rtmp.conf in the root directory. Rtmp.conf:

http://pastebin.com/raw/gBPXUxvK

I'm also running a secure HTTPS server on the same machine.
 

eppy

New Member
Hey,

Been trying to set this server up for a long time now. but it seems like the ffmpeg can't/don't compress the video I am sending. I can't get the server to send to twitch. I am using the config in the topic. My stat page is showing that it's recieving a stream, but it doesn't send anything to twitch.

I tried to install ffmpeg yesterday but that doesnt work either. Suggestions?
 

stormense

New Member
The end of the example code is wrong, One } is missing an I wont it lokk like this:

push rtmp://live-lhr.twitch.tv/app/twitch_key;
}
}
}
 
Last edited:

Fallen_Tyrael

New Member
Hello all, I hope I can get some help with an issue i'm having. I'm running Nginx and FFMPEG on a windows 10 64bit box and most of it seems to work. Anyway when I run my batch file for FFMPEG it seems to randomly decide that its going to encode @ 15fps and only use 15 to 30% of the CPU, if stop and start the batch again with the same settings it sometimes runs fine @ 30fps and using constant 70% CPU but more often than not it doesn't encode as its supposed to.

I have tried updating FFMPEG to the latest version and tried many different settings for FFMPEG like changing the preset to ultrafast and adding -threads but I still keep getting the same result and its bugging the hell out of me, I just can't figure out why its not being consistent. Anyway here are my current FFMPEG settings, hopefully someone here can spot where i'm going wrong:

ffmpeg -re -i rtmp://localhost:1935/transcode/stream -vcodec libx264 -profile main -preset veryfast -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -r 30 -b:v 3500k -maxrate 3500k -bufsize 3500k -acodec copy -f flv rtmp://localhost:1935/live/test

Thank you in advance.
 

mihawk90

New Member
For security reasons one might want to restrict access to the server to local IPs only. Having the server all open to the internet isn't a very good idea, especially for people reading this who probably don't have a whole not of knowledge and are just copy-pasting the config.

Code:
# allow anyone in 192.168.1.0/24
allow 192.168.1.0/24;
# drop rest of the world
deny all;
The subnet would need to be adjusted according to the local network but would be worth it I guess...

Also look at this question/answer: http://serverfault.com/a/667800

More detailed guide for the advanced user: http://www.cyberciti.biz/faq/linux-unix-nginx-access-control-howto/

Or in case you want to allow a specific range instead of a subnet: https://edmondscommerce.github.io/nginx-allow-ip-range/
 
Last edited:
Top