Giter VIP home page Giter VIP logo

net7mma's People

Contributors

juliusfriedman avatar thorirgens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

net7mma's Issues

Build issues

Hi Julius.

I am running into build problems with the mma and mma_core repositories.
I cannot build mma with Visual Studio/MSBuild, as there are folders with the same names (h264 and H264) which makes windows think there are changes in these files

  • Codecs\Video\h264\SliceType.cs
  • Codecs\Video\h264\NalUnitType.cs
  • Codecs\Video\h264\SupplementalEncoderInformationType.cs
  • Codecs\Video\mpeg4\ObjectTypeIndication.cs

Also, line 328 in SymbolExtensions.cs causes problems, but that I could just comment out as the variable is not used.

I can build mma_core with MSBuild, but the dll's don't produce the same result/functionality, so cannot replace the existing one with the ones made with core.

Do you have any good suggestion and tricks on how to build the net7mma solution?

Best regards
Thor

Streaming server questions

Hi @juliusfriedman. We need to allow users to access a web app written in ASP.NET and stream CCTV streams in their browsers. The stream formats are: RTSP, MP4, and H.264. We have a Windows Server 2016 to serve the media.

Can an ASP.NET app written in C# use net7mma to stream these CCTV media using an HTML5 video tag? Your help is much appreciated. Thanks

RFC6184Media throwing exeption "Only ARGB is currently supported" when call Packetize with bitmap PixelFormat.Format32bppArgb

Hi @juliusfriedman thanks for the net7mma it was a great library but i got a problem with the RFC6184Media
in my project i'm using nuget to get the library with version 0.111192.1 in here i want to send image from a NVR camera and convert it base on h.264 codec to rtsp server

public partial class MainForm : Form
{
private Camera _camera;
readonly Timer _timerRefreshUi = new Timer();
RtspServer server = new RtspServer()
{
Logger = new RtspServerConsoleLogger()
};
//open media to insert frame
RFC6184Media _media = new RFC6184Media(320, 256,"test");

    public MainForm()
    {
        InitializeComponent();
        _timerRefreshUi.Interval = 100;
        _timerRefreshUi.Tick += _timerRefreshUi_Tick;
    }

void _timerRefreshUi_Tick(object sender, EventArgs e)
{
Bitmap srcBmp = new Bitmap(320,256,System.Drawing.Imaging.PixelFormat.Format32bppArgb);
try
{
srcBmp = _camera.GetImage().Image;
}
catch (Exception exception)
{}
_media.Packetize(srcBmp);
}
private void ConnectCamera(CameraDeviceInfo cameraDeviceInfo)
{
//try to add media to server
server.TryAddMedia(_media);
//server begin
server.Start();
_timerRefreshUi.Start();
}
}

as in runing in debug the srcBmp pixel format was Format32bppArgb
and when i see in your sourcecode> unittests in there i find in RFC6184Media
line 993 if (thumb.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb) throw new NotSupportedException("Only ARGB is currently supported."); but the one i throw in was Format32bppArgb could you help me thanks

Missing DLL

I'm trying to build the repo. But I'm facing a couple of missing DLL problems such as Media.Common.dll, Media.Compression.dll and Media.Codec.dll. Please help me with this. I'm using Visual Studio 2019.

Streaming webcam

Dear @juliusfriedman,

I'm trying to figure out how to achive webcamera streaming without luck. I went through the UnitTests to get a better understanding of the library but I still can't manage to establish a proper stream. I'm using AForge to contact the camera and am trying to send the frames via Media.Rtsp.Server.MediaTypes.RFC2435Media.

        static Media.Rtsp.RtspServer server;
        static Media.Rtsp.Server.MediaTypes.RFC2435Media source;
        static void Main(string[] args)
        {
            // enumerate video devices
            VideoCaptureDevice videoSource = null;
            var videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
            // create video source
            bool found = false;
            for (int i = 0; i < videoDevices.Count && !found; i++)
            {
                if (videoDevices[i].Name.Contains("RICOH R Development Kit UVC Capture"))
                {
                    videoSource = new VideoCaptureDevice(videoDevices[i].MonikerString);
                    found = true;
                }
            }
            if (_videoSource == null)
            {
                throw new Exception("Could not find device.");
            }

            // set NewFrame event handler
            videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);

            var serverIp = Media.Common.Extensions.Socket.SocketExtensions.GetFirstUnicastIPAddress(System.Net.Sockets.AddressFamily.InterNetwork);
            server = new Media.Rtsp.RtspServer(serverIp, 554)
            {
                Logger = new Media.Rtsp.Server.RtspServerConsoleLogger()
            };
            source = new Media.Rtsp.Server.MediaTypes.RFC2435Media("test", null, false, 1920, 1080, true);
            server.TryAddMedia(source);
            server.Start();
            videoSource.Start();
        }

        private static void video_NewFrame(object sender, NewFrameEventArgs eventArgs)
        {
            Bitmap bitmap = (Bitmap)eventArgs.Frame.Clone(new Rectangle(0,0,1920,1080), PixelFormat.Format32bppArgb);
            source.Packetize(bitmap);
        }

