Searched for tag audio and found 2 results in 0.5 ms

NPR has a great audio quality comparison test

NPR has an amazing quiz for various bitrates of compressed audio. It will test to see if you can hear the quality difference three different bitrates: 128Kb/s, 320Kb/s, and uncompressed. I've taken the test several times and I'm unable to hear the difference for anything above 128Kb/s. I even used headphones to get the best experience and it didn't help.

Tags:
Leave A Reply

PHP: Serve large audio/video files outside of the webroot

I have some large audio files that I need to serve via HTTPs. They need to be protected by my PHP login system so they cannot live inside of the webroot. Fortunately there is a nifty Apache module named X-sendfile, that lets you serve files outside of the webroot.

Credential checking is done in PHP, and then you set a special HTTP header that Apache watches for. When Apaches sees the X-Sendfile header it serves the file directly. This gets you all the advantages of a full-blown HTTP server handling your files, but the convenience and simplicity of PHP for handling authentication.

if ($authorized) {
    $mime_type = mime_from_filename($filepath);

    header("Content-Type: $mime_type");
    header("X-Sendfile: $filepath");
    exit;
}

See also: Get mime type for file

Tags:
Leave A Reply