[MPlayer-users] Looking for a software to clip a movie camera to size

Gene Heskett gheskett at wdtv.com
Mon Sep 23 21:33:37 CEST 2013


On Monday 23 September 2013 15:14:21 Reimar Döffinger did opine:

And gene replied:
> >  So in the *nix way of
> > doing things with pipes, what would be the name of a video processing
> > module that could do this crop in real time?
> 
> With MPlayer, read the documentation of he "crop" video filter.
> In addition, the "rotate" filter would probably be interesting.
> Since MPlayer can read via v4l (at least for many cameras, though not
> all) you should be able to test these directly, it should also give you
> an idea what kind of CPU load to expect and if USB really is an issue.
> That still leaves how to get it from MPlayer to some other application?
> I think there used to be some loopback v4l device where you could
> provide to output from one program to another via a virtual v4l device,
> but I think that isn't maintained any more and might not be working
> anymore nowadays... _______________________________________________

This whole thing seems to be piped together using an xml config file which 
currently looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<chain>
    <unit id="input.v4l2:0" width="640" height="480" 
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
        <control id="input">0</control>
        <control id="standard">0</control>
        <control id="brightness">0</control>
        <control id="contrast">32</control>
        <control id="saturation">64</control>
        <control id="hue">0</control>
        <control id="gamma">100</control>
        <control id="control-9963800">2</control>
        <control id="control-9963803">32</control>
        <control id="control-9963804">1</control>
    </unit>
    <unit id="util.flip" width="640" height="480" 
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
        <control id="flip-h">1</control>
        <control id="flip-v">0</control>
    </unit>
    <unit id="output.opengl" width="640" height="480" 
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
    </unit>
    <unit id="emc.crosshair" width="640" height="480" 
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
        <control id="enable">1</control>
        <control id="color-r">0.980285</control>
        <control id="color-g">0.0358434</control>
        <control id="color-b">0.0358434</control>
        <control id="gl-xor">0</control>
        <control id="circle-radius">100</control>
        <control id="circle-angle">18.1</control>
        <control id="shape">1</control>
    </unit>
   <unit id="emc.halio" width="640" height="480" 
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
        <control id="limit">3</control>
        <control id="reload">0</control>
        <control id="circle">video.circle</control>
        <control id="axis-pins">sum2.%d.out</control>
        <control id="axis-letters">XYZABCDEFGH</control>
        <control id="spacing">20</control>
        <control id="color-r">0.980285</control>
        <control id="color-g">0.0358434</control>
        <control id="color-b">0.0358434</control>
        <control id="gl-xor">0</control>
    </unit>
    <unit id="convert.to_rgb8" width="640" height="480" 
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
    </unit>
</chain>

But I have no clue if thats enough to explain how it works.  But it seems 
to me like I should be able to substitute the flip with something like 
mplayer and the appropriate options.  If mplayer can crop, then rotate the 
remaining, much smaller stream of video, that would be a huge plus, so I 
will read the manual this evening.  I have a couple other projects yet this 
afternoon to attend to.

Thanks Reimar, I appreciate your time.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

Humpty Dumpty was pushed.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.


More information about the MPlayer-users mailing list