WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.92k stars 972 forks source link

Live Streaming #138

Closed nightstryke closed 7 years ago

nightstryke commented 7 years ago

Well I've followed the directions and I've gotten as far as I can connect and even send the stream signal to the server, but the Flash Live player shows rtmpconnectfailure error. What am I doing wrong, did I overlook a setting?

DanielnetoDotCom commented 7 years ago

hi there are some fine tunes to do. now we do not use flash player anymore , we use HTML5 player and hls protocol . the video tutorial show you how to use rtmp protocol and flash player . if you want to use it there are a release on git hub that uses rtmp. but I deeply recommend you to use the HTML5 player, because it is compatible with mobile devices . fell free to ask more details

DanielnetoDotCom commented 7 years ago

take a look on this https://github.com/DanielnetoDotCom/YouPHPTube/issues/115 there are some instructions how to make it work

DanielnetoDotCom commented 7 years ago

if you are still having a problem to configure fell free to ask help on https://www.Youphptube.com/services

nightstryke commented 7 years ago

There's one problem, your services page doesn't have any option for just paid support. I don't want to use your servers or vps, I have my own. If there was maybe a paid support option by the hour or something that might be something I'd be interested in.

Also I've got the base YoupPHPTube with Encoder working, RTMP Server, Live Chat works, but the Webcam and Live Player do not work. So maybe you're missing a configuration options/installation instructions in the wiki.

DanielnetoDotCom commented 7 years ago

hi drop me an email and we can talk about this

DanielnetoDotCom commented 7 years ago

developer@Youphptube.com

nightstryke commented 7 years ago

Alright I think the live stream isn't working because of this configuration.

{"button_title":"LIVE","server":"rtmp://[nigix-server]/live","playerServer":"https://[nigix-server]:444/live","stats":"http://[nigix-server]:8080/stats"}

The part in bold is the problem I think. Is there a way to get it working without using SSL? What would i need to edit in the nginx.conf to achieve this?

DanielnetoDotCom commented 7 years ago

if your site is SSL, the player also must be SSL, but if is not, you can change it with no problem This must be your nginx url:port

nightstryke commented 7 years ago

Alright my site is not ssl, so what would bet the optimal nginx.conf setting for it without SSL?

DanielnetoDotCom commented 7 years ago

I do not have an non SSL nginx config sample, but should not be hard to configure (Actually should be easier), just remove the ssl section of it.

nightstryke commented 7 years ago

I've tried that, but the player won't play video, doesn't give me an error just no video.

I'll investigate further and get back to you on it.

DanielnetoDotCom commented 7 years ago

what is your URL, can you give me admin access to your youphptube?

nightstryke commented 7 years ago

No I'd like to try and figure this one out myself. Alright i've gotten far enough where I can stream to the rtmp server and it says live but apparently even using this configuration I get an error 403.

{"button_title":"LIVE","server":"rtmp://[nigix-server]/live","playerServer":"http://[nigix-server]:8080/live","stats":"http://[nigix-server]:8080/stats"}

The bold domain url gives me an error 403 and I can't figure out why. I can stream to the server, the website just can't connect and view the stream being played because of an error 403.

nightstryke commented 7 years ago

Alright so I've come to the conclusion that it's a problem with the webcam.swf and the live player.swf.

I fixed the error 403 by this setting in the nginx.conf under location /live: autoindex on;

While I know this is not the ideal situation, I needed to do so for testing. What I've come to the conclusion is that for some reason the live player just won't play the stream even through that so there's something broken not working in between.

I'm thinking it might be because I'm using the release.zip file and not cloning the github. Unfortunately I don't have anyway of changing it as I do not no which file is the config file for YouPHPTube that stores the database username and password.

mikweb2017 commented 7 years ago

nginx conf without SSL

