AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

How to create a video stream

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

How to create a video stream

Postby Ledrunner » Fri Jul 20, 2018 7:04 am

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?
Ledrunner
 
Posts: 4
Joined: Fri Jul 20, 2018 6:45 am

Re: How to create a video stream

Postby andrew.kirillov » Fri Jul 20, 2018 9:29 am

Hello,

AForge.NET Framework does not provide any API for streaming video to network.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: How to create a video stream

Postby Ledrunner » Fri Sep 07, 2018 12:37 pm

Hello again! I have question, can Aforge FFMPEG encode video on fly to stream? Not record it to file?
Ledrunner
 
Posts: 4
Joined: Fri Jul 20, 2018 6:45 am

Re: How to create a video stream

Postby andrew.kirillov » Fri Sep 07, 2018 9:08 pm

It can not. Check documentation if not sure.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework