![]() frame.ToBitmap().Save(msBit, frame.ToBitmap().RawFormat) String outPutFrameSize = frameWidth.ToString() + "x" + frameHeight.ToString() these are the parameters i use for h264 encoding TwoSecondVideoBitmapFramesForEncode.Clear() Thread = new Thread(new ThreadStart(encodeTwoSecondVideo)) ĬopyOfTwoSecondVideo = twoSecondVideoBitmapFramesForEncode.ToList() If (twoSecondVideoBitmapFramesForEncode.Count = (int)FrameRate) TwoSecondVideoBitmapFramesForEncode.Add(frameBmp) Private void ProcessFrame(object sender, EventArgs arg)įrameBmp = new Bitmap((int)frameWidth, (int)frameHeight, PixelFormat.Format24bppRgb) Here I capture the frames and store them in a list When I received stream via VLC player there is some millisecond of delay between packets and also I noticed there a frame lost. But I cannot achieve the smooth streaming. Then I'm sending that data using UDP protocol through LAN. After stopping that task I can get encoded data as byte array. I write that video frames to ffmpegĪnd start the ffmpeg to encode. ![]() After filling this list I start another thread to encode that 1 second chunkįor encoding purpose I use ffmpeg wrapper called nreco. if frame rate isģ0 it will store 30 video frames. To achieve this I create the bitmap list and I save captured bitmap to this list using one thread.Īnd also I display those frames in a picture box. To stream local video file in real time I use emgu cv to capture the video frame as bitmaps. I use a capture card to capture some live source and need to stream in real time.Īnd also need to stream a local video file. I'm developing an application for real time streaming.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |