Jump to content

Manipulate uploaded file before copying.....


advancedfuture

Recommended Posts

I am trying to get my upload form working so I can convert video into flash format... So far I have not been having much success...

 

Basically the way IT SHOULD work is... User selects a file to upload, the file is sent to FFMPEG for encoding, and the final file is copied to the correct directory... This is my code as far. As you can see I'm trying to pass that uploaded file off to FFMPEG but it isn't working as intended.

 

<?php
echo '<form action="videoUpload.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input name="ufile" type="file" id="ufile" size="50" />
<input type="submit" name="Submit" value="Upload" />
</form>';

if($_POST['Submit'])
{
$target_path = "upload/";
$exec = "ffmpeg -i ".$_FILES['ufile']['name']." -ab 56 -ar 22050 -b 500 -r 15 -s 320x240".$_FILES['ufile']['tmp_name'].".flv";
exec($exec);
copy($_FILES['ufile']['tmp_name'], $path);
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.