What I'm trying to do is in the snippet above. I'm able to establish the connection between an RtspServer and VLC player but it's kinda stuttering, has some wierd flashing (if like it went from BGR to RGB) and it's like the packets are messed up. I mean it's like the following:

|.............|.............|.............| <- these are representing the frames
.....{.............} <- and it seems like this, like if there would be data from the previous frame

The library seems nice and easy to use but I can't get it to work properly.

Could you please aid me in any direction? Thanks in advance.

RTSP Server not working

Hey Julius,

first of all: great job!
At the moment, I don't get the RTSP Server working. I'm using your net7emma-core version with this code:

static void Main(string[] args)
        {
            IPAddress serverIp = Media.Common.Extensions.Socket.SocketExtensions.GetFirstUnicastIPAddress(System.Net.Sockets.AddressFamily.InterNetwork);
            int serverPort = Media.Rtsp.RtspMessage.UnreliableTransportDefaultPort;

            using (Media.Rtsp.RtspServer server = new Media.Rtsp.RtspServer(serverIp, serverPort) 
            { 
                Logger = new RtspServerConsoleLogger(), 
                ClientSessionLogger = new Media.Rtsp.Server.RtspServerConsoleLogger() 
            })            
            {                
                string url = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov";

                RtspSource sourceItem = new RtspSource("test", url);  
                server.TryAddMedia(sourceItem);
                server.Start();

                Console.WriteLine("Listening on: " + server.LocalEndPoint);
                
                Console.ReadKey();
                server.Stop();
            }
        }
    }

Then I'm trying to receive the stream via VLC Player: rtsp://<HOST_ADDRESS>:555/live/huhu
The code will fail before connecting with server:

Exception thrown: 'System.Net.Sockets.SocketException' in System.Net.Sockets.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.Net.Sockets.dll
Exception thrown: 'Media.Common.TaggedException`1' in Media.Common.dll
Exception thrown: 'Media.Common.TaggedException`1' in Media.Rtsp.dll
'RTSPForwarder.exe' (CoreCLR: clrhost): Loaded 'D:\Visual Studio\RTSPForwarder\RTSPForwarder\RTSPForwarder\bin\Debug\netcoreapp3.1\Cryptography.dll'. Symbols loaded.
The program '[21828] RTSPForwarder.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

If I start the media sources manually, the server will be responsive:

foreach (var item in server.MediaStreams)
                {
                    item.Start();
                    Console.WriteLine(item.IsReady);
                    Console.WriteLine(item.State);                    
                }

But then, when connecting to it with the above address the vlc will show an error instantly:
grafik

Here is the console log:

Request=> OPTIONS rtsp://172.28.8.133:555/live/test RTSP/1.0
CSeq: 2
User-Agent: LibVLC/3.0.11 (LIVE555 Streaming Media v2016.11.28)

 Session=> 2faa127c-fcf1-43b9-bea0-9def7dfe83a0

Adding Client: 2faa127c-fcf1-43b9-bea0-9def7dfe83a0
RTSP/1.0 200
CSeq: 2
Public: OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, GET_PARAMETER
Allow: ANNOUNCE, RECORD, SET_PARAMETER
Cache-Control: no-cache
Supported: play.basic,con.persistent,setup.playing
Server: ASTI Media Server RTSP\1.0


