I have a video that's 1232×800 pixels in size, to be played on a projector with 1280×800 resolution, but constrained to a box of 800×800 in the middle of the screen, maintaining aspect ratio. So the actual video size would be about 800×519, i.e. scaled to about 65%; black bars are to be added on all sides:
+---------screen---------+
| |
| +----video-----+ |
| | | |
8 5 | |
0 1 | |
0 9 | |
| | | |
| +------800-----+ |
| |
+----------1280----------+
I could alter the video file to include the black bars, but would rather avoid the inevitable quality loss (and codec hassles) from transcoding. Moreover, we'd like this to be easily adaptable to other resolutions in the future.
So how to achieve this during playback using cvlc
(i.e. just command line options)?
Things I tried:
cvlc --fullscreen --vout glx --no-autoscale --scale 0.65 video.mp4
This is what the documentation (
--help
) of--autoscale
and--scale
would suggest. But it seems that--scale
is just ignored.cvlc --fullscreen --vout glx --width 800 --height 519 video.mp4
This doesn't seem to do anything. The video is still scaled to fit the screen.
cvlc --fullscreen --vout glx --no-autoscale --zoom 0.6493506493506493 video.mp4
This works on my machine (VLC 2.2.6) but reportedly results in a tiny video on the production system.
I'm using VLC 2.2.2 on Ubuntu 16.04 LTS, so I cannot easily upgrade.
cvlc
specifically: there is no GUI, no clicky things. I would assume that that checkbox corresponds to--no-autoscale
but there's no way to tell (apart from reading the source).--sout-transcode-maxwidth=<integer>
and--sout-transcode-maxheight=<integer>
, Transcoding will transfer the data to the device to the desired format