Self Contained Web Server / Interface (2 Viewers)

Callumgw

Portal Pro
June 2, 2008
134
6
Home Country
I have a new problem: If the BKRemote-plugin is activated, the plugin "external Display" does not work anymore. I have an Antec Fusion 430 with VFD-Display. After enabling BKRemote the VFD-display is not working anymore. If I disable BKRemote the display works without errors...?

Hi,
I have exactly the same problem with VFD.
I use the CybrDisplay Plugin for that VFD.
??


This is probably why mine started giving me a 'data not available' message. It started about the time I put the BKhelper update on. I hadn't got round to finding out why the net stream wasn't coming through. Anyway, my display is from the Thermaltake DH101, which uses the SoundGraph IMon LCD and controller.

C
 

Big_Kev

Portal Pro
June 8, 2007
338
186
Home Country
This works with both audio/video through Internet. No issues. Problem is that your application does not launch VLC in background when it starts. I looked at the log and I don't see there any relevant entries to launching VLC with paths etc.

That is very odd. It should create 2 entries in the log every time it tries to stream. The first entry will say preparing to stream... with the command, and the second entry will say successful if the process was created. So, even if it does not stream, it still should show an entry for the attempt.

Please ensure that you are checking the "live" log from the TV Server page (not in the Web Interface Manager), immediately after the streaming attempt.

Could you have a look in your .ini file in the MP Web Interface directory to check for VLCStreaming=true entry in the Setup section.

Also, once the guide has loaded, ensure that your card is timeshifting - either on the TV Server page, or through MP TV Server configuration Manual Control - and then change the URL from showguide to cardstream?CardID=5&Stream=ON then check the live log from the web interface (not the manager).

This should at least show a streaming attempt.

Kev
 

Kiwi

Portal Pro
September 21, 2006
73
1
Pukerua Bay
Home Country
New Zealand New Zealand
Im following this thread with interest as it will be a superb addition to MP.
Does the app start and stop VLC everytime, or just start & stop streaming and VLC is continuously running?
artisticcheese talks about starting and stopping VLC, while big-kev talks about starting & stopping streaming - maybe thats where some confusion is creeping in???
Great work big_kev!
 

Big_Kev

Portal Pro
June 8, 2007
338
186
Home Country
Im following this thread with interest as it will be a superb addition to MP.
Does the app start and stop VLC everytime, or just start & stop streaming and VLC is continuously running?
artisticcheese talks about starting and stopping VLC, while big-kev talks about starting & stopping streaming - maybe thats where some confusion is creeping in???
Great work big_kev!
The app starts and stops VLC each time channel is changed etc as I had too many issues with timeshift file going back to the beginning when the channel changed otherwise.

For some reason, the Web Interface is not executing the streaming command at all, so it does not get as far as starting VLC in the first place. If id did, there would be an entry in the log... At present I am puzzled, as it works well on my PC (and it is only a P4 1700)

Kev

P.S... Please let me know if ANYONE is actually using this!
 

Kiwi

Portal Pro
September 21, 2006
73
1
Pukerua Bay
Home Country
New Zealand New Zealand
I hope to set it up this weekend, but there's some big car race on.....:D
I will be a definate user as I can see this as being the only way to use an old amd2000 as a client as most content is now HD. Maybe even the kids iPods...
I played around last week trying to start VLC using WMI as created by MJGraf with MPTvClient which was a bit of a mare between XP & Vista. Because of the problem with WMI, Im interested in how you are remotely starting & stopping VLC.
Cheers
 

Big_Kev

Portal Pro
June 8, 2007
338
186
Home Country
I hope to set it up this weekend, but there's some big car race on.....:D
I will be a definate user as I can see this as being the only way to use an old amd2000 as a client as most content is now HD. Maybe even the kids iPods...
I played around last week trying to start VLC using WMI as created by MJGraf with MPTvClient which was a bit of a mare between XP & Vista. Because of the problem with WMI, Im interested in how you are remotely starting & stopping VLC.
Cheers
I use CreateProcess windows API from within the application, and keep track of the ProcessID. Each card gets a separate instance of VLC as it has a different stream URL. I use the Process ID to kill the process when I want to stop it.

Code:
void __fastcall TMPWebSvr::StartStreaming(int CardID, AnsiString FileName)
{
AnsiString AppExe = "\"" + IncludeTrailingBackslash(VLCPath) + "vlc.exe\"";

if (FileName.IsEmpty())
   AppExe += " rtsp://" + VLCServer + "/stream" + CardID + ".0";
else
   {
   VLCStreams->File[CardID] = FileName;
   int Pos = FileName.Pos("\\");
   while (Pos > 0)
      {
      FileName.Delete(Pos, 1);
      FileName.Insert("/", Pos);
      Pos = FileName.Pos("\\");
      }
   AppExe += " file:///\"" + FileName +"\"";
   }

AppExe += " :sout=#transcode{" + VLCStreams->Transcode[CardID] + "}
:duplicate{dst=std{access=http,mux=ts,dst=" + VLCServer + ":" + VLCStreams->Port[CardID] + "}} :sout-keep";

AnsiString Desktop = "default";
AnsiString StartDir = "";

bool WaitForReturn = false;

AnsiString LogString = Now().FormatString("c") + " - Preparing to stream on card " + AnsiString(CardID)+" - Command = " + AppExe + "\r\n";
if (LogStream == NULL)
   LogStream = new TFileStream(IncludeTrailingBackslash(ServicePath) + "MPWebInt.log", fmCreate | fmShareDenyNone);
LogStream->Write(LogString.c_str(), LogString.Length());

PROCESS_INFORMATION pi;
STARTUPINFO si;

ZeroMemory(&pi, sizeof(pi));
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);

