1. TechSpot is dedicated to computer enthusiasts and power users. Ask a question and give support. Join the community here.
    TechSpot is dedicated to computer enthusiasts and power users.
    Ask a question and give support.
    Join the community here, it only takes a minute.
    Dismiss Notice

Ffmpeg & Php

By Drenholm
Jun 18, 2007
  1. Ho everyone!

    I've found little documentation that'll help me out on that there interweb, so I hope someone here is in the know!

    I'm working on a Youtube type system for a local school, so far everything's going fine, but I want it to automatically convert uploaded video files of various types to flv. Currently I have it set to only allow upload of flv files.

    FFMPEG, a command line video conversion tool seems to be the solution, unless someone can tell me of a better one.
    documentation is here: http://ffmpeg.mplayerhq.hu/
    SVNs are here: http://svn.mplayerhq.hu/ffmpeg/trunk/
    Windows compiled downloads here : http://ffdshow.faireal.net/mirror/ffmpeg/ (this is what I'm using)

    The propram itself works very well, but trying to get it to work on an external server is something quite new to me.

    Here are a couple of brief tutorials I've looked at:
    They're brief in that they just provide and explain (to some extent) the code needed but don't talk about files that should be used.

    I get no errors and no results (converted files) so I struggle to figure out where I'm going wrong. That is if it's even possible to do since I'm developing on my University's web space; would it be likely that the server restricts executing programs.

    I believe that the servers are Linux so would I need a different version to the Windows compiled one? I'm not sure if by Windows compiled it means compiled under Windows or specifically FOR Windows.

    Well thanks for reading! Hope someone can help!
  2. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,345   +11

    For a Linux server you'd need Linux binaries of ffmpeg (& PHP).

    You could check if exec() is disabled with a simple PHP script (unless phpinfo() is disabled too):
    <?php phpinfo(); ?>

    If phpinfo() is disabled as well, you can see the same (sort of) output from command line with "php -i".

    It's also possible (but a bit odd, in my opinion) that PHP error logging is disabled completely on that server, so if something fails, you wouldn't see it.

    Also note that servers have a maximum file size for uploading data (in $_POST). The default varies, but the parameters are post_max_size and upload_max_filesize in php.ini.
  3. jobeard

    jobeard TS Ambassador Posts: 10,432   +801

    also make sure you understand where the converted files will be placed on the
    server. you make need to relocate them to your desired location before the
    server returns results to the user.
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...