c# - Using VP8.NET to stream to a webm file -


i using vp8 .net library convert video stream laptop webcam , store in webm file (no audio needed). so, i'm using code provided example in documentation of library , added few lines of code write encoded stream file. here's code:

class encodingsession {     private readonly vp8.encoder encoder;     static filestream fs = new filestream("provavideo.webm", filemode.createnew);     binarywriter w = new binarywriter(fs);      public encodingsession(int width, int height, int fps)     {         encoder = new vp8.encoder(width, height, fps);      }      public byte[] encode(image frame)     {         encoder.forcekeyframe();         byte[] array = encoder.encode((bitmap)frame);         w.write(array);         return array;     }  } 

however, not produce valid webm file, because webm headers missing. question is: how add valid webm header (if needed)? there other stuff needed added file?


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -