简体   繁体   English

将文件写入远程服务器

[英]Writing file to remote server

I'm using this C# code, for acquiring the frames generated by the kinect device, and for writing these frames to .wmv file: 我正在使用此C#代码,以获取由kinect设备生成的框架,并将这些框架写入.wmv文件:

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 . 将所有框架都写入文件后,将关闭文件(使用writer.Close() ),然后使用ftp client将Java应用程序发送到远程服务器。

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); 例如: 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? ,还是我必须先将整个文件写入本地磁盘,然后将其发送到远程服务器?

If the account the application is running under has permission to write to a folder on the server, then in theory you should be able to write to it. 如果运行该应用程序的帐户有权写入服务器上的文件夹,那么从理论上讲,您应该可以对其进行写入。 You should be able to just use the UNC path for the server eg 您应该能够只使用服务器的UNC路径,例如

\\remoteServer\path\to\outputFileName.wmv

However, you might find you experience problems due to network performance. 但是,您可能会发现由于网络性能而遇到问题。 I guess the only way to know is to try it. 我想知道的唯一方法就是尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 写入远程服务器上的文件 - Writing To A File On A Remote Server 通过我的服务器将文件从远程服务器复制到客户端浏览器,而无需将整个文件写入磁盘或内存 - Copy file from remote server to client browser via my server without writing the entire file to disk or memory itextsharp-将文件保存到远程服务器 - itextsharp - saving file to remote server 在远程服务器上运行脚本文件 - Run script file on remote server 写入CloudAppendBlob:远程服务器返回错误:(409)Conflict&ProcessExpectedStatusCodeNoException - Writing to CloudAppendBlob: The remote server returned an error: (409) Conflict & ProcessExpectedStatusCodeNoException 编写连接字符串以访问远程SQL Server数据库 - Writing a connection string to access a remote SQL Server database 比较远程服务器和本地服务器中文件的 FileInfo - To compare FileInfo of file in remote server and local server 将SQL Server表写入文件的快速方法 - Fast way of writing SQL server table into file 将文件写入Web服务器 - ASP.NET - Writing file to web server - ASP.NET 如何同步套接字服务器中的线程以写入文件 - How to synchronize threads in socket server for writing to file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM