I'm using this C# code, for acquiring the frames generated by the kinect device, and for writing these frames to .wmv file:
writer = new VideoFileWriter();
writer.Open("outputFileName.wmv", 320, 240, 15, VideoCodec.WMV2);
void client_ColorFrameReady(object sender, ColorFrameReadyEventArgs e)
{
using (var frame = BitmapImage2Bitmap(e.ColorFrame.BitmapImage))
using (var thumb = ResizeBitmap(frame, 320, 240))
{
writer.WriteVideoFrame(thumb);
}
}
When all the frames are written into the file, the file is closed (using writer.Close()
) and sent to a remote server a Java application using ftp client.
Is there any way to write the file directly to the server, while it is still processing? Can I associate a writer to remote file? For example: writer.Open("remoteServer\outputFileName.wmv", 320, 240, 15, VideoCodec.WMV2);
, or do I have to write first the entire file to local disk, then send it to the remote server?