• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • ogg://

    音频流

    说明

    通过包装器ogg://读取的文件,是作为OGG/Vorbis格式的压缩音频编码。同样,通过包装器ogg://写入或追加的数据格式也是压缩音频。当stream_get_meta_data()用于一个打开读取的OGG/Vorbis文件时,会返回关于数据流的详细信息,包含了$vendor标签、任何内含的$comments$channels数字、采样率($rate),以及用$bitrate_lower$bitrate_upper$bitrate_nominal$bitrate_window描述的可变比特率范围。

    ogg://PHP 4.3.0 及以上(PECL)

    Note:该封装器默认未激活
    要使用ogg://封装器,您必须安装» OGG/Vorbis扩展。可以在» PECL上找到。

    用法

    • ogg://soundfile.ogg
    • ogg:///path/to/soundfile.ogg
    • ogg://http://www.example.com/path/to/soundstream.ogg

    可选项

    封装协议摘要
    属性支持
    受限于allow_url_fopenNo
    允许读取Yes
    允许写入Yes
    允许附加Yes
    允许同时读写No
    支持stat()No
    支持unlink()No
    支持rename()No
    支持mkdir()No
    支持rmdir()No
    上下文选项
    NameUsageDefaultMode
    pcm_mode读取时使用如下 PCM 编码之一:OGGVORBIS_PCM_U8OGGVORBIS_PCM_S8OGGVORBIS_PCM_U16_BEOGGVORBIS_PCM_S16_BEOGGVORBIS_PCM_U16_LEOGGVORBIS_PCM_S16_LE。(8 或 16 位,签名或未签名,大或小的endian)OGGVORBIS_PCM_S16_LE读取
    rate输入数据的采样率,单位为 Hz 44100写入/附加
    bitrate若给的值为整数,则是用固定的比特率进行编码。(16000 到 131072)若给的值为浮点数,则使用可变的比特率(质。(-1.0 到 1.0)128000写入/附加
    channels要编码的声道的数量,典型为 1(单声道),或 2(立体声)。最高支持 16 声道。2写入/附加
    comments编码到音轨头部的字符串数组。写入/附加

    范例

    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.

    上篇:rar://

    下篇:expect://