worker_processes 1; error_log logs/error.log debug; events { worker_connections 1024; } rtmp { server { listen 1935; allow play all;

creates our "live" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments

                application live {
                        allow play all;
                        live on;
                        #record all;
                        #record_path /video_recordings;
                        #record_unique on;
                        hls on;
                        hls_nested on;
                        hls_path /HLS/live;
                        #hls_playlist_length 4s;
                        hls_fragment 10s;
                        on_publish http://yoryouPHPTUBE/plugin/Live/on_publish.php;
                        on_play http://yoryouPHPTUBE/plugin/Live/on_play.php;
                        on_record_done http://yoryouPHPTUBE/plugin/Live/on_record_done.php;
                }
        }
}
http {
        include       mime.types;
        default_type  application/octet-stream;
        server {
                listen 8080;
                server_name youphptube.com live.youphptube.com;
                #creates the http-location for our full-resolution (desktop) HLS stream - "http://my-ip/live/my-stream-key/index.m3u8"
                location /live {
                        # Disable cache
                        add_header 'Cache-Control' 'no-cache';

                        # CORS setup
                        add_header 'Access-Control-Allow-Origin' '*' always;
                        add_header 'Access-Control-Expose-Headers' 'Content-Length';

                        # allow CORS preflight requests
                        if ($request_method = 'OPTIONS') {
                                add_header 'Access-Control-Allow-Origin' '*';
                                add_header 'Access-Control-Max-Age' 1728000;
                                add_header 'Content-Type' 'text/plain charset=UTF-8';
                                add_header 'Content-Length' 0;
                                return 204;
                        }
                        types {
                                application/vnd.apple.mpegurl m3u8;
                        }
                        alias /HLS/live;
                }
                #allows us to see how stats on viewers on our Nginx site using a URL like: "http://my-ip/stats"
                location /stats {
                        stub_status;
                }
                location /stat {
                        rtmp_stat all;
                        rtmp_stat_stylesheet stat.xsl;
                }
                location /stat.xsl {
                        root html;
                }
                location /control {
                        rtmp_control all;
                }
                #allows us to host some webpages which can show our videos: "http://my-ip/my-page.html"
                location / {
                        root   html;
                        index  index.html index.htm;
                }

very important to read the new configuration sudo /usr/local/nginx/sbin/nginx -s reload

and in youPHPTube plugin {"button_title":"LIVE","server":"rtmp://[nigix-server]/live","playerServer":"http://[nigix-server]:8080/live","stats":"http://[nigix-server]:8080/stats"}

nightstryke commented 7 years ago

I've already tried that before, couldn't see the stream without autoindex on;

DanielnetoDotCom commented 7 years ago

@nightstryke I have few comments. At the first release of RTMP we had an webcam.swf. But after that we prefer to use HLS to play videos, as HLS is not necessary have a flash player to play. It works perfectly with HTML5 just as it does on mobile devices. the webcam.swf file has stopped working, so that in the most recent versions it has been removed. We do not know how to replace webcam capture yet, but professional Streamers use programs like OBS do not streamers directly from the site. On mobile devices just download some RTMP streamer app, I've used this one here successfully https://play.google.com/store/apps/details?id=com.wmspanel.larix_broadcaster&hl=en

I hope make it clear now

nightstryke commented 7 years ago

Where is the database config file located? I want to try updating youphptube from the github master to see if that might be the issue.

On Oct 5, 2017 9:25 AM, "YouPHPTube" notifications@github.com wrote:

@nightstryke https://github.com/nightstryke I have few comments. At the first release of RTMP we had an webcam.swf. But after that we prefer to use HLS to play videos, as HLS is not necessary have a flash player to play. It works perfectly with HTML5 just as it does on mobile devices. the webcam.swf file has stopped working, so that in the most recent versions it has been removed. We do not know how to replace webcam capture yet, but professional Streamers use programs like OBS do not streamers directly from the site. On mobile devices just download some RTMP streamer app, I've used this one here successfully https://play.google.com/store/ apps/details?id=com.wmspanel.larix_broadcaster&hl=en

I hope make it clear now

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/DanielnetoDotCom/YouPHPTube/issues/138#issuecomment-334463926, or mute the thread https://github.com/notifications/unsubscribe-auth/AQqtncWb_BfyO6eDBtyCUSOQ4tpx6vHgks5spNjkgaJpZM4Pr2Wd .

DanielnetoDotCom commented 7 years ago

do you mean this? https://github.com/DanielnetoDotCom/YouPHPTube/blob/master/install/database.sql

nightstryke commented 7 years ago

No the file that stores the dB user name password and dB name that allows youphptube to connect to mysql?

DanielnetoDotCom commented 7 years ago

ho sorry, look for Youphptube-dir/videos/configuration.php

nightstryke commented 7 years ago

Alright, so good news bad news time. I've got live streaming working to the player from nginx, but it when i stream to the nginx rtmp server, it does not show up as live in youphptube. What did I do wrong? The streaming player works, the nginx rtmp server works, but the site isn't showing any live streams at the top.

DanielnetoDotCom commented 7 years ago

How is your stats?

{"button_title":"LIVE","server":"rtmp://[nigix-server]/live","playerServer":"http://[nigix-server]:8080/live"**,"stats":"http://[nigix-server]:8080/stats"**}

Is that working?

DanielnetoDotCom commented 7 years ago

Look at demo site: https://demo.youphptube.com:444/stat

nightstryke commented 7 years ago

No this is my problem now, just when I'm so close to having a fully functional website.

screenshot1

I may have not mentioned it, but I'm an American and while I see nothing wrong with the site i'm working on and using youphptube for (Nothing bad.) I understand that not everyone is American and will not agree with my content or understand it so that's why i haven't listed my url and what not. It's not that I don't trust you, I'd rather not have you freak out because you're not American and do not understand.

mikweb2017 commented 7 years ago

screenshot-2017-10-6 31262919-9055fe38-aa2c-11e7-838f-53f12e109e11 png png-grafik 1348 x 720 pixel - skaliert 96

I had the same problem trying to rescue the plugin configuration again and try to clear the browser cache

DanielnetoDotCom commented 7 years ago

@mikweb2017 how is your stats? Is it working

and @nightstryke do not worry :)

mikweb2017 commented 7 years ago

yes for me Working fine

nightstryke commented 7 years ago

Yup everything is working great for me, aside from the live indication option not registering on the site. :(

DanielnetoDotCom commented 7 years ago

I guess I know what is wrong. You have to mark listed transmition to make it appear image

nightstryke commented 7 years ago

I had that checked like that, should it not have been?

DanielnetoDotCom commented 7 years ago

If is not checked will not appear the connection on the top bar

nightstryke commented 7 years ago

Alright I will try again, but I am sure it was checked.

On Oct 6, 2017 4:34 PM, "YouPHPTube" notifications@github.com wrote:

If is not checked will not appear the connection on the top bar

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DanielnetoDotCom/YouPHPTube/issues/138#issuecomment-334863085, or mute the thread https://github.com/notifications/unsubscribe-auth/AQqtnSRSNNjle4YDOHLADsz0O7Rcsgm2ks5spo68gaJpZM4Pr2Wd .

nightstryke commented 7 years ago

screenshot2

Tried both settings, still not listing it as live. Is there another setting I'm missing?

mikweb2017 commented 7 years ago

try browser cache and save configuration plugin

nightstryke commented 7 years ago

Tried that too.

DanielnetoDotCom commented 7 years ago

Try to check the ajax answer of top menu (use developer tool bar) image

pcmcis commented 7 years ago

Hi,

First let me say a big THANK YOU for making this project possible!!

@nightstryke Please try the following. It worked for me. Copy the code from the Wiki page https://github.com/DanielnetoDotCom/YouPHPTube/wiki/Set-up-my-own-Stream-Server

{"button_title":"LIVE","server":"rtmp://[nigix-server]/live","playerServer":"https://[nigix-server]:444/live","stats":"http://[nigix-server]:8080/stats"}

update the code as needed to match your configuration, press “EDIT” to see the LIVE “Plugin Form”, delete the existing code, paste the new code and save.

I do not remember if I pressed the “Run Database Script “ button again.

After that, the “LIVE” was enabled and I could stream without problems. I hope this helps!

DanielnetoDotCom commented 7 years ago

@pcmcis thanks for your help, but "Run Database script" button is needed just once ever.

nightstryke commented 7 years ago

Alright I've tried reinstalling the script/site several times and still nothing. I can stream, but the Live indicator says I'm offline even though I'm connected with OBS and streaming to nginx and the webplayer for the stream plays working video.

nightstryke commented 7 years ago

@DanielnetoDotCom I don't know what you did, but the Live Stream works now that I've downloaded the latest Github version!

DanielnetoDotCom commented 7 years ago

I do not know what was wrong, but I am glad it is working now.

ldgv commented 6 years ago

Hi guys.

Is or no possible enable SSL for rtmp?

DanielnetoDotCom commented 6 years ago

it is, I use port 444 for it

there are many threads regarding it https://github.com/DanielnetoDotCom/YouPHPTube/issues?utf8=%E2%9C%93&q=444