I want to convert video files(.wmv and .avi) uploaded on my site to get converted to .flv. Searching the web I found ffmpeg(http://ffmpeg.mplayerhq.hu/) is a command line software which does the required conversion. But i don't know if it can be used with .NET.
If it can be used then how..? If not then what is the other solution...?Can anyone help..?
if you are planning to just have the command line program run, you can call it using:
using System.Diagnostics;
Process myProc;
// Start the process.
myProc = Process.Start("filename"); // filename must include all the switches and arguments eg. @"filename -c:\1.wmv -a..."
.....
....
//close the process
myProc.CloseMainWindow();
You can do this inside a function with a single string argument that contains the complete process name with switches to be run.
public void convert (string FilenamePathAndSwicthes) { .... }
thanks for that advice ....... but i have a confusion......can i use the executable directly by giving its path in the method process.start() ..? aren't we required to make any reference to it in the project like we do for dll's....let me try this n i will
come back to again.....well thanks again....
Well kalesh i tried but somehow its not working i think its because I am not passing the required parameters while calling the executable
To do the same i have found an executable called ffmpeg.exe. can you tell me exactly what parameters do i need to pass and how do i use it in my asp .net project using c# such that the generated .flv video is of same dimension
and quality as the original avi video. Following may be useful to you.
Hey its working for me. There are some sites e.g. http://www.mediasoftpro.com/ where they give already built dll which we can easily implement in our project. All such dlls are actually wrapper to the free tool ffmpeg.exe which can convert videos and audios
from one format to another. So i thought to use the tool itself instead of the wrapper dll. I have tried very simple example n its working for me so thought to share it it with all.
Download ffmpeg.exe from (http://ffdshow.faireal.net/mirror/ffmpeg/). you will get a dll along with it (pthreadGC2.dll) keep both the exe and this dll together.
FFmpeg Documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html) will be required for the syntax.
If you run it via command prompt then this is the syntax
ffmpeg -i inputfilename outputfilename
If it is to be executed via .net then follow what kalesh had suggested in the post before. Do remember to give write permission to the asp worker process on the folder where the resultant flv file will be saved. If you dont then the program will run without
any error or warning but output file will not be produced.
One more thing it do not convert .wmv files to .flv . Is there any way out to it........?
Hi there does anyone know of such a script/code that will convert any video formats to flv runnning under asp. net 2. We don't have a dedicated sever. We plan on users being able to upload a 30 seconds video clip which will convert to flv, which others can
the click on.
We have looked at ffmeg etc but they are exe files which needs permissions set on the sever. Any help would really be appreciated
I have also the same utility ffmpeg.exe to file conversion but i have one problem is that i have to first save the uploaded video file at Application Web Server and then convert it into flv and then save at Flash Media Server(located at different location)
so that they can play through streaming later on. currently, i am uploading flv files directly to the Flash Media Server but problem with other file formats because they will have to be converted into flv to play properly. i need to do conversion while uploading
and directly upload to the Flash Media Server, how can we do that any idea?
ffmpegFlash Media Serverstreamingconversionuploading
"Hope its your Solution so Mark it as Answer"
Ahmad Sheikh
Microsoft Valuable Geek :: Freelancer & Consultant
http://sharpcontents.blogspot.com
hi due! i want to advice you very good prog which i using now!its VisiFly! very helpful and easy step by step prog!works with all cammon formats and has demo without timelimit! i think its great!
Thanks
Rashid Ansari
Email : rashid0715@gmail.com
----------------------------
Please remember to 'Mark as Answer' if this post answered your question!
om singh
Member
52 Points
61 Posts
Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Nov 15, 2007 07:48 AM|LINK
_kalesh_
Member
462 Points
112 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Nov 15, 2007 08:19 AM|LINK
if you are planning to just have the command line program run, you can call it using:
using System.Diagnostics;
Process myProc;
// Start the process.
myProc = Process.Start("filename"); // filename must include all the switches and arguments eg. @"filename -c:\1.wmv -a..."
.....
....
//close the process
myProc.CloseMainWindow();
You can do this inside a function with a single string argument that contains the complete process name with switches to be run.
public void convert (string FilenamePathAndSwicthes) { .... }
then you can call Process.Start as
myProc=Process.Start(@"C:\....\Executable.exe"+FilenamePathAndSwicthes");
"Do right and fear no man."
om singh
Member
52 Points
61 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Nov 16, 2007 06:28 AM|LINK
thanks for that advice ....... but i have a confusion......can i use the executable directly by giving its path in the method process.start() ..? aren't we required to make any reference to it in the project like we do for dll's....let me try this n i will come back to again.....well thanks again....
om singh
Member
52 Points
61 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Nov 16, 2007 06:59 AM|LINK
Well kalesh i tried but somehow its not working i think its because I am not passing the required parameters while calling the executable
To do the same i have found an executable called ffmpeg.exe. can you tell me exactly what parameters do i need to pass and how do i use it in my asp .net project using c# such that the generated .flv video is of same dimension and quality as the original avi video. Following may be useful to you.
download ffmpeg.exe (http://ffdshow.faireal.net/mirror/ffmpeg/)
FFmpeg Documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html)
download ffmpeg.c (http://svn.mplayerhq.hu/ffmpeg/trunk/)
Thanking you in advance.....
om singh
Member
52 Points
61 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Nov 16, 2007 02:46 PM|LINK
Hey its working for me. There are some sites e.g. http://www.mediasoftpro.com/ where they give already built dll which we can easily implement in our project. All such dlls are actually wrapper to the free tool ffmpeg.exe which can convert videos and audios from one format to another. So i thought to use the tool itself instead of the wrapper dll. I have tried very simple example n its working for me so thought to share it it with all.
Download ffmpeg.exe from (http://ffdshow.faireal.net/mirror/ffmpeg/). you will get a dll along with it (pthreadGC2.dll) keep both the exe and this dll together.
FFmpeg Documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html) will be required for the syntax.
If you run it via command prompt then this is the syntax
ffmpeg -i inputfilename outputfilename
If it is to be executed via .net then follow what kalesh had suggested in the post before. Do remember to give write permission to the asp worker process on the folder where the resultant flv file will be saved. If you dont then the program will run without any error or warning but output file will not be produced.
One more thing it do not convert .wmv files to .flv . Is there any way out to it........?
mstubb
Member
30 Points
19 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Dec 07, 2007 06:58 PM|LINK
Hi there does anyone know of such a script/code that will convert any video formats to flv runnning under asp. net 2. We don't have a dedicated sever. We plan on users being able to upload a 30 seconds video clip which will convert to flv, which others can the click on.
We have looked at ffmeg etc but they are exe files which needs permissions set on the sever. Any help would really be appreciated
Mark
Ahmish
Participant
1084 Points
312 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Jan 10, 2008 02:33 PM|LINK
I have also the same utility ffmpeg.exe to file conversion but i have one problem is that i have to first save the uploaded video file at Application Web Server and then convert it into flv and then save at Flash Media Server(located at different location) so that they can play through streaming later on. currently, i am uploading flv files directly to the Flash Media Server but problem with other file formats because they will have to be converted into flv to play properly. i need to do conversion while uploading and directly upload to the Flash Media Server, how can we do that any idea?
ffmpeg Flash Media Server streaming conversion uploading
Ahmad Sheikh
Microsoft Valuable Geek :: Freelancer & Consultant
http://sharpcontents.blogspot.com
Tarantul
Member
6 Points
5 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Feb 15, 2008 10:12 AM|LINK
rashid0715
Member
92 Points
59 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Apr 09, 2009 06:43 AM|LINK
http://www.all4dotnet.com/
Rashid Ansari
Email : rashid0715@gmail.com
----------------------------
Please remember to 'Mark as Answer' if this post answered your question!
Samcoder
Member
2 Points
2 Posts
Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET
Apr 27, 2009 08:55 AM|LINK
Hi ,
I want to convert video file to flv.
//ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -r 1 -s 150*110 -f image2 \"" + mpg + "\""; //image2 foo-%03d.jpegffmpeg.StartInfo.Arguments =
" -i \"" + video + "\" -target vcd -bf 2 \"" + mpg + "\""; // arguments !there is no error in this code .. bt not given me an output flv file .what should i do to resolve this ??
Reply ASAP