Page 1 of 1

How to create a video stream

PostPosted: Fri Jul 20, 2018 7:04 am
by Ledrunner
Hello everybody! In my case I need to implement videostream to local network via Ethernet. I try use AForge.FFmpeg.dll namespace and I convert my images to mp4 video.
But I can't find any solution to create stream.
My code for converting images to video file
Code: Select all
  using (var vFWriter = new VideoFileWriter())
            {
               
                vFWriter.Open("VideoMaker.avi", width, height, framRate, VideoCodec.MPEG4);

               
                foreach (var imageEntity in lstImg)
                {
                    //var bmp = ToBitmap(ImageToByteArray(lstImg));
                    var bmp = new Bitmap(imageEntity);
                    vFWriter.WriteVideoFrame(bmp);
                }

                Debug.WriteLine($"Numbers of images {lstImg.Count}");
                vFWriter.Close();

Could anyone help me please with advice to solve this problem?

Re: How to create a video stream

PostPosted: Fri Jul 20, 2018 9:29 am
by andrew.kirillov
Hello,

AForge.NET Framework does not provide any API for streaming video to network.

Re: How to create a video stream

PostPosted: Fri Sep 07, 2018 12:37 pm
by Ledrunner
Hello again! I have question, can Aforge FFMPEG encode video on fly to stream? Not record it to file?

Re: How to create a video stream

PostPosted: Fri Sep 07, 2018 9:08 pm
by andrew.kirillov
It can not. Check documentation if not sure.