Live video playback using websocket

Asked

Viewed 579 times

5

I would like to stream a video that is in my database (Mysql) and would like to know if it is possible to play live media content using websocket, and if it is how I could build? I have in mind that I will use Html5 and JS and a back end language (php or even python). If anyone can give a hint or example of how to start?

  • related: http://answall.com/questions/27038/likeposso-creat-um-streaming-a-partir-de-um-video-que-esta-no-server

  • Sorry Sergio, but this link did not help me, has some other tip on how to build?

  • 1

    Honestly I would not implement anything in websocket. It is more possible var take a lot of work. It has several streaming protocols that make band adaptation, real-time and several other very advanced things. Besides that you will have to know well the codec you will be using and the issues of video compression and packet losses/packet reorganization

  • Alexandre, thank you so much for the tip, but would you have any tips on how I can solve this problem? I tried to use Wowza but had tremendous difficulty, so I looked for other alternatives and found some answers http://stackoverflow.com/questions/4736116/online-audio-video-conference-system-in-html5#comment5269744_4738065 but I’m still confused on how to solve the problem, I am open to tips, links, any kind of help is welcome.

  • @User what was the difficulty when using Wowza? Wowza works really well for the purpose you seek, so much so that some Amazon services offer Wowza in the package. The "big problem" is the license.

  • Thank you for participating Adriano, my difficulty when using Wowza. the first is not really difficult, but it is quite complicated is the language, another difficulty is to understand how to use, if it is in Wowza that I host the video, sincerely Wowza can and should be a great tool, but I found nothing that could tell me what it actually does.

  • For these reasons I researched another way to create the live broadcast using websockets, if you have any link to better direct me on this issue of Wowza or even websockets I am very grateful. Thanks Adriano!

Show 2 more comments

2 answers

2

Este blogpost shows how to stream video using websockets, Node.js and ffmpeg, using the library jsmpeg. The post focuses on the server side, but the library documentation explains in detail both sides. It seems to be exactly what you are looking for.

This tutorial on video interactivity about sockets may also interest you.

  • Bah Geilton, I researched a lot, and that’s why I went to the stack, but in no search I found this first link, the second I already knew, but thank you very much, this first link seems very useful, and I’m already taking a look at Popcorn.js

  • @User Actually what is on according to link is exactly what you are looking for.

1

ola a good idea would be to use the technology nodejs, it is very easy, I have tested it myself, but I have not created anything great, more it is possible to deliver content by websocket using nodejs, especially if working with the express.js framework, I can’t tell you how to do, more I can contribute ideas.

  • Ball show Willian Borba, I was already familiar with Node.js, I read and saw a bit about streaming, but you know tell me if I can broadcast live content only with Node.js ? Thank you for participating!

  • what I was doing was a chat, but for streaming I didn’t get to do, I did a search and found some links https://gist.github.com/paolorossi/1993068 http://binaryjs.com/ http://stackoverflow.com/questions/21921790/best-approach-to-real-time-http-streaming-to-html5-video client

  • Thank you even Willian, the Binary I had already given a read, but the other links I will read carefully. Brigadão Willian!

  • 1

    @User Nodejs allows you to open a socket connection (with socket.io plugin), the rest is javascript friend, make an application that converses on the client side, and send video requests, or anything to the server-side, process the requests on the server and return the result to the client who is listening to the socket be 1 or broadcast, simple like this ^^

Browser other questions tagged

You are not signed in. Login or sign up in order to post.