You are here: Re: cropping mp3 files « PHP Programming Language « IT news, forums, messages
Re: cropping mp3 files

Posted by sree on 08/10/06 10:14

Hi Leong,
Thanks for your effort.

can you explain how the number 245760 matches for 15s. If i want for
20s or anyother what i have to do?


Thanks and Regards.

Chung Leong wrote:
> sree wrote:
> > I want to crop the mp3 files using PHP.
> >
> > Actually i have to play the demo of a mp3 song to users. So, i have
> > to crop the first 10 or 20 second of a song first, then it has to be
> > downloaded and played.
>
> MP3 files are sort of formless. If you don't need a precise length, you
> can just cut a chunk out and send it. Example:
>
> <?
>
> header("Content-type: audio/mpeg");
>
> $f = fopen($mp3_path, "rb");
> echo fread($f, 245760);
> fclose($f);
>
> ?>
>
> That would grab the first 15 sec from a 128kbps mp3 file.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация