ogg://
ogg:// — Audio streams
Description
Files opened for reading via the ogg:// wrapper
are treated as compressed audio encoded using the OGG/Vorbis codec.
Similarly, files opened for writing or appending via the
ogg:// wrapper are writen as compressed audio data.
stream_get_meta_data(), when used on an OGG/Vorbis
file opened for reading will return various details about the stream
including the vendor
tag, any included
comments
, the number of
channels
, the sampling rate
,
and the encoding rate range described by:
bitrate_lower
, bitrate_upper
,
bitrate_nominal
, and bitrate_window
.
ogg:// PHP 4.3.0 and up (PECL)
Note: This wrapper is not enabled by default
In order to use the ogg:// wrapper you must install the » OGG/Vorbis extension available from » PECL.
Usage
- ogg://soundfile.ogg
- ogg:///path/to/soundfile.ogg
- ogg://http://www.example.com/path/to/soundstream.ogg
Examples
- Функция file://() - Доступ к локальной файловой системе
- Функция http://() - Доступ к URL-адресам по протоколу HTTP(s)
- Функция ftp://() - Доступ к URL-адресам по протоколу FTP(s)
- Функция php://() - Доступ к различным потокам ввода-вывода
- Функция zlib://() - Сжатые потоки
- Функция data://() - Схема Data (RFC 2397)
- Функция glob://() - Нахождение путей, соответствующих шаблону
- Функция phar://() - PHP архив
- Функция ssh2://() - Secure Shell 2
- Функция rar://() - RAR
- Функция ogg://() - Аудио потоки
- Функция expect://() - Потоки для взаимодействия с процессами
Коментарии
Note that although "ogg:" is the wrapper name, the stream is restricted to Ogg files containing a single stream encoded using the Vorbis audio codec. An Ogg container can, in fact, contain multiple streams: audio, video, anything. (Also, the audio streams in an Ogg contaner can use codecs such as FLAC and OggPCM.) The wrapper name is therefore misleading.