MxPEG streaming in VLC pluggin

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

MxPEG streaming in VLC pluggin

Postby rafaware » 11 Nov 2013 10:56

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

owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 24 Jun 2014 11:31

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

owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 24 Jun 2014 11:56

I've added a trac ticket for this: https://trac.videolan.org/vlc/ticket/11652

Olli

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 24 Jun 2014 12:00

I could make it treated as safe in FBVLC...

owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 24 Jun 2014 14:45

That would be great (just looking at FBVLC for the first time)!

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 24 Jun 2014 17:39


owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 24 Jun 2014 18:36

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.

owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 24 Jun 2014 23:12

Would you mind making "avcodec-hw" TRUSTED as well? :)

Actually, perhaps the possibility for the plugin to load a specific config file...?

Thanks,
OIli

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 25 Jun 2014 04:33

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>.
Last edited by RSATom on 25 Jun 2014 07:58, edited 1 time in total.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 25 Jun 2014 04:34

Would you mind making "avcodec-hw" TRUSTED as well? :)
Ok, without any problem. Does any other trusted options needed?

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 25 Jun 2014 05:22

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?

owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 30 Jun 2014 12:47

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 30 Jun 2014 13:21

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.

owagner
New Cone
New Cone
Posts: 7
Joined: 24 Jun 2014 00:10

Re: MxPEG streaming in VLC pluggin

Postby owagner » 01 Jul 2014 14:39

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MxPEG streaming in VLC pluggin

Postby RSATom » 01 Jul 2014 16:07

I just think nobody will create such file, since they have to make this file manually and save to some not obvious folder.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: MxPEG streaming in VLC pluggin

Postby Jean-Baptiste Kempf » 09 Jul 2014 03:47

I've added a trac ticket for this: https://trac.videolan.org/vlc/ticket/11652
This is TOTALLY the wrong way. Formats should be autodetected, not passed by the users.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 27 guests