Resize a Video
Use the powerful transcode utility to resize videos completely from the command line.
Normally, I don’t find myself resizing videos. After all, you end up losing video quality if you lower the resolution, and usually I want to watch a video in the highest possible quality. However, there are certain instances where it can be useful to resize a video. One main reason people resize videos is simply to lower the file size. Each pixel in a video takes up space, so resizing a video is one good method for lowering the file size. Also, more and more portable devices are now supporting video playback. Since these devices often have screen resolutions of 640 x 480 or lower, they don’t typically support playback of videos larger than their native resolution.
transcode is a versatile tool when it comes to video conversion, and [Hack #63] provides examples of conversions between video codecs using transcode. This hack takes that process a step further and uses transcode’s video-resiz-ing options. Because this hack uses transcode exclusively, you will definitely need to install it on your system. [Hack #63] explains transcode installation.
There are three primary arguments that
transcode uses to resize video: -B, -X
, and -Z
. The -B
and -X
options are complementary—the
-B
option shrinks video resolution
while -X
increases video resolution. Both options perform a fast resize on the video, but have some rather particular requirements to use. The main requirement is that the resolution ...
Get Linux Multimedia Hacks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.