Page 1 of 1
MxPEG streaming in VLC pluggin
Posted: 11 Nov 2013 10:56
by rafaware
Hi all
I'm trying to play a streaming from a Mobotix Camera. By default, the format is MxPEG, which is a format that VLC can play (
https://forum.videolan.org/viewtopic.php?f=7&t=97738) passing "avformat-format=mxg" option
Does the VLC web plugin supports this functionality?
I'm trying:
Code: Select all
var g_Url = "http://ip/control/faststream.jpg?stream=MxPEG&fps=0";
var g_PlayerOptions = "--avformat-format=mxg"
var vlc = getVLC();
var vlcid = vlc.playlist.add(g_Url, "", g_PlayerOptions);
vlc.playlist.play();
and it doesn't work. If I try with another RTSP stream or MJPEG stream from another camera it works properly
Where can I look at the pluggin's log?
Best Regards
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 11:31
by owagner
Hi,
I have exactly the same issue.
As far as I can tell, the reason is that the "avformat-format" option is not declared "safe" and thus stripped out from the web plugin parameters. Thus, vlc continues to treat the MxPEG stream as a MJPEG stream, and failing.
A fix might be to add the change_safe() call in modules/demux/avformat/avformat.c
Code: Select all
add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT, true )
change_safe()
However, I have no means of compiling a win32 build of vlc to test that.
Best Regards,
Olli
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 11:56
by owagner
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 12:00
by RSATom
I could make it treated as safe in FBVLC...
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 14:45
by owagner
That would be great (just looking at FBVLC for the first time)!
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 17:39
by RSATom
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 18:36
by owagner
Tried it, works like a charm:
Code: Select all
args=new Array(":avformat-format=mxg");
id=pl.addWithOptions(surl,args);
Thank you very much!
Best Regards,
Olli
PS: Noticed in passing and not investigated yet: I had to use document.getElementById("vlc") explicitely, a jQuery selector $("#vlc").get(0) did not work.
Re: MxPEG streaming in VLC pluggin
Posted: 24 Jun 2014 23:12
by owagner
Would you mind making "avcodec-hw" TRUSTED as well?
Actually, perhaps the possibility for the plugin to load a specific config file...?
Thanks,
OIli
Re: MxPEG streaming in VLC pluggin
Posted: 25 Jun 2014 04:33
by RSATom
PS: Noticed in passing and not investigated yet: I had to use document.getElementById("vlc") explicitely, a jQuery selector $("#vlc").get(0) did not work.
Yes,
it's known issue of Firebreath (FBVLC based on firebreath). You could enclose <object> to <div> and work via jQuery with that <div>.
Re: MxPEG streaming in VLC pluggin
Posted: 25 Jun 2014 04:34
by RSATom
Would you mind making "avcodec-hw" TRUSTED as well?
Ok, without any problem. Does any other trusted options needed?
Re: MxPEG streaming in VLC pluggin
Posted: 25 Jun 2014 05:22
by RSATom
Actually, perhaps the possibility for the plugin to load a specific config file...?
How exactly you wish to use config file?
What format do you prefer?
What options should it contain?
Re: MxPEG streaming in VLC pluggin
Posted: 30 Jun 2014 12:47
by owagner
Hi,
basically, it would be nice if a default VLC config file could be saved by the user from the VLC standalone player which then could contain all kinds of options relevant to decoding etc. which would be picked up by the Web plugin. It could be the same format as the default config file, and it could be named someting like "vlcrc.web" or so.
I completely understand the rationale for limiting the options which can be given to the web plugin by untrusted content. Since this config file, however, is from the User and thus not from an unstrusted source, it could be treated similarily as the config file of the standalone VLC player, and allow all options.
Obviously, the embedding web page must not have any control over the contents or the pathname of the config file, and whether or not it is loaded.
(Note that this doesn't solve the MxPEG issue since this is very specific to the way how ffmpeg handles MxPEG streams; due to concerns with making avformat-format trusted, I've now suggested a new boolean "avformat-mxpeg" option which has more limited implications and thus can be made trusted with less impact --
https://trac.videolan.org/vlc/ticket/11652#comment:3)
Best Regards,
Olli
Re: MxPEG streaming in VLC pluggin
Posted: 30 Jun 2014 13:21
by RSATom
1) according to note of courmisch, I will set only ":avformat-format=mxg" as trusted in next fbvlc version
2) don't think config file for web pluging will be widely used, so possible it will be better make custom Web Plugin build with needed options set.
Re: MxPEG streaming in VLC pluggin
Posted: 01 Jul 2014 14:39
by owagner
I could actually think of a few cases where a per-system plugin config file could be useful, esspecially for Intranet applications, for example:
-- Codec settings (notably all the ffmpeg parameters)
-- Video renderer settings
-- Audio output parameters
If the config file is not there, all the usual defaults would apply, so no change of behavior.
Best Regards,
Olli
Re: MxPEG streaming in VLC pluggin
Posted: 01 Jul 2014 16:07
by RSATom
I just think nobody will create such file, since they have to make this file manually and save to some not obvious folder.
Re: MxPEG streaming in VLC pluggin
Posted: 09 Jul 2014 03:47
by Jean-Baptiste Kempf
This is TOTALLY the wrong way. Formats should be autodetected, not passed by the users.