How to stream video from my server to client browser using DirectShow? - asp.net

I'm developing an ASP.NET application that's required to stream on-demand videos from server to client. Now I consider using DirectShow to do some kind of processing works before the video is transmitted over Internet. Following this article, I know I can transfer video stream over network through WMAsfWriter after it's processed by DirectShow and the output is a URL that the client can get access to through Windows Media player. But in my ASP.NET application, I want the video stream played on the web page of the client browser such as Chrome. I'm not sure if the output URL can be parsed by client browser and the video stream can be played there directly, so I want to ask that is it possible? If not, what extra steps do I need to take to achieve my goal?

I think you can made WebRTC streamer DirectShow filter and open this stream in browser. Ways like WMP / VLC player require ActiveX, that, really, dead technology now. Even Microsoft Edge do not support it anymore. WebRTC most common way today. Web version of Skype and a lot of other apps use it.

Related

Live Video Streaming asp.net

I've a scenario where there're two servers(server 1 & server 2). There's a web cam/CCTV cam(or of any kind) that feeds video to server 1. I assume the video feeding to the server 1 is easily done by the camera setup. This live video is now somehow sent to Server 2 which is eventually broadcast to the clients.
Now the thing is I actually need a lead to follow how to start with the whole thing and where does media server's role kick in(if it's actually needed). I don't have any idea whatsoever regarding the whole process and am having trouble making relevant searches. Any advise or help would be much appreciated. Thanks in advance
is there any specific reason why 2 servers are involved ? You could easily stream video from server 1, where you get the camera feed.
You could either use a streaming media server (Like adobe media server) or use a standalone application like Windows Media Encoder to give out the live stream for users to view.
Does your server 1 have enough bandwidth to stream the video to multiple users ? If 100 people view your stream at 1 Mbps, you will be needing around 20Mbps bandwidth in your server at a minimum, else the video streams may suffer. If you cannot arrange that much bandwidth in your server, you will have to use a CDN hosted streaming server (There are lot of service providers).
If only a few users will be viewing your stream simultaneously, it may be fine with your existing setup.
If you are following the two server setup as you mentioned, follow these steps to broadcast.
Set up Adobe media server (trial will do for upto 10 simultaneous connection streams) on server 2.
Install Adobe media encoder on server 1, where the video stream is available.
From server 1, push the video stream via adobe media encoder to server 2, (set up a publishing point first for live).
get the streaming link from AMS installed in server 2, which can be embedded into any compatible player (flowplayer or jwplayer), and put it in a webpage for public access.
Hope this helps.

Audio stream server (from a cross platform server to any device)

This is not a specific coding question but more a research project.
I am very interested in streaming services. To be more specific, I am interested in streaming audio from a server to a device. I do understand the basic logic behind it but I want to get better knowledge in these things.
I would like to try implementing a streaming server and a streaming client (server on mac and client on iOS) but I am having some trouble finding any pages that offer "tutorials" on how its done. I have managed to get the client side somehow and in its example it is playing stream from shoutmedia. How can I implement the server side? I would prefer it in C++ (server in Qt for example would be a bullseye) but any links will be appreciated.
I think that streaming is quite an interesting topic and any links will be appreciated.
Thanks!

video server supporting Http

I want to setup a video on demand server which support Http protocol. It is like Youtube, which hosts a lot of videos, and end users could play them from browser (by using Flash or Html 5).
Two quick questions,
For the big video files, shall I put them on disk or in memory? How Youtube or other big video site did it? Not sure if put all video in memory is too expensive, and put video on disk is too slow?
Is there any open source video hosting server for my purpose? If steaming is supported, it will be great.
thanks in advance,
George
If you just want to have an HTML page that links to your video files - no problem, but most browsers will download the entire file before you system even considers playing it.
If you want to stream the files (like YouTube and others do) then you aren't actually using HTTP for the video itself. HTTP is used to get the information about the stream so your player can stream and play directly without having to download the entire file first.
Streaming video uses RTSP (or some other streaming protocol) for the audio and video data.
The closest HTTP protocol can get to "streaming" video is to use Server-Push of individual image frame with each frame flagged to replace the previous frame. Not all browsers can handle this directly, but might need an ActiveX control or Java Applet. The original QuickTime did this before the streaming protocols were implemented at the servers.
re: how does YouTube deal with big video file
I suspect they are on disk until they are needed. Moved into memory only as needed. Flushed from memory when no longer needed.
re: is there an open source video server for my purpose
YES! Check out http://www.videolan.org/
-Jesse
another approach is to use HTTP Live Streaming - HLS - the web server is simply a standard httpd server - video/audio is preprocessed on server side into a set of bitrate playlists.
The logic is on the client side to retrieve the media as a series of 6 second files, based on bandwidth appropriate playlist.
So :
- use files not memory
- there are open source HLS segmentators (ffmpeg)

HTML5/H.264 format for desktop sharing

I am trying to live stream my desktop over http to one or more users. The immediate goal is just to share the desktop in real time in read only mode for several users. In future we might allow the users to control the desktop as well by mouse or keyboard. I have these queries in this context-
Is HTML5 + H.264 right for this or do I need to go with Flash?
In either case what are all the components/servers I need for a live streaming infrastructure? (Like desktop, encoder, streaming server, web server, media player etc)? It will help compare the options, if You can post your preferences for each of these components/servers.
You should be able to do this with Flash, I don't know for sure about HTML5. In windows I should suggest you create a directshow graph to do this. You'll want a screen capture source filter, h264 encoder and a flash streaming output filter.
A directshow screen capture filter.
http://www.mainmediasoft.com/products/screencapture/
ffdshow can encode h264
http://ffdshow-tryout.sourceforge.net/
flash streaming output filter.
http://www.nanocosmos.de/v3/en/rtmp-streaming.html
In theory you should be able to drag all these parts together in graphedit and make this work.

How to do sound recording through a web?

Then save it at server side,is it possible?
Flash applications can do this, if the user allows them to use the microphone.
You need to use some client technology which can communicate with client hardware(mic), like flash/java(java-i am not that much sure).On the server side you need to implement something like media/streaming server which can record/stream/save client streams.
I done this task using flash on client side and red5 on server side.
I would use a Java applet. The advantage is that you don't have to use any special server-side software like Flash Media Server or Red5. You can process the recorded sound using a simple PHP script - the applet can send a WAV file to the script using the HTTP protocol (something that Flash cannot do, as Adobe wants you to purchase their Flash Media Server).

Resources