1

I am able to do video streaming using below snippet.But unable to stream audio files.I can access below stream using vlc client as url:rtsp:localhost:port/live/VivzTcp.But how to do this for MP3 files because as I use media type RFC5219Media for audio(mp3) rtsp URL not working while hitting through vlc. May be media type for mp3 is wrong. Reference: click here

 //Create the server optionally specifying the port to listen on
    Rtsp.RtspServer server = new Rtsp.RtspServer(/*554*/);

    //Create a stream which will be exposed under the name Uri rtsp://localhost/live/

     string localPath = System.IO.Path.GetDirectoryName(executingAssemblyLocation);
 string completePath = localPath + "\\Video\\mp4";
          //Local Stream Provided from videos in a Directory - Exposed @ rtsp://localhost/live/VivzTcp 
                server.TryAddMedia(new Media.Rtsp.Server.MediaTypes.RFC2435Media("VivzTcp ", completePath) { Loop = true});       

    //Start the server and underlying streams
    server.Start();

    //The server is now running,  you can access the stream  with VLC, QuickTime, etc 
Dharmesh Parmar
  • 91
  • 1
  • 10

0 Answers0