Load handling while using ffmpeg.exe
-
I am using ffmpeg.exe in my project to convert the uploaded video files(.wmv,.mov,.avi etc) to flash movies files (.flv). I have used process.start() method to execute the executable. In such a scenario every time a file is uploaded, a new process is created for the ffmpeg.exe which converts the uploaded file. This will increase the load on the server as the number of user increase. How can overcome this problem? Can anyone suggest some way out
-
I am using ffmpeg.exe in my project to convert the uploaded video files(.wmv,.mov,.avi etc) to flash movies files (.flv). I have used process.start() method to execute the executable. In such a scenario every time a file is uploaded, a new process is created for the ffmpeg.exe which converts the uploaded file. This will increase the load on the server as the number of user increase. How can overcome this problem? Can anyone suggest some way out
Why are you converting videos in a website at all ? I'm not sure what you can do. Even if you had ahold of the process, how would you know to end it ? Perhap by the video file being done ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Why are you converting videos in a website at all ? I'm not sure what you can do. Even if you had ahold of the process, how would you know to end it ? Perhap by the video file being done ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Well thanks again Christian, well you are correct I am ending it after the video file is getting converted and saved. I have a requirement for which i have to convert file in my website. This conversion thing is working fine but Then I thought executing an exe file will increase the load on server. Is there any way to tackle the problem..? Hope I have made my problem clear in last post. I was wondering instead of a process getting created for each upload can we have many threads for a process....? I am just giving an idea....I don't know if it is possible.
-
Well thanks again Christian, well you are correct I am ending it after the video file is getting converted and saved. I have a requirement for which i have to convert file in my website. This conversion thing is working fine but Then I thought executing an exe file will increase the load on server. Is there any way to tackle the problem..? Hope I have made my problem clear in last post. I was wondering instead of a process getting created for each upload can we have many threads for a process....? I am just giving an idea....I don't know if it is possible.
om pr wrote:
Is there any way to tackle the problem..?
You can create a windows service and install it on server. This service should look into the uploaded directory, and do the conversion. Since you are doing this in a service, you will get complete handle to the process.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
om pr wrote:
Is there any way to tackle the problem..?
You can create a windows service and install it on server. This service should look into the uploaded directory, and do the conversion. Since you are doing this in a service, you will get complete handle to the process.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions