Does mochiweb can play m3u8 stream? - erlang

I use lighttpd to play http live stream, it works well. I want to use mochiweb to play it in order for high performance, is it feasible ?

Sure. An http live streaming server is a standard http server. It serves static content with no logic stored in the server, all information about the stream is in the files that it serves.

Related

Streaming video frames to web page

I am working on a project for streaming real-time video to a web page. I read the video frames one by one with OpenCV on a Raspberry Pi, then send the compressed frames via TCP socket to a web server (I am using Flask), which hosts the web page.
For now I tried streaming the frames to the web page with HTTP multipart response, it is looking good and it is used in some projects posted online but I am not sure that HTTP is the best choice.
My other idea is to transmit the frames to the web page via websocket, because the HTTP is usually slower and has bigger overhead, but I did not find any similar use case of websockets.
So I am curious if websockets could be the better choice than the HTTP multipart response.
Has somebody tried using websockets for video streaming? Or does somebody have a good argument if the websockets are going to bring better performance?

Icecast relay stream can buffer a progressive audio stream

After reading the documents of icecast, I have two questions:
1) I'm not sure the icecast server can buffer audio streams, if It does can, How about using relaying?
2) If i have many dynamic relay servers to proxy, How to config the config file? I mean I have to change the config file dynamicly, since i have not sean that icecast supports the regular expression such as /realtime(\d+) to match all the realtime stations.
Icecast does buffer streams. When a client connects, the buffer data is flushed as fast as Icecast can loop around and send data.
Icecast can also relay existing streams. From the documentation:
<relay>
<server>192.168.1.11</server>
<port>8001</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
Now, as for doing this on-the-fly, as far as I know there is no way to do this in Icecast.
I found one of the solutions which is free & simple (tried & tested), but with some limitations.
Rocket Streaming Audio Server
https://www.rocketbroadcaster.com/streaming-audio-server/
It really allows you to relay https stream to http (stream mirroring). Configuring the app is simple. It relays streams 'as is' (without re-encoding), but in free version you can stream only to 100 listeners.

Use VLC to stream RTSP feed as HTTP Live Stream

I have a really high quality RTSP feed coming into a windows server. I'm attempting to use VLC to restream it as Http Live Streaming.
Does anyone know whether it is possible to establish this stream through VLC's graphic user interface as opposed to the command line? If so, how?
The examples I've found so far (on here and elsewhere) have all been command line examples and none of them have worked at all.
I would love to hear from anyone who has actually accomplished a successful restream of RTSP to an http live stream using a windows server. Incidentally, I already have the website set up to serve the result, but I can't get the stream to write the .ts files regardless of what I've tried.
I'm stumped. Thanks.
just look this command for example:
vlc -I dummy rtsp://ip:port/blablabla--sout '#transcode{vcodec=h264,fps=20,vb=512,scale=1,acodec=none,venc=x264{aud,profile=high,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/live/mystream.m3u8,index-url=http://ip/live/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/live/mystream-########.ts},dst=std{access=http,mux=ts,dst=:8082/video.mp4}}'

How to convert RTSP streaming to Http Live Streaming using lighttpd?

I'm having a problem here. I want to play RSTP streaming on ipad and iphone. but I find out that it will be much more easier if I use Http Live Streaming. I want to convert my RTSP streaming to Http live streaming using lighttpd. but I really have no idea how to do that. Do lighttpd accetp rtsp streaming url as input? Can anyone help? thanks!
you have two choices:
1) Run a server on your network that re-streams rtsp as hls.
a) wowza - popular, expensive
b) live 555 - free, lots of work
d) ffserver - free and as basic as it gets tons of work to make work.
Advantage :
No bandwidth restrictions over cellular or wi-fi
play with native apple players
Disadvantage
High server bandwidth - if your paying for server time you may want to watch this.
high letancy - forget any kind of live video.
2) Run FFmpeg based player on device
advantages :
a) A lot easier than it used to be, we do this all the time
b) deal with lgpl license, clear guidelines at ffmpeg.org and not a huge hassle
c) all on device, no server load issues.
Disadvantages
Limited bandwidth over celluar (about 10 min intervals), unlimited over wifi
lighttpd doesn't accept RTSP as an input. You will need some sort of translator program to read the rtsp stream and output the files to the website storage. I think you could do it with the avconv/ffmpeg program.

Fake video streaming

I am building an iOS App which displays video streams from a somewhat complex backend. Now while developing I want to be able to have some sort of test video stream, which I can use. Ideally this would also work without internet connection.
The video stream could show for example the current time or just a simple animation. What would be a good way of doing this on a Mac without having to install a whole suite of tools.
On you Mac you can setup a webserver or streaming server to provide you with a constant video stream for testing purposes. You won't need Internet access. You will, of course, need to ensure that the OSX firewall is either disabled or allows requests to the ports (80, most likely).
Two simple approaches I can see:
Wowza MPEG-TS stream of the Webcam on your mac
Install Wowza Media Server; developer license is free
Configure a basic applicaiton with MPEG-TS streaming
Use an encoding applicaiton, like Flash Media Live Encoder (free), Wirecast (demo version free), or some other software and start streaming from your webcam to the WMS
alternatively, with a bit more effort, you could setup Wowza to stream a file in a loop
be sure to get the codec settings correct
M3U8+MPEG-TS static files over plain HTTP
Simple Setup a basic webserver (lighttpd, Apache httpd, Apache Tomcat, whatever) to server static files
Whip up an M3U8 file to first point to a .ts media file, and then secondly back to itself
Have a look at MPEG-TS/M3U8 live stuff to work out the details. You'll need a properly segmented video file to start with.

Resources