J
J
jenya_zhilin2021-08-14 17:26:27
PHP
jenya_zhilin, 2021-08-14 17:26:27

How and on what to implement a server for video streaming?

There is a task to implement a server in PHP for video streaming. There is a site (specifically, the administrative panel), from there it is necessary to broadcast the video to the stream, and users of the site can continue to receive this video. I need to implement myself from scratch a similar task, without using third-party services. There was an idea to write a server on web sockets, before that I had a similar task and I transmitted audio, but will the server be able to transmit video if, say, there are about 1K viewers? Perhaps there are some other solutions? Yes, you can't use WebRTC either.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
KoreanGuy, 2021-08-14
@KoreanGuy

lol. Write a video streaming platform from scratch on websockets. No offense, but that sentence alone tells you that you can't do that. Streaming is never done on tcp. In general, few people can do this, and even more so in one. There is a simple rule: if video streaming is not the basis of your business (like, for example, twitch, yudemi, etc.), but simply some additional functionality, in no case do not write your bike. Take vimeo and don't complicate your life 1000 times.

E
Evgeny Koryakin, 2021-08-15
@zettend

In this case, you will simply waste a few years of your life in vain. For such services are written first of all with colossal knowledge of transcoding, incl. with knowledge of codecs, color spaces and communication protocols.
But there are ready-made solutions like livego . In general, google on GitHub for the query "streaming hls" maybe this will somehow simplify your life.
And don't forget about CDN, without such technology some stream from Moscow will be hardly available in... let's say Krasnoyarsk. For such a case, there is also ready-made technology from Cloudflare Stream .
Good luck)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question