The reply after yours was the correct answer. Set up NGINX to use a port other than 80 and it'll work fine along side Apache, that's how I'm using it.Daica said:Does anyone know how to install NGINX + RTMP Server when Apache is already installed on the VPS?
I don't want to make any changes to Apache because its currently hosting 1 website on it.
sneaky4oe said:paladzin said:Thanks.
Using this vm for transcoding 1080>720p, and restreaming.
Install -> ffmpeg/x264 ppa
Code:sudo add-apt-repository ppa:jon-severinsson/ffmpeg sudo apt-get update && apt-get install ffmpeg x264
Transcoding example:
Works great.Code:application live_orig { live on; record off; push rtmp://sreaming.url/paladzin; exec_static ffmpeg -re -i rtmp://localhost/live_orig -vcodec libx264 -vprofile baseline -preset veryfast -g 10 -s 1280x720 -acodec copy -f flv rtmp://streaming.url/paladzin~720p; }
I didn't manage to apply this on a virtual machine from http://www.xedocproject.com/forum/index.php?/topic/16-мультистрим-без-нагрузки-на-процессор/ thread.
I am able to multistream now, but I need to transcode it to 480p. Could somebody please help?
![]()
Jack0r said:-i rtmp://localhost/live
is missing the playpath, I think this has to be set for ffmpeg to be able to "read" your input stream.
Jack0r said:I would first of all recommend you to either manually update your ffmpeg version or switch to avconv on ubuntu (as that is hopefully updated and not deprecated, see the yellow message you get each time). Then I normally sat up my ffmpeg like this:
ffmpeg -i rtmp://localhost/live1/streamkey -vcodec libx264 -preset veryfast -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -b:v 2000k -maxrate 2000k -bufsize 2000k -s 1280x720 -sws_flags spline -r 30 -acodec copy -f flv rtmp://localhost/live2/streamkey;
But this will only work in an updated version of ffmpeg.
sudo service nginx restart
ffmpeg -i rtmp://localhost/live/streamkey -vcodec libx264 -preset veryfast -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -b:v 800k -maxrate 1200k -bufsize 1600k -s 854x480 -sws_flags spline -r 30 -acodec copy -f flv rtmp://remotehost/live/streamkey
2013/12/26 18:14:06 [info] 1004#0: *1 client connected '192.168.0.2'
2013/12/26 18:14:06 [info] 1004#0: *1 connect: app='live1' args='' flashver='FMLE/3.0 (compatible; FMSc/1.0)' swf_url='rtmp://192.168.0.3/live1' tc_url='rtmp://192.168.0.3/live1' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:14:06 [info] 1004#0: *1 createStream, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:14:06 [info] 1004#0: *1 publish: name='1080' args='' type=live silent=0, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:14:06 [info] 1004#0: *1 exec: starting managed child 'ffmpeg', client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:14:06 [info] 1004#0: *2 client connected '192.168.0.3'
2013/12/26 18:14:06 [info] 1004#0: *2 connect: app='live1' args='' flashver='LNX 9,0,124,2' swf_url='' tc_url='rtmp://192.168.0.3:1935/live1' page_url='' acodecs=4071 vcodecs=252 object_encoding=0, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:14:06 [info] 1004#0: *2 createStream, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:14:06 [info] 1004#0: *2 play: name='1080' args='' start=-2000 duration=0 reset=0 silent=0, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:14:08 [info] 1004#0: *3 client connected '192.168.0.3'
2013/12/26 18:14:08 [info] 1004#0: *3 connect: app='live2' args='' flashver='FMLE/3.0 (compatible; Lavf55.22' swf_url='' tc_url='rtmp://192.168.0.3:1935/live2' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:14:08 [info] 1004#0: *3 createStream, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:14:08 [info] 1004#0: *3 publish: name='720' args='' type=live silent=0, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *1 deleteStream, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *1 exec: terminating child 2380, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *1 disconnect, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *1 deleteStream, client: 192.168.0.2, server: 0.0.0.0:1935
2013/12/26 18:17:05 [notice] 1004#0: signal 17 (SIGCHLD) received
2013/12/26 18:17:05 [alert] 1004#0: unknown process 2380 exited on signal 9
Now there is no client more watching on *2:
2013/12/26 18:17:05 [info] 1004#0: *2 recv() failed (104: Connection reset by peer), client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *3 disconnect, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *3 deleteStream, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *2 disconnect, client: 192.168.0.3, server: 0.0.0.0:1935
2013/12/26 18:17:05 [info] 1004#0: *2 deleteStream, client: 192.168.0.3, server: 0.0.0.0:1935
push rtmp://<other streaming service rtmp url>/<stream key>
Streaming Service: Custom
Server: rtmp://<your server ip>/live
Play Path/Stream Key: test