Did you set PAT and PMT in addition to the audio and video PIDs? The PAT should be 0, for the PMT you have to take the value from the streaminfo window. For my SAT1-stream the values from streaminfo are:If I put port 31339 I don't get anything, do you know why?
The port number should be 31339. But you have to add the PAT (0) and PMT values in addition:I am using OS X, and the port I am getting picture on is 31338:
http://192.168.207.245:31338/200,280
Where the two last numbers are VPID and APID.
Code: Select all
// dbvlc.js - Dreambox VLC Script 2004 - Lars Rönnbäck (lars@delicate.se)
// Configuration
var dreambox = "192.168.0.2";
var useTranscoding = "true"
// Transcoding options
var windows = "192.168.0.3";
var port = 8080;
var videoCodec = "mp4v";
var videoBitrate = 400;
var scale = 0.5;
var audioCodec = "vorb";
var audioBitrate = 96;
var mux = "ogg";
var access = "http";
// Used for reading registry and calling vlc
var shell = new ActiveXObject("WScript.Shell");
// Fetch the streaminfo from the Dreambox
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET", "http://" + dreambox + "/cgi-bin/streaminfo", false);
xmlhttp.send();
var streaminfo = xmlhttp.responseText;
// Get rid of some HTML junk
var trTag = /<tr>/g;
streaminfo = streaminfo.replace(trTag, "\n");
var anyTag = /<[^>]*>/g;
streaminfo = streaminfo.replace(anyTag, "");
// Parse the important values
// shell.popup(streaminfo);
var pmt = streaminfo.substr(streaminfo.indexOf("PMT:") + 4, 4);
var aPid = streaminfo.substr(streaminfo.indexOf("APID:") + 5, 4);
var vPid = streaminfo.substr(streaminfo.indexOf("VPID:") + 5, 4);
var vfIndex = streaminfo.indexOf("Video Format:");
var width = streaminfo.substr(vfIndex + 13,
streaminfo.indexOf("x", vfIndex) - vfIndex - 13);
var height = streaminfo.substr(streaminfo.indexOf("x", vfIndex) + 1,
streaminfo.indexOf(" ", vfIndex) - vfIndex - 2);
// Read the VLC location from the registry
var key = "HKLM\\Software\\Classes\\Applications\\vlc.exe\\shell\\Play\\command\\";
var vlc = shell.regRead(key);
vlc = vlc.substr(0, vlc.lastIndexOf(" "));
// Set up transcoding options
var transcoding = ""
if (useTranscoding == "true")
transcoding = "--sout \"#transcode{acodec=" + audioCodec + ",ab=" + audioBitrate +
",vcodec=" + videoCodec + ",width=" + width * scale +
",height=" + height * scale + ",deinterlace}:standard{access=" +
access + ",mux=" + mux + ",url=" + windows + ":" + port + "}\"";
// Start VLC with all options
var commandLine = "\"" + vlc + "\" -vvv http://" + dreambox + ":31339/0," + pmt +
"," + vPid + "," + aPid + " " + transcoding;
shell.run(commandLine);
Return to “VLC stream-output (sout)”
Users browsing this forum: No registered users and 271 guests