Narendra Sisodiya
2011-Sep-20 13:33 UTC
[Icecast-dev] Adding a data in Live OR Saving Stream on Server side.
I want to build a website where user can listen my voice. I want to use only Icecast. But on my website I want to display some data too inside a stream. What data I want to add ? basically on my website there are various images. each image having a number. While I deliver my lecture I want to send image number too. Now I can send this number using http PUSH/PULL but I do not know How it will be synchronised ? Because AFAIK in streaming mode the HTML5 video element do not have TOTAL LENGTH parameter. So Hom I can embed the image number in stream itself and get this data on client side browser ? Otherwise I can thing for other trick !! I will stream no Icecast server and It will save my audio on server. So this way I will get a file. I can add this ogg file in HTML5 audio element and after loading the audio metadata in client I can set position of seekbar to the end of the playback. I do not know if this will work out because I have to handle the onended function in a smart way. Do you how I can accomplish my task ? Let me know I can explain more, My English in not good. -- ??????????????????????????? ?? ? Narendra Sisodiya ?? ? http://narendrasisodiya.com ???????????????????????????
Odin
2011-Sep-20 16:47 UTC
[Icecast-dev] Adding a data in Live OR Saving Stream on Server side.
On Tue, Sep 20, 2011 at 3:33 PM, Narendra Sisodiya <narendra at narendrasisodiya.com> wrote:> What data I want to add ? > basically on my website there are various images. each image having ?a > number. While I deliver my lecture I want to send image number too. > Now I can send this number using http PUSH/PULL but I do not know How > it will be synchronised ? Because AFAIK in streaming mode the HTML5 > video element do not have TOTAL LENGTH parameter. > So Hom I can embed the image number in stream itself and get this data > on client side browser ?Hey Narendra. We've spoken before because we're working on basically the same thing. Now that you're trying to do live stuff, you've run into the same problems as me. There are currently no good way to sync slides and live streaming media in the web browsers today. However, based on a discussion we had in WHATWG, we added an element called startOffsetTime, which will make it possible once browsers implement it. However, I guess it'd be easier to fake syncronization with audio, as Icecast won't have to buffer as much of it, and normally the clients can get all the information quite quickly. You can just "guesstimate" how much the client is lagging behind the "real" feed, and then just add so many seconds delay to the serverside PUSH for a new image. Anyway, -- this isn't really much related to Icecast. Other than wanting to get down the buffering as low as possible, in order to have people seeing closer to the real, live stream, and not lag too far behind. -- Beste helsing, Odin H?rthe Omdal <odin.omdal at gmail.com> English, technical: http://tech.velmont.net Norsk, personleg: http://velmont.no
Narendra Sisodiya
2011-Sep-20 17:14 UTC
[Icecast-dev] Adding a data in Live OR Saving Stream on Server side.
On Tue, Sep 20, 2011 at 10:17 PM, Odin <odin.omdal at gmail.com> wrote:> On Tue, Sep 20, 2011 at 3:33 PM, Narendra Sisodiya > <narendra at narendrasisodiya.com> wrote: >> What data I want to add ? >> basically on my website there are various images. each image having ?a >> number. While I deliver my lecture I want to send image number too. >> Now I can send this number using http PUSH/PULL but I do not know How >> it will be synchronised ? Because AFAIK in streaming mode the HTML5 >> video element do not have TOTAL LENGTH parameter. >> So Hom I can embed the image number in stream itself and get this data >> on client side browser ? > > Hey Narendra. > > We've spoken before because we're working on basically the same thing. > > Now that you're trying to do live stuff, you've run into the same > problems as me. There are currently no good way to sync slides and > live streaming media in the web browsers today. However, based on a > discussion we had in WHATWG, we added an element called > startOffsetTime, which will make it possible once browsers implement > it. > > However, I guess it'd be easier to fake syncronization with audio, as > Icecast won't have to buffer as much of it, and normally the clients > can get all the information quite quickly. > > You can just "guesstimate" how much the client is lagging behind the > "real" feed, and then just add so many seconds delay to the serverside > PUSH for a new image. > > > Anyway, -- this isn't really much related to Icecast. Other than > wanting to get down the buffering as low as possible, in order to have > people seeing closer to the real, live stream, and not lag too far > behind. >Thanks Again, I can think for another trick then.. == with video =in Video frames , we can use first 16 Pixel to encode slide number. We can use CANVAS API to process individual frames ( https://developer.mozilla.org/En/HTML/Canvas/Pixel_manipulation_with_canvas ) each 16 pixel can be 0 or 1 (black and white). We can generate slidenumber at client side. I need to find a way where I can push slide number information in pixel. Let me redefine my question again. I want to generate a video where I can modify pixel information of each frame. kind of dynamic filter. So first 16 pixel Or may be just first pixel will carry the info. Also, I know that compression lossy so I do not know what will happen to this trick == With audio =Audio can be mixed/merged with a lossless video of 16x1 or 1x1 dimension. Trick can work successfully. I use ffmpeg to to audio streaming with icecast. now I need to search for generating 1x1 video frames. Any suggestion? -- ??????????????????????????? ?? ? Narendra Sisodiya ?? ? http://narendrasisodiya.com ???????????????????????????
Randy McAnally
2011-Sep-21 15:15 UTC
[Icecast-dev] Adding a data in Live OR Saving Stream on Server side.
On Tue, 20 Sep 2011 19:03:18 +0530, Narendra Sisodiya wrote> I want to build a website where user can listen my voice. I want to > use only Icecast. But on my website I want to display some data too > inside a stream. > > What data I want to add ?We use Icecast KH (flv mode) with JWPlayer and inject metadata to specify changes to the webpage. JWplayer shoots off javascript hooks with the metadata updates which loads images and other data by ajax. ~Randy