Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Convert .wmv or .avi files to .flv file using ASP .NET

Convert .wmv or .avi files to .flv file using ASP .NET

Scheduled Pinned Locked Moved ASP.NET
questioncsharpalgorithmshelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AumSingh
    wrote on last edited by
    #1

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

    C 1 Reply Last reply
    0
    • A AumSingh

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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can start any process from .NET with process.start. ASP.NET obviously has nothing to do with the process of the actuial conversion

      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 )

      A 1 Reply Last reply
      0
      • C Christian Graus

        You can start any process from .NET with process.start. ASP.NET obviously has nothing to do with the process of the actuial conversion

        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 )

        A Offline
        A Offline
        AumSingh
        wrote on last edited by
        #3

        thanks for the reply Christian, I got it .... 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/)

        A 1 Reply Last reply
        0
        • A AumSingh

          thanks for the reply Christian, I got it .... 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/)

          A Offline
          A Offline
          AumSingh
          wrote on last edited by
          #4

          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 Christianhad suggested in the post before. Process.Start can be used to execute an executable.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........?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups