以下是我的config.php
<?php
$CONFIG['music_dir'] = './music/anak-ayam.mp3';
$CONFIG['encoder_path'] = 'lame.exe';
$CONFIG['bitrate'] = '64';
$CONFIG['server_name'] = 'Test Shoutcast Server';
$CONFIG['server_genre'] = 'Random';
$CONFIG['server_url'] = 'http://localhost:45401/';
$CONFIG['server_public'] = '0';
$CONFIG['metadata_interval'] = '8192';以下是我的run.php
<?php // $Id$
require 'config.php';
require 'server.php';
require 'shoutcast.php';
require 'audiosource.php';
require 'http.php';
set_time_limit(0);
$Server = new Server();
$AudioSource = new AudioSource();
$AudioSource->bitrate = $CONFIG['bitrate'];
$AudioSource->encoder = $CONFIG['encoder_path'];
$AudioSource->metadata_interval = $CONFIG['metadata_interval'];
$AudioSource->populate_playlist($CONFIG['music_dir']);
$AudioSource->open_next_file();
$Shoutcast = new Shoutcast();
$Shoutcast->server = &$Server;
$Shoutcast->source = &$AudioSource;
$Shoutcast->metadata_interval = $CONFIG['metadata_interval'];
$Shoutcast->server_name = $CONFIG['server_name'];
$Shoutcast->server_genre = $CONFIG['server_genre'];
$Shoutcast->server_url = $CONFIG['server_url'];
$Shoutcast->server_public = $CONFIG['server_public'];
$Shoutcast->hook_to_server();
$HTTP = new HTTP();
$HTTP->server = &$Server;
$HTTP->shoutcast = &$Shoutcast;
$HTTP->hook_to_server();
$Server->listen();我在Windows 7上运行,当我尝试运行脚本时,这就是我得到的输出
c:\xampp\htdocs\shoutcast>php run.php
Playing:而预期的输出是
c:\xampp\htdocs\shoutcast>php run.php
Playing: anak-ayam.mp3我想自己创建自己的在线无线电服务器,请帮助。我该怎么解决这个问题?
发布于 2013-06-03 04:13:59
由于您使用的是windows .Can,所以可以将mp3的路径更改为
$CONFIG['music_dir'] = './music/anak-ayam.mp3';到某种程度上
$CONFIG['music_dir'] = 'C:/music/anak-ayam.mp3';https://stackoverflow.com/questions/16889708
复制相似问题