XULRUNNER & VLC Plugin

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
thebaz73
New Cone
New Cone
Posts: 5
Joined: 19 Jan 2007 23:20

XULRUNNER & VLC Plugin

Postby thebaz73 » 19 Jan 2007 23:43

Hi all,
I'm trying to create a XUL application which is mainly a Video viewer which uses VLC plugin.
I think followed all instruction from Mozilla Gecko documentation and VLC site I put "npvlc.dll" and "vlcintf.xpt" into Xulrunner plugin folder but plugin did not started then I put also "libvlc.dll" into plugin folder and application seemed to start but no video was displayed.
Looking at error log it seems it can not find access_demux module for http! Here follows Error log and XUL snippet

I'm using gecko 1.8 and vlc 0.8.6a

Any ideas?
Marco.

XUL snippet:

Code: Select all

<?xml version="1.0"?> <window> ... <vbox flex="1"> <spacer flex="1"/> <hbox> <spacer flex="1"/> <html:embed type="application/x-vlc-plugin" name="vclplayer" autoplay="yes" loop="yes" width="400" height="300" target="http://localhost:8080" /> <spacer flex="1"/> </hbox> <hbox> <spacer flex="1"/> <button label="start" oncommand="onStart();" /> <button label="stop" oncommand="onStop();" /> <spacer flex="1"/> </hbox> <spacer flex="1"/> </vbox> </window>
Error Log:

Code: Select all

argn=width, argv=400 argn=height, argv=300 argn=type, argv=application/x-vlc-plugin argn=name, argv=vclplayer argn=autoplay, argv=yes argn=loop, argv=yes argn=target, argv=http://localhost:8080 [00000001] main private debug: opening config file C:\Documents and Settings\theBaz\Dati applicazioni\vlc\vlcrc [00000001] main private debug: checking builtin modules [00000001] main private debug: checking plugin modules [00000001] main private debug: loading plugins cache file C:\Documents and Settings\theBaz\Dati applicazioni/vlc/cache/plugins-04041e.dat [00000001] main private debug: recursively browsing `C:\sviluppo\eclipse\xul\xulvlc\modules' [00000001] main private debug: recursively browsing `C:\sviluppo\eclipse\xul\xulvlc\plugins' [00000001] main private debug: module bank initialized, found 11 modules [00000001] main private debug: opening config file C:\Documents and Settings\theBaz\Dati applicazioni\vlc\vlcrc [00000001] main private debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU [00000001] main private debug: looking for memcpy module: 2 candidates [00000001] main private debug: using memcpy module "memcpymmxext" [00000016] main playlist debug: waiting for thread completion [00000016] main playlist debug: thread 9420 (playlist) created at priority 0 (playlist/playlist.c:184) [00000017] main private debug: waiting for thread completion [00000017] main private debug: thread 9404 (preparser) created at priority 0 (playlist/playlist.c:210) [00000018] main interface debug: looking for interface module: 0 candidates [00000018] main interface error: no interface module matched "hotkeys,none" [00000018] main interface error: no suitable interface module [00000001] main private error: interface "hotkeys,none" initialization failed [00000016] main playlist debug: adding playlist item `C:\Programmi\VideoLAN\VLC\plugins' ( C:\Programmi\VideoLAN\VLC\plugins ) [00000016] main playlist debug: adding playlist item `application.ini' ( application.ini ) [00000016] main playlist debug: adding playlist item `http://localhost:8080' ( http://localhost:8080 ) application initialized. [00000016] main playlist debug: creating new input thread [00000019] main input debug: waiting for thread completion [00000019] main input debug: thread 9344 (input) created at priority 1 (input/input.c:265) [00000019] main input debug: `application.ini' gives access `' demux `' path `application.ini' [00000019] main input debug: creating demux: access='' demux='' path='application.ini' [00000020] main demuxer debug: looking for access_demux module: 0 candidates [00000020] main demuxer warning: no access_demux module matched "any" [00000019] main input debug: creating access '' path='application.ini' [00000021] main access debug: looking for access2 module: 0 candidates [00000021] main access error: no access2 module matched "any" [00000019] main input error: no suitable access module for `application.ini' [00000019] main input debug: thread times: real 0m0,093750s, kernel 0m0,000000s, user 0m0,000000s [00000019] main input debug: thread 9344 joined (input/input.c:412) [00000016] main playlist debug: creating new input thread [00000023] main input debug: waiting for thread completion [00000023] main input debug: thread 9344 (input) created at priority 1 (input/input.c:265) [00000023] main input debug: drive letter C: found in source [00000023] main input debug: `C:\Programmi\VideoLAN\VLC\plugins' gives access `' demux `' path `C:\Programmi\VideoLAN\VLC\plugins' [00000023] main input debug: creating demux: access='' demux='' path='C:\Programmi\VideoLAN\VLC\plugins' [00000024] main demuxer debug: looking for access_demux module: 0 candidates [00000024] main demuxer warning: no access_demux module matched "any" [00000023] main input debug: creating access '' path='C:\Programmi\VideoLAN\VLC\plugins' [00000025] main access debug: looking for access2 module: 0 candidates [00000025] main access error: no access2 module matched "any" [00000023] main input error: no suitable access module for `C:\Programmi\VideoLAN\VLC\plugins' [00000023] main input debug: thread times: real 0m0,093750s, kernel 0m0,000000s, user 0m0,000000s [00000023] main input debug: thread 9344 joined (input/input.c:412) [00000016] main playlist debug: creating new input thread [00000026] main input debug: waiting for thread completion [00000026] main input debug: thread 9324 (input) created at priority 1 (input/input.c:265) [00000026] main input debug: `http://localhost:8080' gives access `http' demux `' path `localhost:8080' [00000026] main input debug: creating demux: access='http' demux='' path='localhost:8080' [00000027] main demuxer debug: looking for access_demux module: 0 candidates [00000027] main demuxer warning: no access_demux module matched "http" [00000026] main input debug: creating access 'http' path='localhost:8080' [00000028] main access debug: looking for access2 module: 0 candidates [00000028] main access error: no access2 module matched "http" [00000026] main input error: no suitable access module for `http://localhost:8080'

