void reader_OnVideoFrameReceived(object sender, VideoFrameReceived e) { if (_videoFile == null) { _videoFile = File.Create("video.h264"); } _videoFile.Write(e.Data, 0, e.Data.Length); }