开发者

I need to open several VLC clients in order to "monitor" the stream they're receiving

I want to be able to specify how many clients do I want opened, and be able to manually switch between the windows after they're opened- meaning "streaming in background" (if such a thing is possible? ) won't do here.

I need to specify different inputs for the different clients as well开发者_开发百科.

Additionally -and this is the part I'm totally clueless about as it's VLC-specific - I need the clients to be logging some info re:the stream they're receiving, so as to be able to determine that it has been received completely etc -such as frame rate/total frames' number or similar.

I'd appreciate helpful suggestions for

  1. running the instances+ controlling them
  2. getting info about the stream

Language-wise - I know Java, some C#, and wouldn't mind learning some new language for this purpose if it's a better solution .

Thanks!


Depending on your version of VLC, you may need to enable an option to run multiple instances. See here: http://wiki.videolan.org/How_to_play_multiple_instances_of_VLC

It does sound like a 'run windows processes in a loop' thing, which you could do several ways.

You could make a windows batch file (.bat):

"C:\path\to\vlc.exe" -vvv "http://www.whatever.com/mystream.mms"    
"C:\path\to\vlc.exe" -vvv "http://www.whatever.com/mystream2.mms"    
"C:\path\to\vlc.exe" -vvv "C:\music\whatever.mp3"

Or you could use a real programming language and perhaps open a variable number of instances... C# for example:

using System.Diagnostics;

...

foreach (string stream in streamList) {
    Process myProc = new Process();
    string myCmd = @"C:\path\to\vlc.exe";
    string myArgs = "-vvv \"" + stream + "\"";
    ProcessStartInfo myStart = new ProcessStartInfo(myCmd, myArgs);
    myStart.UseShellExecute = false;
    myProc.StartInfo = myStart;
    myProc.Start();
}

See this page for a full list of VLC command line options: http://www.videolan.org/doc/vlc-user-guide/en/ch04.html

Hope this helps.


You'll either need to run several processes (as above) or hook somehow into libvlc and instruct it to start up several players.

A good demo of this is the python wrapper to libvlc--I think--it shows how to sample to know where the stream is--however I've never tried it with multiple things running at the same time but I think it would work.

Another option might be something like http://wiki.videolan.org/Mosaic

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