How does VLC Media player implement HTTP Streaming? - c#

How does VLC Media player implement HTTP Streaming?
I am aware that, VLC Media player can be used as a streaming server and also a streaming client.
My requirement is to stream(over HTTP) a proprietary protocol data from the server to clients and I am not comfortable with C/C++ code. I am comfortable with C# and Java. Can somebody point me to example implementations of HTTP Streaming in either C# or Java?

"Streaming" in this context simply means sending a large binary HTTP response to a request. You can get a reference to the output stream in Java by calling HttpServletResponse.getOutputStream. You can then send whatever data you like through the stream.

You can review the VLC source.

Java Media Framework (link) provides video streaming. You can implement not only a client but also the server using this API.
If I remember correctly the SDK includes some examples that might help.

what about CLI (command line interface)?
vlc --repeat /path_to/1.avi --sout '#standard{access=http,mux=ts,dst=:8000}'

Related

Streaming video using raw sockets

I'm trying to generate a live video stream and surface it via a UPnP framework.
I'm using the UPnP framework that was originally developed by intel available here. It seems to have rolled it's own lightweight webserver. I'm using FFMPEG to generate my video stream from images, I can set it up to feed it frames on a timer. But how I manage the data that's generated? How do I use send an HTTP response that could be a stream of unlimited length?
Is there a well worn technology to do this that I'm not aware of?
Any input would be great.
https://trac.ffmpeg.org/wiki/StreamingGuide possibly ffmpeg could listen on a tcp port, though that would require you to restart ffmpeg each time a client exits...and would only serve one client at a time. If you want more than one client at a time you would have to use some type of real server...

Any way to obtain FileDescriptor with Mono(.net)?

Probably, this is a complicated question, but I would try to shoot.
I use Monodroid(Mono for Android),and try to implement media stream to UDP socket.
Best way to stream audio and video from an Android phone to a RTMP server
This is a useful pointer for me as a result to take advantage of
FileDescriptor
However, basically, FileDescriptor is a UNIX oriented concept, and Mono(.net) is Windows oriented conept, it appears the UDPClient class of .net does not support to obtain FileDescriptor for the instance.
Is there any way to obtain FileDescriptor with Mono(.net)?
It seems Android doesn't natively support UDP streaming: Network Protocols, so yes you should look for RTMP server option and no you probably can't use UdpClient.
The code in the answer to Best way to stream audio and video from an Android phone to a RTMP server is fairly easy to convert to C#. LocalServerSocket, LocalSocket and LocalSocketAddress are in the Android.Net namespace and so is FileDescriptor in Java.IO.

.Net Webcam Media Server for Html5

I am trying to create an Html5 media server that can take in and stream out webcam video and need a bit more direction.
What ways can a webcam via Html5 be streamed to a server and how should the server stream it back out to the client?
Is there a way to do this via something like SignalR?
Are there any real-time compression server side .net dlls that can be used to take the incoming video and stream it to clients?
The HTML5 <video> tag is protocol agnostic. This means that it does not care about the video format.
The issue that you have is knowing what browsers support a streaming format. Some browsers support RTP or ASF streams. At the moment there is no streaming format that all browsers support. HTML5 isn't your best option for streaming today.

Develop a HTTP Monitor in C#

I'd like to develop an application to monitor HTTP traffic to/from my PC. (what websites are being visited by the PC user).
The problem is, that I couldn't get any articles how to start developing application like that.
What am I missing?
WinPcap: The Windows Packet Capture Library
Its very powerfull WireShark uses it.
There is C# port of this library available called SharpPCap.
SharpPcap - A Packet Capture Framework for .NET - Code Project
There's a .Net app called Fiddler which has this functionality; for use in your app, there's the FiddlerCore component
You can also use the free Pcap.Net project.
It is a wrapper for WinPcap that includes a packet interpretation framework, which should make monitoring HTTP traffic pretty easy.

Re-publish video stream as streaming FLV

A client of ours has a mobile web cam placed in a forest that is streaming video on a public IP address. Since the web cam has a limited bandwidth (and it is streaming with a format that often requires clients to install a codec), the stream needs to be re-broadcast by a server on a landline, preferably as streaming FLV.
What components can be used to write a client/server that can do this? It would be written using C#.
(Software solutions would be fine too, but we're on a limited budget so it can't be something very expensive...)
What's the format that the camera is sending you?
Rebroadcasting is easy using off-the-shelf servers - which means no programming as such, no C#.
camera -> ffserver -> flash players
ffserver is part of ffmpeg.

Categories

Resources