Search code examples
c#androidcameravlc

C# Use VLC.DOTNET.FORMS package to stream the PC camera image to Android


I have tried very hard to find information in google about the streaming PC camera image to Android APP. I have used the VLC.DOTNET package and installed it already in my pc. The problem is APP client can not receive the image. I also can not use the VLC media player software as client to receive the image. But the server side can show the image in the vlcControl1. About C# program as below show:

public partial class Form1 : Form
    {
        public ChromiumWebBrowser browser_front, browser_back, browser_Aver;
        private Capture cap1 = null;
        public Form1()
        {
            InitializeComponent();
            Load += new EventHandler(Form1_Load);
            InitBrowser();
           // this.vlcControl1.VlcLibDirectoryNeeded += myVlcControl_VlcLibDirectoryNeeded;
            vlcServer();
        }

        private void vlcServer()
        {
            var options = new string[]
            {
                // VLC options can be given here. Please refer to the VLC command line documentation.
                ":sout =#transcode{vcodec=MJPG,vb=800,fps=15,scale=1,width=800,height=600,acodec=none}:duplicate{dst=http{mux=mpjpeg,dst=:8080/,access=\"http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a}\"},dst=display}",
                ":sout-keep"
            };

            string optVideo = @"dshow://:dshow-vdev=Intel(R) AVStream Camera";
            string optAudio = @":dshow-adev=麥克風(Intel SST Audio Device(WDM))";

            vlcControl1.Play(optVideo, options);
}
}

** Is any configure setting I lost? Please help. Thank you very much. **


Solution

  • Thanks for everyone who care about this issue. I have figure out this problem. I do some correct about below section:

    var options = new string[]
                {
                    // VLC options can be given here. Please refer to the VLC command line documentation.
                    ":sout=#transcode{vcodec=MJPG,vb=800,fps=15,scale=1,width=800,height=600,acodec=none} :duplicate{dst=display,dst=\"http{mux=mpjpeg,dst=:8080/,access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a}\"}}",
                    ":sout-keep"
                };
    

    Due to the remote app can not connect the server, I try to close the windows firewall. Finally, the problem is be solved.