So i have an application takes a uploaded song and allows the user to purchase it. I would like to also create a 30 second clip that the user can preview, but rather then having the user upload two files I want the application to create the 30 second mp3 file based on the original mp3. I found this library which i am using like this
$oSplit=new CMP3Split(DIR_DOWNLOAD ."Made_To_Love.mp3",243,DIR_DOWNLOAD ."clips/{$rndString}.mp3",30,0);
but it seems to not always produce a 30 second clip
and i also found this question which is using ffmpeg which i dont know how to use in a php setting.
Any ideas or suggestions