Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

Last post 02-15-2008 6:12 AM by Tarantul. 7 replies.

Sort Posts:

  • Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    11-15-2007, 3:48 AM
    • Loading...
    • om singh
    • Joined on 07-27-2007, 10:35 AM
    • Posts 30
    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..?
  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    11-15-2007, 4:19 AM
    • Loading...
    • _kalesh_
    • Joined on 10-23-2007, 11:30 AM
    • Posts 76

    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");

    Aseem \../ (-_-) \./ Gautam
    "You Dont know when the end is, But its Coming Fast"
  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    11-16-2007, 2:28 AM
    • Loading...
    • om singh
    • Joined on 07-27-2007, 10:35 AM
    • Posts 30

    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....

  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    11-16-2007, 2:59 AM
    • Loading...
    • om singh
    • Joined on 07-27-2007, 10:35 AM
    • Posts 30

     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..... 

  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    11-16-2007, 10:46 AM
    • Loading...
    • om singh
    • Joined on 07-27-2007, 10:35 AM
    • Posts 30

    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........?
     

  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    12-07-2007, 2:58 PM
    • Loading...
    • mstubb
    • Joined on 02-28-2007, 6:28 PM
    • Southampton - Hampshire England
    • Posts 19

    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

    Best Regards
    Mark
  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    01-10-2008, 10:33 AM
    • Loading...
    • Ahmish
    • Joined on 04-02-2007, 8:10 PM
    • Pakistan
    • Posts 105

    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?

    "Hope its your Solution so Mark it as Answer"

    Ahmad Sheikh
    Software Development Engineer
    Accountancy Outsourcing Services
    http://itfact.blogspot.com
  • Re: Convert video files(.wmv or .avi) to flash movie file(.flv) using ASP .NET

    02-15-2008, 6:12 AM
    • Loading...
    • Tarantul
    • Joined on 02-15-2008, 5:56 AM
    • Posts 5
    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!
Page 1 of 1 (8 items)
Microsoft Communities
Page view counter