[MPlayer-dev-eng] Re: Screenshot Plugin

ObsessiveMathsFreak obsessivemathsfreak at eircom.net
Thu Sep 1 01:42:36 CEST 2005


>>//reconfigure codecs
>>> mpcodecs_config_vo (sh_video, sh_video->disp_w,sh_video->disp_h, 0);
>>> 
>>> 
>>> But there are problems.(Apart from the calamitous uglyness of this hack!)
>>> 
>>> If you insert the new filter as the first in the filter chain, then 
>>> something will go awry and ugly black squares will pop up(on xvid files 
>>> at least).(not sure what the technical term for this is, "codec 
>>> hiccup"?). If however, you insert the filter anywhere else, such as 
>>> before vo using vf_add_before_vo, then no problems seem to occur and yo 
>>> can start snapping screenshots with seemingly no ill effects.
> 
> 
> I couldn't reproduce this, I tried the filters 'crop' and 'harddup'... can 
> you send a screenshot?
> 

I've sent an example. This is exactly what was shown by the output as well.
The picture has been resaved as PNG, from the original shot which was 1.2MB.

You can see the black squares all over the picture. They stay for a few 
second, but you can remove them immediately by skipping forward or backward.

I'm not sure if you'll get the file if I send it straight to the mailing 
list, so I've cc'ed you a copy. Sorry if you get a double copy. Also I 
apologise if the shot was too big for posting on the mailing list 
(315KB). As you can tell, I'm new to mailing lists, and as ignorent as 
they come. (REALLY sorry if that file was too big. FULL permission is 
granted to flame me, my family, my unborn decendants. The full whack.)


> Sounds odd, first I thought it was due to the re config... but now you says 
> it goes away? sounds like a single hard dropping of a frame, which seems 
> REALLY odd because it's completely unrelated...
> 

I should mention I've been working off Mplayer pre7, if that's any use.


> BTW, why didn't you just shorten this code to
> 
> vf_add_before_vo(&sh_video->vfilter, "screenshot", NULL);
> 

What can I say. I'm a sucker for compiler warnings! :E
Also I was using the setup code to do other things.

> I'm gonna try to get this vf into cvs...

Hot Danm! My whining is paying off!!


If the filter goes into cvs, the default compression setting might want 
to be changed. Currently it's set to 0 (no compression!) I usually find 
4 or even 3 gives a good size for compression speed. Anything above 5 is 
simply a waste. Hardly any extra space saved for a lot more time.

Also for consideration might be mapping the screenshot function to the 
'@' key. I find it works well, but then again I am on a UK style 
keyboard. The key might not be so suitable on US style keyboards. Then 
again I'm no UI man.





>>Maybe that is because it is missing a get_image function? This will
>>> probably also have the effect of being very slow with e.g. -vo gl -dr
>>> (since it does not set readable correctly).
> 
> 
> Adding or removing filters while the video is playing is definitely
> not valid with mplayer's architecture. Don't even try to do it..
> 
> Rich
Must resist.... temptation!!
No seriously, it's fine. I was going to use alias or the config file, 
but that would mess with my encoding. Instead I came up with this, 
"wrapper" shell script.

#! /bin/bash
#############
#gmplayer_screenshot
#runs gmplayer with the screenshot filter activated.

gmplayer $@ -vf screenshot
############

It works quite well in Gnome at least. I can associate video files with 
it and simply double click to run them. Also, when I run it this way, 
the screenshots are placed in my home folder instead of the folder where 
the movie file resides. Bliss!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shot0001-edit.png
Type: image/png
Size: 322530 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050901/62e829ba/attachment.png>


More information about the MPlayer-dev-eng mailing list