Request=> DESCRIBE rtsp://172.28.8.133:555/live/test RTSP/1.0
CSeq: 3
User-Agent: LibVLC/3.0.11 (LIVE555 Streaming Media v2016.11.28)
Accept: application/sdp

 Session=> 2faa127c-fcf1-43b9-bea0-9def7dfe83a0

RTSP/1.0 200
CSeq: 3
Content-Type: application/sdp
Cache-Control: no-cache
Content-Base: rtsp://172.28.8.133:555/live/027d4c3e-3d7b-4cca-b6b4-11417aefa240/
Content-Length: 627
Content-Encoding: utf-8
Server: ASTI Media Server RTSP\1.0

v=0
o=ASTI-Media-Server 16331593154583890165 -2115150919119249059 IN IP4 172.28.8.133
s=ASTI-Streaming-Session test
c=IN IP4 172.28.8.133
a=sdplang:en
a=range:npt=0- 596.48
a=control:*
t=0 0
m=audio 0 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/12000/2
a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1490
a=control:trackID=1
m=video 0 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=42C01E;sprop-parameter-sets=Z0LAHtkDxWhAAAADAEAAAAwDxYuS,aMuMsg==
a=cliprect:0,0,160,240
a=framesize:97 240-160
a=framerate:24.0
a=control:trackID=2

Request=> SETUP rtsp://172.28.8.133:555/live/027d4c3e-3d7b-4cca-b6b4-11417aefa240/trackID=1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/3.0.11 (LIVE555 Streaming Media v2016.11.28)
Transport: RTP/AVP;unicast;client_port=56720-56721

 Session=> 2faa127c-fcf1-43b9-bea0-9def7dfe83a0

RTSP/1.0 412
CSeq: 4
Server: ASTI Media Server RTSP\1.0


Request=> SETUP rtsp://172.28.8.133:555/live/027d4c3e-3d7b-4cca-b6b4-11417aefa240/trackID=2 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/3.0.11 (LIVE555 Streaming Media v2016.11.28)
Transport: RTP/AVP;unicast;client_port=56722-56723

 Session=> 2faa127c-fcf1-43b9-bea0-9def7dfe83a0

RTSP/1.0 412
CSeq: 5
Server: ASTI Media Server RTSP\1.0


Adding Client: 2faa127c-fcf1-43b9-bea0-9def7dfe83a0
Accepted Client: 2faa127c-fcf1-43b9-bea0-9def7dfe83a0 @ 172.28.8.133:51968
30.06.2020 08:42:26 Added =True
Request=> SETUP rtsp://172.28.8.133:555/live/test RTSP/1.0
CSeq: 0
Transport: RTP/AVP;unicast;client_port=9406-9407

 Session=> 592b6617-9daa-475b-9951-460ebe6044e6

Adding Client: 592b6617-9daa-475b-9951-460ebe6044e6
RTSP/1.0 404
CSeq: 0
Server: ASTI Media Server RTSP\1.0


Adding Client: 592b6617-9daa-475b-9951-460ebe6044e6
Accepted Client: 592b6617-9daa-475b-9951-460ebe6044e6 @ 172.28.8.133:51969
30.06.2020 08:42:26 Added =True
Request=> OPTIONS rtsp://172.28.8.133:555 RTSP/1.0
CSeq: 1
User-Agent: RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)
ClientChallenge: 9e26d33f2984236010ef6253fb1887f7
PlayerStarttime: [28/03/2003:22:50:23 00:00]
CompanyID: KnKV4M4I/B2FjJ1TToLycw==
GUID: 00000000-0000-0000-0000-000000000000
RegionData: 0
ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586

 Session=> 0d36a3c1-0696-4bab-b30c-3194775d9162

Adding Client: 0d36a3c1-0696-4bab-b30c-3194775d9162
RTSP/1.0 200
CSeq: 1
Public: OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, GET_PARAMETER
Allow: ANNOUNCE, RECORD, SET_PARAMETER
Cache-Control: no-cache
Supported: play.basic,con.persistent,setup.playing
Server: ASTI Media Server RTSP\1.0


Adding Client: 0d36a3c1-0696-4bab-b30c-3194775d9162
Accepted Client: 0d36a3c1-0696-4bab-b30c-3194775d9162 @ 172.28.8.133:51970
30.06.2020 08:42:26 Added =True
RestartFaultedStreams
DisconnectAndRemoveInactiveSessions

