Postby Guest » 16 Mar 2006 09:49
Im trying to add subtitle fetaure to the script like this.
index.php//
<input name="source" type="radio" onClick="document.start.vdevice.disabled=true;document.start.adevice.disabled=true;document.start.channel.disabled=true;document.start.file.disabled=false;start.sub.disabled=false;" value="file" checked <?php if (isset($_GET['source']) && $_GET['source']=="file") echo "checked=\"checked\"";?>>
</div> </th>
<th width="178" scope="col"><div align="left">
<select name="file" size="1" <?php if ((!isset($_GET['source']))||(isset($_GET['source']) && $_GET['source']!="file")) echo "selected=\"selected\"";?>>
<?php
$dir_handle = opendir($stream_dir);
while ($entry=readdir($dir_handle)) {
$rev_str = strrev($entry);
$pos = strrpos($rev_str, ".");
$rev_str = substr($rev_str, 0,3);
if (is_file($stream_dir . "/" . $entry)) {
if ($entry[0] != ".") {
echo "<option>".$entry."</option>";
}
}
}
closedir($dir_handle);
?>
</select>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left">
<select name="sub" size="1" <?php if ((!isset($_GET['source']))||(isset($_GET['source']) && $_GET['source']!="file")) echo "selected=\"selected\"";?>>
<?php
$dir_handle = opendir($sub_dir);
while ($entry=readdir($dir_handle)) {
$rev_str = strrev($entry);
$pos = strrpos($rev_str, ".");
$rev_str = substr($rev_str, 0,3);
if (is_file($sub_dir . "/" . $entry)) {
if ($entry[0] != ".") {
echo "<option>".$entry."</option>";
}
}
}
closedir($dir_handle);
?>
</select>
</div>
start.inc//
$directshow = "";
if ($_GET['source'] == "file") {
$directshow = "\"" . $stream_dir . $_GET['file'] . " :sub-file=/" . $sub_dir . $_GET['sub'] . "\"";
} elseif ($_GET['source'] == "tv") {
$directshow = "dshow:// --dshow-vdev=\"" . urldecode($_GET['vdevice']) ."\" --dshow-adev=\"". urldecode($_GET['adevice']) . "\" --dshow-tuner-channel=" . $_GET['channel'] . " --dshow-tuner-country=".$tuner_country." --dshow-caching=".$caching." --dshow-tuner-input=".$vlc_tuner_input." --dshow-chroma=".$vlc_chroma . " --dshow-size=\"352x288\" --no-dshow-config --no-dshow-tuner";
}
configuration.ini//
$stream_dir = $script_dir . "streaming\\";
$sub_dir = $stream_dir . "subtitles\\";
i get theese messages when i hit the startbottom:
main error: no suitable access module for `D:\Mina Dokument\Emil\Projektarbete\EasyPHP1-8\www\Projekt06\stream\live\streaming\1Thank You For Smoking (trailer)AVC_1Mbps_Stream.mp4 :sub-file=/D:\Mina Dokument\Emil\Projektarbete\EasyPHP1-8\www\Projekt06\stream\live\streaming\subtitles\sub.srt'
whats wrong?