Page 1 of 1

Take a snapshot from video using VLC mozilla plugin

Posted: 24 Apr 2009 15:50
by jucas_lo
Hi!

I need to be able to take a snapshot of a video, that is being played in Firefox 2 using the VLC mozilla plugin (latest stable version 0.9..9a), on a Linux machine.

Looking through the forum I found some javascript code that theoretically will lead to the solution of my problem:

Code: Select all

<head> <script type="text/javascript"> function doSnapshot() { var VLC = document.getElementById("vlc"); var X = VLC.getVariable("key-snapshot"); VLC.setVariable("key-pressed", X); } </script> </head> <body> <embed type="application/x-vlc-plugin" name="VLC" pluginspage="http://www.videolan.org" id="VLC" autoplay="yes" loop="no" hidden="no" width="160" height="128" target="some_file.avi" /> <input type="button" value="Take Sanpshot" onclick="doSnapshot()"> </body>
but sadly it doesn't work. (I run firefox from console and watch the messages from the plugin and with every command play, stop, fullscreen i se some output on the console, with the code above I do not)

I checked and if I press shift+s while I'm playing the video (sometimes I have to actually click on the video) a snapshot is saved in ~/.local/vlc/vlcsnap***.png, so this functionality is supported on the plugin, but how can I do it from javascript???????

I would appreciate any suggestions,


thanks

Re: Take a snapshot from video using VLC mozilla plugin

Posted: 26 Apr 2009 12:04
by Anatoly_B
.setVariable(..) and .getVariable(..) work only in very old versions. Now snapshot is inaccessible in javascript.

Re: Take a snapshot from video using VLC mozilla plugin

Posted: 22 Nov 2012 12:22
by zeepee
.setVariable(..) and .getVariable(..) work only in very old versions. Now snapshot is inaccessible in javascript.
is this still true ? I would also need to add a snapshot capability to a web applet I just developed (see my topic about subtitles not working with the VLC plugin).

TIA. :)