si.lpDesktop = Desktop.c_str();

VLCStreams->ProcessID[CardID] = 0;

bool Success = false;
try
   {
   if(::CreateProcess(NULL, AppExe.c_str(), NULL, NULL, false, DETACHED_PROCESS|NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi))
      {
      VLCStreams->ProcessID[CardID] = pi.dwProcessId;
      CloseHandle(pi.hProcess);
      CloseHandle(pi.hThread);
      }
   }
catch(Sysutils::Exception &e)
   {
   AnsiString Message = e.Message;
   }
if (VLCStreams->ProcessID[CardID])
   {
   AnsiString LogString = Now().FormatString("c") + " - Streaming started on card " + AnsiString(CardID)+"\r\n";
   if (LogStream == NULL)
      LogStream = new TFileStream(IncludeTrailingBackslash(ServicePath) + "MPWebInt.log", fmCreate | fmShareDenyNone);
   LogStream->Write(LogString.c_str(), LogString.Length());
   }
}
//---------------------------------------------------------------------------

void __fastcall TMPWebSvr::StopStreaming(int CardID)
{
// Stop VLC Instance created for streaming...
if (VLCStreams->ProcessID[CardID]) // Check that this instance is still runninig...
   {
   try
      {
      HANDLE ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, false, VLCStreams->ProcessID[CardID]);
      ULONG ExitCode;
      GetExitCodeProcess(ProcessHandle, &ExitCode);
      TerminateProcess(ProcessHandle, ExitCode);
      CloseHandle(ProcessHandle);
      AnsiString LogString = Now().FormatString("c") + " - Stop streaming on card " + AnsiString(CardID)+"\r\n";
      if (LogStream == NULL)
         LogStream = new TFileStream(IncludeTrailingBackslash(ServicePath) + "MPWebInt.log", fmCreate | fmShareDenyNone);
      LogStream->Write(LogString.c_str(), LogString.Length());

      }
   catch(...)
      {
      }
   VLCStreams->ProcessID[CardID] = 0;
   VLCStreams->File[CardID] = "";
   }
}
//---------------------------------------------------------------------------

You can see the command used in the live log in the new version.

Kev
 

Golf4

Portal Pro
August 18, 2006
2,723
219
Dunkeldeutschland
Home Country
Germany Germany
I have a new problem: If the BKRemote-plugin is activated, the plugin "external Display" does not work anymore. I have an Antec Fusion 430 with VFD-Display. After enabling BKRemote the VFD-display is not working anymore. If I disable BKRemote the display works without errors...?

Hi,
I have exactly the same problem with VFD.
I use the CybrDisplay Plugin for that VFD.
??


This is probably why mine started giving me a 'data not available' message. It started about the time I put the BKhelper update on. I hadn't got round to finding out why the net stream wasn't coming through. Anyway, my display is from the Thermaltake DH101, which uses the SoundGraph IMon LCD and controller.

C

Hi,
For me for the moment no problem.
I use the BKRemote not and deactivate it.
Afterwards 1x MP call and the incorrect indications did not disappear.
 

Mr.Montesa

Portal Pro
August 9, 2006
91
7
Hessen
Home Country
Germany Germany
I'm using your plugin but not the streaming feature. In this thread is so much overhead, that it will take several "hours" to get it running.
All the try&error informations are needed, but not informative to get a working setup.
Is it possible for someone to write a small "Best practice setup HowTo". I would love to test the new stuff.
greets
 

mortstar

MP Donator
  • Premium Supporter
  • January 30, 2008
    415
    41
    Home Country
    England England
    Just wanted to point out my own clairvoyance in this thread https://forum.team-mediaportal.com/general-talk-233/iphone-tv-server-43516/ :cool:

    So close to this now....I've not had chance to play with the new transcoding features of this fantastic plugin, but hopefully will do soon.

    anybody any experience with transcoding to h264 for playback on ipod touch/iphone?

    Big_Kev you're a genius - this plugin is great, VLC streaming is great - I think a donation to MediaPortal, MP TV Series and yourself is in order as I've used them non-stop for a year now and it has this affect on all who see it in action :eek:. I think you need to PM a mod (Paranoid Delusion seems to be very helpful) to get a separate Hot Plugins thread for Web Interface.

    An MP Web Interface suggestion:
    When searching for programs I usually choose the channel it is going to be on - at the moment this uses all the channels in the TV Server - could it default to selecting the default group for the user logged in?
     

    Users who are viewing this thread

    Top Bottom