Take a snapshot from video using VLC mozilla plugin
Posted: 24 Apr 2009 15:50
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:
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
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>
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