thebaz73
New Cone
New Cone
Posts: 5
Joined: 19 Jan 2007 23:20

XULRUNNER & VLC Plugin (UPDATE)

Postby thebaz73 » 20 Jan 2007 22:22

There is an update, I changed VLC version 0.8.5 and something changed too.

Now according to log console everything starts right. But no video is displayed. Previous error maybe was caused by the fact that in 0.8.6a version plugin api changed.

Is this true? Any ideas about the fact that no video is displayed? On the other hand in Mozilla Firefox everything works fine and I can see the video.

Code: Select all

[00000001] main vlc debug: opening config file C:\Documents and Settings\theBaz\Dati applicazioni\vlc\vlcrc [00000001] main vlc debug: checking builtin modules [00000001] main vlc debug: checking plugin modules [00000001] main vlc debug: loading plugins cache file C:\Documents and Settings\theBaz\Dati applicazioni/vlc/cache/plugins-04041e.dat [00000001] main vlc debug: recursively browsing `C:\Programmi\VideoLAN\VLC\modules' [00000001] main vlc debug: recursively browsing `C:\Programmi\VideoLAN\VLC\plugins' [00000001] main vlc debug: module bank initialized, found 217 modules [00000001] main vlc debug: opening config file C:\Documents and Settings\theBaz\Dati applicazioni\vlc\vlcrc [00000001] main vlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU [00000001] main vlc debug: looking for memcpy module: 3 candidates [00000001] main vlc debug: using memcpy module "memcpymmxext" [00000284] main playlist debug: waiting for thread completion [00000284] main playlist debug: thread 2076 (playlist) created at priority 0 (playlist/playlist.c:184) [00000285] main private debug: waiting for thread completion [00000285] main private debug: thread 2060 (preparser) created at priority 0 (playlist/playlist.c:210) [00000286] main interface debug: looking for interface module: 1 candidate [00000286] main interface debug: using interface module "hotkeys" [00000286] main interface debug: thread 2032 (interface) created at priority 0 (interface/interface.c:231) [00000284] main playlist debug: adding playlist item `http://2.241.50.25:8080' ( http://2.241.50.25:8080 )

Spellcoder
Blank Cone
Blank Cone
Posts: 57
Joined: 19 Apr 2006 12:21
Location: Hengelo // The Netherlands
Contact:

Postby Spellcoder » 22 Jan 2007 07:13

If the system you want to run the webapplication on doesn't have VLC installed, you'll also need to copy over the content of VLC's plugins map. There's a lot of stuff in that map you won't need (like interface stuff for VLC player) but if you want to cut down on size you'll have to find out yourself which files are needed.

By the way, as far as I know vlcintf.xpt isn't needed anymore since VLC plugin 0.8.6.

Beware of these bugs for your webapplication though:

(bug #900)
VLC plugins versions after 0.8.6-test1 don't work with portable/mobile Firefox. So they can't be used from memory stick/dvd.

(bug #908)
all 0.8.6 tests and final will often crash:
- if reloading a page while the VLC plugin is playing video
- if you try to display: none; after having played (or are still playing) a video
(try visibility: hidden; if possible instead)
- if you try to close a browser tab while video is playing

(bug #1008)
the VLC object won't reappear after having used 'display: none;' twice

don't place multiple VLC within the same page (dont know the bug #)
this one I didn't find myself, because I don't have a need for two VLC players in my webapplication. But from what I read the two VLC objects will influence each other (and cause crashes)? One of the developers mentioned creating multiple VLC objects within Javascript works more reliable. However forget this if you only need one :P.

(not reported yet)
using fixed positioned content and at the same time causing reflows (with updating the playtime or progress bar) can cuse VLC's playback to stutter. so better not use fixed positioned stuff.

(not reported yet)
with the Mac plugin + Firefox (not opera or safari), and some absolute or fixed positioned content(? have yet to figure out the exact cause), the 'no video' message and it's black background are drawn on the wrong location in the page. Playback happens at the correct position though.

(only tried on my own computer)
on Windows moving a window over a playing video will draw grey boxes/lines in the video??

The 0.9.0 nightlies have some more problems, so I wouldn't touch those yet.

thebaz73
New Cone
New Cone
Posts: 5
Joined: 19 Jan 2007 23:20

Postby thebaz73 » 22 Jan 2007 12:26

Finally using version 0.8.5 no more problem were displayed. And I can see the streamed video. Any way much of the problems seemed o be caused by XULRUNNER implementation: in some mail from mozilla.dev community I found also some workaround which claimed to use embedded html files as developers from songbird project did.

In future I will try to use 0.8.6a plugin and apis.

Anyway thank you for your anwers and for all your tips about bugs.
Marco.

XeNaToS
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Oct 2006 10:35

Postby XeNaToS » 26 Jan 2007 10:42

Can you tell me how you did it works with 0.8.5 ?
XulRunner doesn't find the plug in when it's 0.8.5 and with the 0.8.6a it doesn't play anything.
In add, if I put -console to have the debug the plug in is not recognize.

thebaz73
New Cone
New Cone
Posts: 5
Joined: 19 Jan 2007 23:20

Postby thebaz73 » 27 Jan 2007 19:25

there is a post on my blog about the solution. http://www.marcobazzoni.it/2007/01/27/xul-vlc/

sdaams
New Cone
New Cone
Posts: 6
Joined: 30 Jan 2007 09:45

Postby sdaams » 30 Jan 2007 09:55

Hi to you all,

Iam trying to get VLC plugin working in xulrunner but i still have problems, no video is showing even with the solution from thebaz73.

xulrunner 1.8 and vlc 0.8.5 xulrunner 1.9 and vlc 0.8.6 i even try to use the vlc code from songbird. If i try the xul file in firefox it works and i see that the plugin is loaded in xulrunner. i get a dos window with the output of vlc


Iam trying to make a standalone xulrunner applicatie (Windows) that works like a TV with channels to connect to live streams. Can someone help me with this or has a working example for me.

Thanks

thebaz73
New Cone
New Cone
Posts: 5
Joined: 19 Jan 2007 23:20

Postby thebaz73 » 30 Jan 2007 21:54

Hi sdaams, hi all,
I've posted a zip of my working solution in my blog
http://www.marcobazzoni.it/2007/01/27/xul-vlc/

sdaams
New Cone
New Cone
Posts: 6
Joined: 30 Jan 2007 09:45

Postby sdaams » 31 Jan 2007 15:17

Thanks thebaz73 for your zip file. But still i can't get a video display. I try to display a videofile direct in the chrome directory. With the -console parameter i can see that VLC is used but display only Black with '[no video]'

Code: Select all

<html:embed type="application/x-vlc-plugin" id="vlcviewer" name="vlcviewer" autoplay="yes" loop="yes" flex="1" width="400" height="300" target="test.avi"/>
If i load xulvlc.xul i firefox it will play, so i think the problem is with xulrunner and the vlc plugins. Do you need to install VLC complete before you can use the plugins ? Or is it possible use only the plugins voor mozilla. What kind of version of Xulrunner and VLC plugin you used ?

I try Xulrunner 1.8 with VLC plugin 0.8.5 and Xulrunner 1.9 with VLC plugin 0.8.6. Perhaps you can zip your xulrunner with the vlc plugins and put it all so on the net. I lookd at songbird and try the VLC plugins that songbird is using but still i can't get it to work ;-(

Jeff

UPDATE:
Output of the console

Code: Select all

[00000001] main vlc debug: opening config file C:\xul\xulvlc\vlcrc [00000001] main vlc debug: checking builtin modules [00000001] main vlc debug: checking plugin modules [00000001] main vlc debug: loading plugins cache file C:\Documents and Settings\ schij01\Application Data/PCF-VLC/cache/pcfplugins-04041e.dat [00000001] main vlc debug: recursively browsing `C:\xul\xulvlc\modules' [00000001] main vlc debug: recursively browsing `C:\xul\xulvlc\plugins' [00000001] main vlc debug: recursively browsing `C:\xul\xulvlc\vlc-plugins' [00000001] main vlc debug: module bank initialized, found 210 modules [00000001] main vlc debug: opening config file C:\xul\xulvlc\vlcrc [00000001] main vlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU [00000001] main vlc debug: looking for memcpy module: 3 candidates [00000001] main vlc debug: using memcpy module "memcpymmxext" [00000276] main playlist debug: waiting for thread completion [00000276] main playlist debug: thread 3936 (playlist) created at priority 0 (pl aylist/playlist.c:184) [00000277] main private debug: waiting for thread completion [00000277] main private debug: thread 3952 (preparser) created at priority 0 (pl aylist/playlist.c:210) [00000278] main interface debug: looking for interface module: 1 candidate [00000278] main interface debug: using interface module "hotkeys" [00000278] main interface debug: thread 3976 (interface) created at priority 0 ( interface/interface.c:231) [00000276] main playlist debug: adding playlist item `test-avi.avi' ( test-avi.a vi ) application initialized. [00000276] main playlist debug: creating statistics handler [00000276] main playlist debug: creating new input thread [00000281] main input debug: waiting for thread completion [00000281] main input debug: thread 4020 (input) created at priority 1 (input/in put.c:261) [00000281] main input debug: `test-avi.avi' gives access `' demux `' path `test- avi.avi' [00000281] main input debug: creating demux: access='' demux='' path='test-avi.a vi' [00000282] main demuxer debug: looking for access_demux module: 0 candidates [00000282] main demuxer warning: no access_demux module matched "any" [00000281] main input debug: creating access '' path='test-avi.avi' [00000283] main access debug: looking for access2 module: 4 candidates [00000283] vcd access debug: trying .cue file: test-avi.cue [00000283] access_file access warning: test-avi.avi: No such file or directory [00000283] cdda access debug: trying .cue file: test-avi.cue [00000283] cdda access warning: could not open test-avi.avi [00000281] main input error: no suitable access module for `test-avi.avi' [00000281] main input debug: thread times: real 0m0,125000s, kernel 0m0,000000s, user 0m0,015625s [00000281] main input debug: thread 4020 joined (input/input.c:399) [00000276] main playlist: nothing to play
Last edited by sdaams on 31 Jan 2007 15:42, edited 1 time in total.

XeNaToS
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Oct 2006 10:35

Postby XeNaToS » 31 Jan 2007 15:30

Thanks thebaz73 but it doesn't play any video, I still have a black display with no video written.
How did you display the log? With -console the plugin isn't recognized for me :(

sdaams
New Cone
New Cone
Posts: 6
Joined: 30 Jan 2007 09:45

Postby sdaams » 31 Jan 2007 16:07

It Works !

I created a directory vlc-plugins in the xulvlc directory and put all the vlc plugin files into this directory. In the xulrunner plugins directory you put
npvlc.dll and vlcintf.xpt.

If you what to display a video file instead of a stream us src='' and not target=''

I used xulrunner 1.8 and VLC 0.8.5 and its running ;-)

Hope this will help


Jeff

sdaams
New Cone
New Cone
Posts: 6
Joined: 30 Jan 2007 09:45

Postby sdaams » 31 Jan 2007 16:08

If have made a zip file with xulrunner and xulvlc and put it on the net.
let me know if it works !

Unpack this zip into your c:\ and start run.bat insite the xulvlc directory.


Here is the link
http://wiki.xulrunner.nl/xulvlc_xulrunner.zip
Last edited by sdaams on 31 Jan 2007 16:35, edited 1 time in total.

XeNaToS
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Oct 2006 10:35

Postby XeNaToS » 31 Jan 2007 16:27

Thanks, I will try this but I would prefer it works with the 0.8.6a version :D

sdaams
New Cone
New Cone
Posts: 6
Joined: 30 Jan 2007 09:45

Postby sdaams » 31 Jan 2007 16:35

Hi XeNaToS,

I try it with 0.8.6 but i will not work. But if you get it to work let me know. Or you can try with the guys from songbird. Look at there software trunk.

XeNaToS
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Oct 2006 10:35

Postby XeNaToS » 31 Jan 2007 16:42

I have tested with their own plugin vlc but it doesn't work too.
If I found a solution I will post it here.

sdaams
New Cone
New Cone
Posts: 6
Joined: 30 Jan 2007 09:45

Postby sdaams » 31 Jan 2007 16:53

Does the zip file i made work on you system ?

XeNaToS
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Oct 2006 10:35

Postby XeNaToS » 31 Jan 2007 18:01

I will test tomorrow morning :wink:

Edit : It works :)

XeNaToS
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Oct 2006 10:35

Postby XeNaToS » 12 Feb 2007 09:19

This problem is only on windows. Under linux I have no problem with XULRunner and mozilla plugin 0.8.6a.

Allclone
New Cone
New Cone
Posts: 9
Joined: 13 Nov 2005 22:59
Location: Kazoo
Contact:

XUL & VLC 0.8.6a Plugin

Postby Allclone » 12 Feb 2007 20:31

In win32 I have managed to make XULRunner 1.9a3pre and the newer 0.8.6a version of VLC run but it causes weird problems with the profile system.

To start I put npvlc.dll (came with vlc 0.8.6a) in xulrunner\plugins. Looking threw the debugging it looked like it wanted the vlc\plugins folder to be located at the root of the working directory just ouside the xulrunner with the application.ini after that it found all the new plugins and created a cache directory of vlc under Applicaiton Data\<user>\vlc. and the application starts and loads the test content. The problem happens after I close the test app.

xulrunner creates a default profile for the working application under Application Data\<user>\<application name>. If I try and relaunch the app it loads but does not load either the plugins properly or something ells thats as much as I can figure out. If I delete the profile so it has to rebuild it next time its run it will play the video again.

Don't know if this is going to help narrow the problem down but it seams weird that the profile directory is what causes it to load incorrectly the next time the app is run.

Edit:
I have also installed VLC 0.8.6a with both Mozilla and ActiveX plugins for win32.

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 12 Feb 2007 20:59

in 0.8.6, the mozilla plugin is now locatable through registry settings as documented in http://developer.mozilla.org/en/docs/Pl ... d_Solution.

I'm surprised that xulrunner is not able to load the plugin; firefox seems ok with that. Maybe you need to use a syntax similar to the one documented in http://developer.mozilla.org/en/docs/Pl ... al_Benefit


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 15 guests