473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Error "No process is associated with this object" while creating a thumbnail for Vide

Hi,

I am trying to upload video on website for that the thumbnail should be created automatically. But when i upload the video the error occurs "No process is associated with this object."

The code is as follows:


Expand|Select|Wrap|Line Numbers
  1. Guid id = Guid.NewGuid();
  2.  
  3. #region Upload the Video                           
  4.  
  5. Upload.SaveAs(Server.MapPath(VideoDir + id.ToString() + ".wmv"));
  6.  
  7. #endregion
  8.  
  9. #region Create the thumbnail
  10.  
  11.    string thumbpath, thumbname, inputfile;
  12.    string thumbargs;
  13.    Process thumbproc = new Process();
  14.    try
  15.    {      
  16.       thumbpath = Server.MapPath(PictureDir);
  17.       thumbname = thumbpath + id + ".jpg";
  18.       inputfile = Server.MapPath(VideoDir + id.ToString() + ".wmv");
  19.       thumbargs = "-i " + inputfile + " -f mjpeg -t 0.01 -y " + thumbname;
  20.       thumbproc = new Process();
  21.       thumbproc.StartInfo.FileName = Server.MapPath(".") + "\\ffmpeg\\ffplay.exe";
  22.       thumbproc.StartInfo.Arguments = thumbargs;
  23.       thumbproc.StartInfo.UseShellExecute = false;
  24.       thumbproc.StartInfo.CreateNoWindow = true;
  25.       thumbproc.StartInfo.RedirectStandardOutput = true;
  26.       thumbproc.Start();
  27.    }
  28.    catch (Exception ex)
  29.    {
  30.        lblMessage.Text = ex.Message;
  31.        lblMessage.ForeColor = System.Drawing.Color.Red;
  32.        lblMessage.Visible = true;
  33.    }
  34.    if (thumbproc != null)
  35.    {
  36.        thumbproc.WaitForExit();
  37.        thumbproc.Close();
  38.     }
  39. #endregion
Jun 23 '11 #1
0 1698

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: vincent wehren | last post by:
Hi, Trying to grasp Py_NewInterpreter()in a simple app embedding Python, I was wondering why the following gives me an error: int main() { PyThreadState *tstate; Py_Initialize();
7
by: Ryan Park | last post by:
Hi, //SITUATION I got a panel control that hold a certain position on a form. Every controls or UIs are on this panel. At certain situation, I called dispose() method of this panel control...
2
by: Mr X | last post by:
I'm a few weeks new to JS, and am having a problem. I have a simple INTERNAL style in a web page and I know that style is working. The problem arises when I try to run a script that changes one of...
2
by: Mike John | last post by:
I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I put my html file in the web server...
1
by: Mr.KisS | last post by:
Hi, In my aspx page i use a stocked procedure and in this procedure, there is a SELECT query. And whene the aspx page calls the procedure i get this exception : ...
2
by: Rajat Tandon | last post by:
Hi, I have a grid which is continuously updating by the data from a external event. When I close the form on which the grid is placed, then it gives the error message ... "Can not access a...
21
by: comp.lang.tcl | last post by:
set php {<? print_r("Hello World"); ?>} puts $php; # PRINTS OUT <? print_r("Hello World"); ?> puts When I try this within TCL I get the following error:
8
by: Steve Kershaw | last post by:
I have a debugging/breakpoint problem that I must fix before I move on!!! When I set a breakpoint in my ASP.NET (C#) page I get the red circle with the 'A'. When I mouse over this breakpoint I...
0
by: Peter | last post by:
Hi I'm stuck and would appreciate some help. I have created a Class library project that contains a number of interface definitions that must be used by a range of other VB.NET applications. ...
2
by: bednarz.thomas | last post by:
I have the following business Object(s): public class ParentObject { public ParentObject(string somestring) { ...- } ....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.