It would be very great If you can help me!
Here you can find my sample: https://we.tl/t-nbjzjFFQs3
Thank you!

Can't get it to work

Hi,

I am trying to use net7mma as an RTSP proxy. Here is my code :

using Media.Rtsp;
using Media.Rtsp.Server.MediaTypes;
using System;
using System.Threading;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 1)
                return;
            Console.WriteLine(args[0]);

            RtspServer server = new RtspServer()
            {
                Logger = new Media.Rtsp.Server.RtspServerConsoleLogger()
            };

            RtspSource source = new RtspSource("test", args[0])
            {
            };
            server.TryAddMedia(source);
            server.Start();

            while (true)
            {
                Thread.Sleep(1500);
            }
        }
    }
}

I use this rtsp link :
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

When using the Nugget package, nothing happens in VLC : failed to connect.

Server Started @ 09/10/2018 09:52:59
Starting Stream: test Id=7177b3ba-7a83-473f-834a-7f5eaa1434fd
RestartFaultedStreams
DisconnectAndRemoveInactiveSessions
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Receiving Data
Media.Rtsp.RtspClient-9992111e-84f8-46fe-bfd2-9c58d067d04b@MonitorProtocol: Data Received

When building the sources and importing the dlls into the project I get a Stackoverflow exception.

OSX or Linux Support?

Hello all, i've been trying to use this library on Mono on Linux and OSX and run into the same issue.

System.Net.Sockets.SocketOptionName 0x2 is not supported at TCP level

My code is simple;

Socket listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

IPEndPoint ep = new IPEndPoint(IPAddress.Any, 1555);

using (Media.Rtsp.RtspServer server = new Media.Rtsp.RtspServer(ep))
{
Media.Rtsp.Server.MediaTypes.RtspSource source = new Media.Rtsp.Server.MediaTypes.RtspSource("RTSP", "rtsp://192.168.1.10/");
server.TryAddMedia(source);
server.Start();
}

Does anyone have a suggestion how I can modify the library to not use the socket exclusively?

i've found this post here, that seems related; https://github.com/dotnet/corefx/issues/11292
I've tried upgrading mono to 4.8 and I've tried to use it with core 2.0 dotnet with no luck

Thanks so much

Decoding RTSP

I'm not sure if you have implemented this but is there any way to get image in base64 format when the RtpFrame IsComplete?

Exceptions on server.Start() - Sometimes unable to stream.

@juliusfriedman

I'm using this code to create a server(based on server test). Sometimes I can access the stream, sometimes I cannot when starting. I'm monitoring the debug output in VS and I see differences.

            // Make sure we can always go to the catch block, 
            // so we can set the latency mode back to `oldMode`
            System.Runtime.GCLatencyMode oldMode = System.Runtime.GCSettings.LatencyMode;
            try
            { 
                System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();

                System.Runtime.GCSettings.LatencyMode = System.Runtime.GCLatencyMode.LowLatency;

                using (Media.Rtsp.RtspServer server = new Media.Rtsp.RtspServer(/*555*/))
                {

                    //Create a stream which will be exposed under the name Uri rtsp://localhost/live/RtspSourceTest
                    //From the RtspSource rtsp://1.2.3.4/mpeg4/media.amp
                    Media.Rtsp.Server.MediaTypes.RtspSource source =
                        new Media.Rtsp.Server.MediaTypes.RtspSource("RtspSourceTest", "rtsp://admin:[email protected]:554/h264Preview_01_sub", Media.Rtsp.RtspClient.ClientProtocolType.Tcp); //< -My stream
                    //server.TryAddMedia(new Media.Rtsp.Server.MediaTypes.RtspSource("mp4T:BigBuckBunny_115k.mov", "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov", Media.Rtsp.RtspClient.ClientProtocolType.Tcp));

                    if (!server.TryAddMedia(source)) //<--change made here TryAddMedia
                    {
                        Console.WriteLine("Unable to add stream");
                    }

                    //Start the server and underlying streams
                    server.Start();
                    if (server.IsRunning)
                        Console.WriteLine("Server Started");
                    Console.ReadKey();
                    
                    //Shut Down Server
                    System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.Normal;
                    server.DisableHttpTransport();
                    server.DisableUnreliableTransport();
                    server.Stop();
                    Console.WriteLine("Server stopped");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                System.Runtime.GCSettings.LatencyMode = oldMode;
            }
            
        }

Upon calling server.Start() and when the stream does not work, I see this in debug output:

start: no stream
Exception thrown: 'System.Net.Sockets.SocketException' in Media.Rtsp.dll
Exception thrown: 'Media.Common.TaggedException`1' in Media.Rtsp.dll
The thread 0x12bc has exited with code 0 (0x0).
The thread 0x48e8 has exited with code 0 (0x0).
//closing the server:
The thread 0x4f90 has exited with code 0 (0x0).
The thread 0x5088 has exited with code 0 (0x0).
The thread 0x5090 has exited with code 0 (0x0).
The thread 0x246c has exited with code 0 (0x0).
The thread 0x17c has exited with code 0 (0x0).
The thread 0x4e34 has exited with code 0 (0x0).
The thread 0x4fb0 has exited with code 0 (0x0).
The thread 0x144c has exited with code 0 (0x0).
Exception thrown: 'System.ObjectDisposedException' in System.dll
The program '[19444] RTSPConsoleNet.exe' has exited with code 0 (0x0).

Upon calling server.Start() when the stream "sort-of" works with zero frame-rate:

The thread 0x4af4 has exited with code 0 (0x0).
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
The thread 0x920 has exited with code 0 (0x0).
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
...
...
...
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.FormatException' in mscorlib.dll
The thread 0x53ac has exited with code 0 (0x0).
The thread 0x3438 has exited with code 0 (0x0).
...
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
//upon closing
Exception thrown: 'System.ArgumentException' in Media.Rtp.dll
Exception thrown: 'System.ArgumentException' in Media.Rtp.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
The thread 0x2d2c has exited with code 0 (0x0).
The thread 0x53e8 has exited with code 0 (0x0).
Exception thrown: 'System.ObjectDisposedException' in System.dll
Exception thrown: 'System.ArgumentException' in Media.Rtp.dll
Exception thrown: 'System.ArgumentException' in Media.Rtp.dll
Exception thrown: 'System.ArgumentException' in Media.Rtp.dll
Exception thrown: 'System.ArgumentException' in Media.Rtp.dll
The thread 0x4e44 has exited with code 0 (0x0).
The program '[20832] RTSPConsoleNet.exe' has exited with code 0 (0x0).

It's constantly outputting System.Net.Sockets.SocketException while the server is running.

It seems random when I get either scenario. How can I help debug or is something wrong with the sample code I'm running

IP Camera Connection

I am making a simple application for connecting and retrieving the frames from an IP Camera, as follows:

RtspClient client = new RtspClient("rtsp://192.168.2.133/11", RtspClient.ClientProtocolType.Udp); client.Credential = new System.Net.NetworkCredential("admin", "admin"); client.AuthenticationScheme = System.Net.AuthenticationSchemes.Basic; client.StartPlaying(); client.Client.RtpFrameChanged += Client_RtpFrameChanged; ;

Sometimes, when I run this code, the StartPlaying method executes but the framechanged event is not activated. Other times I get the following error:

"Unable to descrie media. Missing Session Description".

Can you please help me with this?

Thanks

[NotImplemented] GetSample

Hello,

Thank you very much for your project and i hope that you'll understand my english ;)
As far as i've tested it, your lib does a lot of things quite easily (rtsp server sending mjpeg with individual jpg files ok and redirect a rtsp stream ok)

One of the things i try to achieve is a rtsp server that plays read mp4 files.
I use a BaseMediaReader("file.mp4") and get the tracks. From that, i think we need the reader.GetSample() method with is NotImplemented.

Do you plan to implement it soon ?

Thanks

Unity3D Integration

I am trying to get an RTSP stream from a camera and show it in Unity. While searching the internet to find to see how can I do that, I have stumbled upon this project. So, may I ask these questions?

  • Is it possible to integrate it into a Unity project to be built to Android?
  • Is it possible to obtain video frames coming through RTSP protocol in Unity something like a byte array?

Kindest regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.