unknown101 Posted April 17, 2008 Share Posted April 17, 2008 Hi Guys, Im working on an upload system whereby a user can upload an audio track, but there needs to be a size limit so it uploads no more than 30 seconds. For example they can select a whole track from their hard disk but this will be cut and transferred to the server. Obviously we have the MAX_FILE_SIZE function, but does this assess the size of the file then upload if its under the specified amount or does it just start the upload and completely fail if its out of the specified limit (also if this did happen would it leave part of the file on the server?). So basically im looking for the most effecient way of cutting the first part of a audio file (.mp3) and uploading. Any help or suggestions are appreciated! Thanks in advance Quote Link to comment Share on other sites More sharing options...
miracle_potential Posted April 17, 2008 Share Posted April 17, 2008 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size ?>"> Although I'm pretty sure theres no way to cut a song using the server the user would have to do that themselves or use some sort of Flash function. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 17, 2008 Share Posted April 17, 2008 You can't take a sample from the track client side - you will have to let them upload the entire track and then use mencoder to extract a sample - just google mencoder or mplayer - I know it says movie stuff but it does handle audio too!!! You will need to be able to use exec in your scripts and be able to install mencoder on your server.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.