Dysan Posted February 14, 2008 Share Posted February 14, 2008 Hi, Using PHP, is it possible to create a preview (shorter) version of an mp3 song? Link to comment https://forums.phpfreaks.com/topic/91096-mp3-previews/ Share on other sites More sharing options...
Isityou Posted February 14, 2008 Share Posted February 14, 2008 Nope, I don't think there are PHP libraries to handle music. Link to comment https://forums.phpfreaks.com/topic/91096-mp3-previews/#findComment-466904 Share on other sites More sharing options...
Dysan Posted February 14, 2008 Author Share Posted February 14, 2008 The following code shortens a mp3 files length, only how does it work? What are the values in bold? $trash = fread($f, 2488320); read the first minuet in to a guarbage veriable echo fread($f, 245760); echo the 15 seconds we wish to play $trash = null ; dump the guarbage veriable (save ram) fclose($f); close the file Link to comment https://forums.phpfreaks.com/topic/91096-mp3-previews/#findComment-466994 Share on other sites More sharing options...
mikefrederick Posted February 14, 2008 Share Posted February 14, 2008 bold numbers are bytes Link to comment https://forums.phpfreaks.com/topic/91096-mp3-previews/#findComment-467002 Share on other sites More sharing options...
Dysan Posted February 14, 2008 Author Share Posted February 14, 2008 What are there role in the code? How are they calculated? Link to comment https://forums.phpfreaks.com/topic/91096-mp3-previews/#findComment-467066 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.