Tcp connection refused when setting up live streaming in cpanel server

Hey there,

First of all thank you for the amazing demo livestream.a.video for live streaming directly from browser. I have successfully integrated api.video live streaming using API and using demo mentioned above in my localhost and it is working well in localhost with no errors but when i moved it to my website server which is in cpanel and tried to create live stream it is giving me this error “Connection to tcp://broadcast.api.video:1935 failed: Connection refused Cannot open connection tcp://broadcast.api.video:1935
rtmp://broadcast.api.video/s/{stream-key}: Connection refused”.

I couldn’t figure out what’s wrong I am doing… everything is working fine node, socket, live stream is also created just it is sending tcp connection refused error. So how to add this demo in cpanel server… is there any configuration needed from server side to make it possible in server also? as i want to integrate it in my website for users to go live.

Need your help in this matter.

Thank You.

Hi @hitesh.parekh ,

Thanks for using livestream.a.video! Im really glad you’ve found it useful. (Consider giving the repo a star)

It looks like you need to open up port 1935 on your server. RTMP communicates on that port, and so when it’s closed you cannot talk to the api.video server. I did a quick google “how do I open a port in cpanel” and found a bunch of helpful results.

Doug

1 Like

Hey @doug ,

Thanks for the quick reply and i’ve happily given star to repo but in cpanel port 1935 is already open. So i think that’s not the case here… is there any other case for this issue or any other solutions you know?

---------------UPDATES-------------------

Not sure what was wrong with port 1935 but it is working now without any problem after some changes for port 1935 so thanks @doug for the support and for the amazing demo… really appreciated :bowing_man:

That’s so awesome. i am glad it is working.

also - check out record.a.video as it adds the ability to switch the cameras, and share your screen too.

1 Like