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
https://forums.phpfreaks.com/topic/86681-manipulate-uploaded-file-before-copying/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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