convert mpg to flv using php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vjayis
    New Member
    • Mar 2008
    • 134

    convert mpg to flv using php

    hi

    i m having a page in which users may upload their own videos .

    And i need to convert it into flv file to run the uploaded file in player..

    is there any sources available ..

    i tried ffmpeg., it works in localhost fine but when i upload it into my server no conversion occurs...

    thanks

    regards
    vijay.
  • chathura86
    New Member
    • May 2007
    • 227

    #2
    ffmpeg works for me fine.

    what is the problem you got with it

    Regards

    Comment

    • vjayis
      New Member
      • Mar 2008
      • 134

      #3
      i followed the steps provided in this link


      and downloaded the files and copied it into my local apache server and checked for the file conversion..

      it works fine.,

      but when i tried the same steps by uploading the files into the webserver no new flv files where generated...

      this is the code present in the file..
      Code:
      <?php
      exec("ffmpeg -i football.mpg football.flv");
      ?>
      is there anyother thing that i would need to do ?

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Hey.

        What are the differences between the servers?
        (Operating systems, version differences, configuration, etc...)

        Note that that tutorial seems to deal with Windows executables. If you are using Windows on your test server, but your real server uses Linux (which is very common) then your Windows executable ffmpeg.exe file won't work. You will need to Linux equivalent.

        Also, it's not uncommon that shared hosts disable exec, and other such functions, as they can pose a security threat. Are you using such a host? - If you are, you might want to inquire as to whether they allow this.

        Comment

        • vjayis
          New Member
          • Mar 2008
          • 134

          #5
          yes the file i downloaded deals with windows..

          i searched through the net and downloaded the files for linux .,

          but i have no idea of about how to deal with those linux files.,

          can you suggest me a good way to complete this conversion..

          thanks

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #6
            I've never worked with ffmpeg myself, so I don't really know how to set it up manually.

            If you are working on a common Linux distribution, you can try to see if it exists in the distro's package manager.
            For example, on Ubuntu (and most likely all Debian-based distros), you can issue this command to install ffmpeg:
            [code=text]$ sudo apt-get install ffmpeg[/code]
            And I'm guessing RedHat/Fedora distributions can do something like this:
            [code=text]$ yum install ffmpeg[/code]

            Try those and see if that works. If not you will probably have to compile it from source. Unless you can find a precompiled binary package compatible with your system.

            Comment

            • vjayis
              New Member
              • Mar 2008
              • 134

              #7
              thank you for your reply..

              As i told i dont know linux so i m not quite right where to execute the code and bring out the output..

              if you find anyother links that could help me please do send me..

              thanks again..

              Comment

              Working...