PHP Classes

Audio Streamer: Convert audio files to MP3 or WAV format streams

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 31%Total: 4,813 This week: 1All time: 569 This week: 104Up
Version License PHP version Categories
audio_streamer 0.1GNU Lesser Genera...5.0PHP 5
Description 

Author

This class can be used the convert audio files in many formats to MP3 or WAV format streams.

It uses external programs to read audio files in many formats and output audio streams in the MP3 or WAV formats.

The converted streams can be saved to other files or served as the current script output.

Currently it supports converting files in the formats: MP3, WAV, OGG, FLAC, MPC, APE, WV, OFR, LA, PAC, SHN, AAC, AC3, AIF, 3GP, MOV, RAW and WMA.

The stream output bit rate and mono/stereo mode parameters are configurable.

Innovation Award
PHP Programming Innovation award nominee
June 2007
Number 4
PHP does not have built-in extensions to manipulate audio. This apparent limitation can be compensated by using external audio manipulation programs that PHP can execute.

Sometimes it is necessary to manipulate large audio files. If PHP retrieves the resulting audio files into memory before serving them to the users, that may exceed the configured PHP memory limits.

That also would impose a delay caused by the time that programs take to finish the audio processing operations.

Another alternative is to generate temporary files to store the result of the requested audio manipulation operations. This would solve the memory problem, but it could take too much disk space and would not solve the delay problem.

This class implements an alternative that takes advantage of pipes between programs that are available under Unix, Linux and other systems, to execute external audio manipulation programs.

This way, the resulting audio files can be streamed directly to the user browser without any delays, and without taking too much server memory or any disk space.

Manuel Lemos
Picture of adrien gibrat
Name: adrien gibrat <contact>
Classes: 5 packages by
Country: France France
Age: 44
All time rank: 23216 in France France
Week rank: 115 Up5 in France France Up
Innovation award
Innovation award
Nominee: 2x

Recommendations

How to convert MP3 file to a different bitrate?
MP3 bitrate converter

flac decoder mostly aurora.js
Decode FLAC audio files using HTML5 and aurora.js

  Files folder image Files  
File Role Description
Plain text file class.audio_streamer.php Class Audio Streamer class
Accessible without login Plain text file exemple.php Example Exemple usage

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,813
This week:1
All time:569
This week:104Up
User Ratings User Comments (1)
 All time
Utility:43%StarStarStar
Consistency:50%StarStarStar
Documentation:-
Examples:43%StarStarStar
Tests:-
Videos:-
Overall:31%StarStar
Rank:4261