Discussion:
[MPlayer-users] cropping 4:3 left and right to form 16:9
Anthony Griffiths
2017-09-28 08:34:08 UTC
Permalink
I'm running fedora 26 with mplayer-1.3.0-9.fc26.i686 on an acer
netbook. The netbook has a 16:9 screen set at res 1024 x 600 but the
inbuilt webcam in the lid is a 4:3 cam, I think its native res is
640x480. I can use mplayer to display the cam at full screen but
there's a black stripe down the left and right of the screen. I want
to zoom/inflate the cam image so it crops/cuts away the top and bottom
and fills the full width of the screen without stretching the image
itself and also display at full screen. I've been trawling google and
trying lots of different commands but I can't work out how to do this.
The basic command I started from was this:
$ mplayer tv:// -tv driver=v4l2:device=/dev/video1:fps=20:outfmt=yuy2 -fs
I simply want to inflate the cam image so it loses the left and right
black stripes. Thanks for any help.
Andy Furniss
2017-09-28 09:10:47 UTC
Permalink
Post by Anthony Griffiths
I'm running fedora 26 with mplayer-1.3.0-9.fc26.i686 on an acer
netbook. The netbook has a 16:9 screen set at res 1024 x 600 but the
inbuilt webcam in the lid is a 4:3 cam, I think its native res is
640x480. I can use mplayer to display the cam at full screen but
there's a black stripe down the left and right of the screen. I want
to zoom/inflate the cam image so it crops/cuts away the top and bottom
and fills the full width of the screen without stretching the image
itself and also display at full screen. I've been trawling google and
trying lots of different commands but I can't work out how to do this.
$ mplayer tv:// -tv driver=v4l2:device=/dev/video1:fps=20:outfmt=yuy2 -fs
I simply want to inflate the cam image so it loses the left and right
black stripes. Thanks for any help.
If mplayer is is in full screen mode then pressing e and w will zoom
in/out till black bars hit the edge.
Anthony Griffiths
2017-09-28 14:23:21 UTC
Permalink
Post by Anthony Griffiths
I'm running fedora 26 with mplayer-1.3.0-9.fc26.i686 on an acer
netbook. The netbook has a 16:9 screen set at res 1024 x 600 but the
inbuilt webcam in the lid is a 4:3 cam, I think its native res is
640x480. I can use mplayer to display the cam at full screen but
there's a black stripe down the left and right of the screen. I want
to zoom/inflate the cam image so it crops/cuts away the top and bottom
and fills the full width of the screen without stretching the image
itself and also display at full screen. I've been trawling google and
trying lots of different commands but I can't work out how to do this.
$ mplayer tv:// -tv driver=v4l2:device=/dev/video1:fps=20:outfmt=yuy2 -fs
I simply want to inflate the cam image so it loses the left and right
black stripes. Thanks for any help.
If mplayer is is in full screen mode then pressing e and w will zoom in/out
till black bars hit the edge.
thanks very much andy, that worked. But is there a way of inflating
the image to the correct dimensions using a command?
Stephen Mollett
2017-09-28 18:24:12 UTC
Permalink
Hi,
Post by Anthony Griffiths
The netbook has a 16:9 screen set at res 1024 x 600 but the
inbuilt webcam in the lid is a 4:3 cam, I think its native res
is 640x480. ...
I simply want to inflate the cam image so it loses the left and right
black stripes.
If it is 640x480, have you tried adding '-vf crop=640:375' to the
command line? That should crop the video to the same aspect ratio as the
screen (slightly taller than 16:9).

Hope this helps,
Stephen
Anthony Griffiths
2017-09-29 07:49:27 UTC
Permalink
On Thu, Sep 28, 2017 at 7:24 PM, Stephen Mollett
Post by Stephen Mollett
Hi,
Post by Anthony Griffiths
The netbook has a 16:9 screen set at res 1024 x 600 but the
inbuilt webcam in the lid is a 4:3 cam, I think its native res
is 640x480. ...
I simply want to inflate the cam image so it loses the left and right
black stripes.
If it is 640x480, have you tried adding '-vf crop=640:375' to the
command line? That should crop the video to the same aspect ratio as the
screen (slightly taller than 16:9).
Hope this helps,
Stephen
it certainly did help stephen thankyou, '-vf crop=640:375' worked perfectly.
Loading...