This is a set of assemblies primarily targeting making recordings of video media
streams from network cameras.
The decision was to do an implementation purely using C# managed code. The
inherent asynchronous nature of network media streaming protocols is reflected
in how the code is utilizing the .Net 4.x support for composing asynchronous and
event-based code. The results from server operations and requested media stream
data is returned using System.Threading.Tasks.Task<T> and
For network media streaming the only client currently implemented is RTSP.
Retrieved media streams are written to an ISO Based Media container using the
MP4 file extension. This file format is based on Apple Quick Time Movie. It was
selected partly as it is the natural container for the H.264 video codec
used by many network cameras. In addition an MP4 file supports including the
decoding time of the individual frames of the video stream. This is an advantage
when recording a video stream from a camera. One way a camera can adapt to e.g.
changing light conditions is to instantly change the video frame rate.
RTP Payload Format for MPEG-4 Audio/Visual Streams RFC 3016
(Visual stream support only.)
RTP Payload Format for Transport of MPEG-4 Elementary Streams RFC 3640
(High Bit Rate AAC audio support only.)
Additional communication protocol support
HTTP Authentication: Basic and Digest Access Authentication RFC 2617
(Only Digest Access Authentication is implemented.)
The SeeStreamSharp code is dependent on
Common.Logging providing a
portable logging abstraction for .NET, version 3.4.1. It can easily be retrieved
using the NuGet package configuration contained in the C# projects.
Streaming protocol client implementation
To retrieve a presentation using the RTSP protocol create an instance of the
SeeStreamSharp.RTSP.Presentation class. A single argument is required to
construct the Presentation object, the System.Uri object
with the Url of the presentation.
The SeeStreamSharp.RTSP.Presentation object encapsulates building and sending
requests to the RTSP server and processing the responses that are returned. The
first step in using the object is to retrieve the session description. This can
then be used to create one or more media stream sinks that are to consume the
media in the presentation. After stream sinks are set up the presentation can be
started. The received media data is supplied to the sinks until the presentation
Recording the media streams
To record media streams create an instance of the
SeeStreamSharp.Media.Recording class. Two arguments are required to construct
the Recording object. The first is an instance of an object
implementing both the SeeStreamSharp.IAsyncStreamingClient interface and the
SeeStreamSharp.ISessionDescriptionSetup interface. The second argument is a
string containing the file name to store the recording in.
The SeeStreamSharp.Media.Recording object encapsulates retrieving the session
description properties of the media stream. Using this information it tries to
select a suitable media container writer. In order to have the recording file
directly display what type of media container was selected the file name
extension is replaced. The actual file name created by the container writer is
made available after the successful start of the recording.