Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. protected void Upload_Click(object sender, EventArgs e)
  2. {
  3. //File Uploads to Server
  4. Thread t1 = new Thread(
  5. unused => compressVideo(Video_Path, Final_Path,User_id)
  6. );
  7. t1.Start();
  8. }
  9.  
  10. public static void compressVideo(string Video_Path, string Final_Path,string UID)
  11. {
  12. var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
  13. ffMpeg2.ConvertProgress += (o, args) =>
  14. {
  15. //SignalR calls.Doing this to update the ui
  16. };
  17.  
  18. ffMpeg.ConvertMedia(Video_Path, Final_Path, NReco.VideoConverter.Format.mp4);
  19. File.Delete(Video_Path);
  20. _waitHandle.Set();
  21. }
  22.  
  23. ffMpeg.ConvertMedia(Video_Path, Final_Path, NReco.VideoConverter.Format.mp4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement