Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to split a wmv file
    text
    copied!<p>im doing a application in which i split a wmv file and transfer it to otherlocation(in 'x' kbs) .after the transfer gets completed the file doesnt play,it gives a message as the format is not supported.is there anyother way to do it.</p> <p>sory i will explain what im doing now</p> <p>i wrote an remote application,i want to transfer a .wmv file from one machine to other,i want to split the .wmv and send it to the remote machine and use it there.if i try to send the complete file means it will take lot of memory that seems very bad.so i want to split it and send it.but the file doesnt gets played it raises an exception the format is not supported.</p> <p>the following is the code im doing i just done it in the local machine itself(not remoting):</p> <pre><code>try { FileStream fswrite = new FileStream("D:\\Movie.wmv", FileMode.Create); int pointer = 1; int bufferlength = 12488; int RemainingLen = 0; int AppLen = 0; FileStream fst = new FileStream("E:\\Movie.wmv", FileMode.Open); int TotalLen = (int)fst.Length; fst.Close(); while (pointer != 0) { byte[] svid = new byte[bufferlength]; using (FileStream fst1 = new FileStream("E:\\Movie.wmv", FileMode.Open)) { pointer = fst1.Read(svid, AppLen, bufferlength); fst1.Close(); } fswrite.Write(svid, 0, pointer); AppLen += bufferlength; RemainingLen = TotalLen-AppLen; if(RemainingLen &lt; bufferlength) { byte[] svid1 = new byte[RemainingLen]; using (FileStream fst2 = new FileStream("E:\\Movie.wmv", FileMode.Open)) { pointer = fst2.Read(svid1, 0, RemainingLen); fst2.Close(); } fswrite.Write(svid, 0, pointer); break; } } fswrite.Close(); } catch(Exception ex) { MessageBox.Show(ex.Message); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload