Netflix conducted a survey in Aug 2016 and found that x265 outperforms<\/a> many of its competitors both in terms of quality and file size.<\/p>\n\n\n\nTo use this, use the following command:<\/p>\n\n\n\n
~$ ffmpeg -i INPUT_VIDEO -codec:v libx265 OUTPUT_VIDEO.EXT<\/code><\/pre>\n\n\n\nHere, v<\/code> in the -codec:v<\/code> stands for video. Similarly, there is another flag called -codec:a<\/code> for audio encoders. Changing the audio codec does not change the file size much<\/strong> so I will be skipping it. <\/p>\n\n\n\nIn my case, I found that the above command reduced the size of one of my files by 90%! For your case, please comment below. It will help other readers.<\/p>\n\n\n\n
To control the video quality, you can use x265’s CRF <\/strong>(Constant Rate Factor). <\/strong>And for this, use the -crf<\/code> flag:<\/p>\n\n\n\n~$ ffmpeg -i INPUT_VIDEO -codec:v libx265 -crf CRF OUTPUT_VIDEO.EXT<\/code><\/pre>\n\n\n\nThe CRF can take any value from 0 to 51. <\/strong>0 means lossless compression and 51 means maximum losses. If you increase the CRF, the file size will reduce at the cost of visual quality and vice versa. If you don’t supply the -crf CRF<\/code>, FFmpeg assumes the default value of 28.<\/strong> <\/p>\n\n\n\nAll of the above commands reduce video file size while keeping the visual quality almost the same. But nowadays videos are available in very high resolution (like 4K) and no matter how much compression you apply you cannot reduce the file size enough to fit these videos in your SSDs and smartphones. In that case, you might consider scaling down the resolution and that is explained below.<\/p>\n\n\n\n
3. How to Change Video Resolution Using FFmpeg?<\/h2>\n\n\n\n Before you start resizing\/rescaling your video, you need to get its resolution.<\/p>\n\n\n\n
3.1. Get Video Resolution Using FFmpeg<\/h3>\n\n\n\n For this purpose, use the ffprobe<\/strong> command included in the FFmpeg package:<\/p>\n\n\n\n~$ ffprobe INPUT_VIDEO<\/code><\/pre>\n\n\n\nSample Output (I have boldened and underlined the resolution and removed unimportant information):<\/strong><\/p>\n\n\n\n...\n...\n...\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '\/home\/ajay\/Videos\/Video.mp4':\n Metadata:\n major_brand : isom\n minor_version : 1\n compatible_brands: isomavc1\n creation_time : 2014-03-30T20:52:44.000000Z\n Duration: 01:42:00.94, start: 0.000000, bitrate: 1102 kb\/s\n Stream #0:0(und): Video: h264 (High) (avc1 \/ 0x31637661), yuv420p(tv, bt709\/bt709\/unknown), 1280x544<\/strong><\/span> [SAR 1:1 DAR 40:17], 1004 kb\/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)\n Metadata:\n creation_time : 2014-03-30T20:52:44.000000Z\n handler_name : video.264#trackID=1:fps=23.976 - Imported with GPAC 0.5.0-rev\n vendor_id : [0][0][0][0]\n Stream #0:1(eng): Audio: aac (LC) (mp4a \/ 0x6134706D), 48000 Hz, stereo, fltp, 93 kb\/s (default)\n Metadata:\n creation_time : 2014-03-30T20:52:48.000000Z\n handler_name : GPAC ISO Audio Handler\n vendor_id : [0][0][0][0]\n<\/code><\/pre>\n\n\n\n3.2. Scale Video to Given Width and Height Using FFmpeg<\/h3>\n\n\n\n To change video resolution to the WIDTH x HEIGHT, you need to use -filter:v scale=WIDTH:HEIGHT<\/code> as shown below.<\/p>\n\n\n\n~$ ffmpeg -i INPUT -filter:v scale=WIDTH:HEIGHT OUTPUT.EXT<\/code><\/pre>\n\n\n\nSo, for example, if you want to scale down your video to 1280p x 720p, use<\/p>\n\n\n\n
~$ ffmpeg -i input.mp4 -filter:v scale=1280:720 output.mp4<\/code><\/pre>\n\n\n\nNote 1:<\/strong> both WIDTH and HEIGHT should be divisible by n where n is 1 or 2 or 3… <\/strong>That is, if you get any error, just try to change WIDTH and HEIGHT a little bit so that both are divisible by 2. And if you again get errors, try to make them divisible by 3 or so.<\/p>\n\n\n\nNote 2: <\/strong>If there is little imperfection in the WIDTH and HEIGHT, you might end up with a video that is too much stretched horizontally or vertically as in the following image. To prevent this behavior, you need to tell the FFmpeg to preserve the ratio of width and height (called Aspect Ratio)<\/strong> as given in the next heading. <\/p>\n\n\n\nFigure: Image with Poor Aspect Ratio<\/figcaption><\/figure>\n\n\n\n3.3. Scale Video to Given Width While Preserving the Aspect Ratio Using FFmpeg<\/h3>\n\n\n\n Here, you need to set only the HEIGHT. The WIDTH will be calculated by FFmpeg based on the input video’s aspect ratio. For this purpose, set the WIDTH to some negative value. <\/strong><\/p>\n\n\n\nSo for example<\/strong>, to change video resolution to 720p, use the following command:<\/p>\n\n\n\n ~$ ffmpeg -i INPUT_VIDEO -filter:v scale=-2:360 OUTPUT_VIDEO.EXT<\/code><\/pre>\n\n\n\nAs you can see, I am using -2 instead of -1 because the FFmpeg’s default encoder (libx264 on 5 Jan 2021 <\/strong>on Arch Linux) accepts only those WIDTH and HEIGHT which are divisible by 2. This divisibility by 2 is also a requirement in the libx265 mentioned above. <\/p>\n\n\n\nSimilarly, you can also assign HEIGHT some negative value while setting the WIDTH your desired value.<\/p>\n\n\n\n
All of the above-mentioned commands in this article only transfer one audio track from the input file to the output file. But what if you want to transfer all tracks?<\/p>\n\n\n\n
4. Compress\/Rescale Without Losing Any Audio or Subtitle Track in an Mkv Video Using FFmpeg<\/h2>\n\n\n\n Before proceeding, you should know a little bit about mkv files. Unlike an mp4 file, an mkv file supports an unlimited number of subtitles and audio tracks. <\/strong>And now you can use some shortcut keys in your video player to switch between these tracks. This is especially helpful for multilingual support.<\/p>\n\n\n\nTo check if your video has multiple audio and subtitle tracks, use the ffprobe<\/strong> command:<\/p>\n\n\n\n~$ ffprobe INPUT<\/code><\/pre>\n\n\n\nSample Output<\/strong> (I have boldened and underlined important information and removed unimportant information):<\/strong><\/p>\n\n\n\n[ajay@lenovo ~]$ ffprobe sample.mkv\n...\n...\n...\nInput #0, matroska,webm, from '\/home\/ajay\/sample.mkv':\n Metadata:\n encoder : libebml v1.3.3 + libmatroska v1.4.4\n creation_time : 2018-05-22T02:41:21.000000Z\n Duration: 00:23:55.11, start: 0.000000, bitrate: 731 kb\/s\n Stream #0:0: Video<\/span><\/strong>: hevc (Main), yuv420p(tv, bt709), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)\n Metadata:\n BPS : 543787\n BPS-eng : 543787\n DURATION : 00:23:55.017000000\n DURATION-eng : 00:23:55.017000000\n NUMBER_OF_FRAMES: 34406\n NUMBER_OF_FRAMES-eng: 34406\n NUMBER_OF_BYTES : 97543101\n NUMBER_OF_BYTES-eng: 97543101\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:1(eng): Audio<\/span><\/strong>: aac (LC), 44100 Hz, stereo, fltp (default)\n Metadata:\n title : English<\/span><\/strong> Stereo\n BPS : 88552\n BPS-eng : 88552\n DURATION : 00:23:50.000000000\n DURATION-eng : 00:23:50.000000000\n NUMBER_OF_FRAMES: 61585\n NUMBER_OF_FRAMES-eng: 61585\n NUMBER_OF_BYTES : 15828794\n NUMBER_OF_BYTES-eng: 15828794\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:2(jpn): Audio<\/span><\/strong>: aac (LC), 44100 Hz, stereo, fltp\n Metadata:\n title : Japanese<\/span><\/strong> Stereo\n BPS : 94767\n BPS-eng : 94767\n DURATION : 00:23:55.109000000\n DURATION-eng : 00:23:55.109000000\n NUMBER_OF_FRAMES: 61805\n NUMBER_OF_FRAMES-eng: 61805\n NUMBER_OF_BYTES : 17000200\n NUMBER_OF_BYTES-eng: 17000200\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:3(eng): Subtitle: ass<\/span><\/strong>\n Metadata:\n title : English<\/span><\/strong>\n BPS : 119\n BPS-eng : 119\n DURATION : 00:23:41.950000000\n DURATION-eng : 00:23:41.950000000\n NUMBER_OF_FRAMES: 335\n NUMBER_OF_FRAMES-eng: 335\n NUMBER_OF_BYTES : 21251\n NUMBER_OF_BYTES-eng: 21251\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:4(ara): Subtitle: subrip<\/span><\/strong>\n Metadata:\n title : Arabic<\/span><\/strong>\n BPS : 116\n BPS-eng : 116\n DURATION : 00:23:13.780000000\n DURATION-eng : 00:23:13.780000000\n NUMBER_OF_FRAMES: 348\n NUMBER_OF_FRAMES-eng: 348\n NUMBER_OF_BYTES : 20250\n NUMBER_OF_BYTES-eng: 20250\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES<\/code><\/pre>\n\n\n\nIn the above output, my video has 1 video, 2 audio, and 2 subtitle tracks.<\/p>\n\n\n\n
For transferring all such tracks, you need to use -map<\/code> flag:<\/p>\n\n\n\nffmpeg -i INPUT -map 0:a'?' -map 0:s'?' -map 0:v'?' OUTPUT.EXT<\/code><\/pre>\n\n\n\nIn the above command, <\/p>\n\n\n\n
‘a’ in -map 0:a:'?'<\/code> stands for audio; similarly ‘v’ for video and ‘s’ for subtitles.<\/li>Quoted question marks ('?'<\/code> ) next to -map 0:s<\/code> makes the subtitle mapping optional i.e. if the subtitle track does not exist in the INPUT, ignore this mapping. This is true for other quoted question marks as well.<\/li><\/ol>\n\n\n\nSample Output<\/strong> (I have removed unimportant information and boldened and underlined important information):<\/strong><\/p>\n\n\n\n[ajay@lenovo ~]$ ffmpeg -i sample.mkv -map 0:a'?' -map 0:s'?' -map 0:v'?' output.mkv \n...\n...\n...\nInput #0, matroska,webm, from 'sample.mkv':<\/span><\/strong>\n Metadata:\n encoder : libebml v1.3.3 + libmatroska v1.4.4\n creation_time : 2018-05-22T02:41:21.000000Z\n Duration: 00:23:55.11, start: 0.000000, bitrate: 731 kb\/s\n Stream #0:0: Video: hevc (Main), yuv420p(tv, bt709), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)\n Metadata:\n BPS : 543787\n BPS-eng : 543787\n DURATION : 00:23:55.017000000\n DURATION-eng : 00:23:55.017000000\n NUMBER_OF_FRAMES: 34406\n NUMBER_OF_FRAMES-eng: 34406\n NUMBER_OF_BYTES : 97543101\n NUMBER_OF_BYTES-eng: 97543101\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:1(eng): Audio<\/span><\/strong>: aac (LC), 44100 Hz, stereo, fltp (default)\n Metadata:\n title : English Stereo\n BPS : 88552\n BPS-eng : 88552\n DURATION : 00:23:50.000000000\n DURATION-eng : 00:23:50.000000000\n NUMBER_OF_FRAMES: 61585\n NUMBER_OF_FRAMES-eng: 61585\n NUMBER_OF_BYTES : 15828794\n NUMBER_OF_BYTES-eng: 15828794\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:2(jpn): Audio<\/strong><\/span>: aac (LC), 44100 Hz, stereo, fltp\n Metadata:\n title : Japanese Stereo\n BPS : 94767\n BPS-eng : 94767\n DURATION : 00:23:55.109000000\n DURATION-eng : 00:23:55.109000000\n NUMBER_OF_FRAMES: 61805\n NUMBER_OF_FRAMES-eng: 61805\n NUMBER_OF_BYTES : 17000200\n NUMBER_OF_BYTES-eng: 17000200\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:3(eng): Subtitle: ass<\/span><\/strong>\n Metadata:\n title : English\n BPS : 119\n BPS-eng : 119\n DURATION : 00:23:41.950000000\n DURATION-eng : 00:23:41.950000000\n NUMBER_OF_FRAMES: 335\n NUMBER_OF_FRAMES-eng: 335\n NUMBER_OF_BYTES : 21251\n NUMBER_OF_BYTES-eng: 21251\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n Stream #0:4(ara): Subtitle: subrip<\/span><\/strong>\n Metadata:\n title : Arabic\n BPS : 116\n BPS-eng : 116\n DURATION : 00:23:13.780000000\n DURATION-eng : 00:23:13.780000000\n NUMBER_OF_FRAMES: 348\n NUMBER_OF_FRAMES-eng: 348\n NUMBER_OF_BYTES : 20250\n NUMBER_OF_BYTES-eng: 20250\n _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit\n _STATISTICS_WRITING_DATE_UTC: 2018-05-22 02:41:21\n _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-22 02:41:21\n _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\n _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\nStream mapping:<\/span><\/strong>\n Stream #0:1 -> #0:0 (aac (native) -> vorbis (libvorbis))\n Stream #0:2 -> #0:1 (aac (native) -> vorbis (libvorbis))\n Stream #0:3 -> #0:2 (ass (ssa) -> ass (ssa))\n Stream #0:4 -> #0:3 (subrip (srt) -> ass (ssa))\n Stream #0:0 -> #0:4 (hevc (native) -> h264 (libx264))<\/span><\/strong>\nPress [q] to stop, [?] for help\n...\n...\n...<\/code><\/pre>\n\n\n\nAll of the above-mentioned commands are to help you compress\/rescale a single video using FFmpeg. But what if you want to apply these commands on multiple files together i.e. batch video compression\/rescaling?<\/p>\n\n\n\n
5. Compress\/Rescale All Videos in a Directory Using FFmpeg<\/h2>\n\n\n\n For this, in Linux, you can use the <\/strong>find<\/code> command with its -exec<\/code> flag or for<\/code> loops. Personally, I find the find<\/code> command more useful than for<\/code> loops because it takes care of special characters such as single quotes and spaces in the input videos’ file names. <\/p>\n\n\n\nFor example<\/strong>, to compress all mp4 videos in a ~\/test-dir<\/code> using the FFmpeg’s default settings:<\/p>\n\n\n\n~$ find ~\/test-dir -name '*.mp4' -exec ffmpeg -i {} {}_compressed.mp4 \\;\n<\/code><\/pre>\n\n\n\nIn the above command:<\/p>\n\n\n\n
The output video files will be created in their respective directories. For example, for an input video file ~\/test-dir\/dir2\/file.mp4<\/code>, output file ~\/test-dir\/dir2\/file.mp4_compressed.mp4<\/code> will be created.<\/li>For each found mp4 file, the find command replaces all the brackets ({}<\/code>) with its filename and then executes the formed FFmpeg command. <\/li>Only mp4 files will be touched. The rest of the files in the ~\/test-dir<\/code> will be ignored.<\/li><\/ol>\n\n\n\nFun Fact<\/strong> \ud83d\ude42: The given find command with the -exec<\/code> flag is quite versatile. You can use this to execute any command on a group of files. <\/p>\n\n\n\nMany of the above-mentioned commands not only work for videos but also for images. <\/p>\n\n\n\n
6. Compress\/Rescale Images using FFmpeg<\/h2>\n\n\n\n Images are nothing but videos with just one frame.<\/strong> This is the reason why most of the video commands are applicable here as well. <\/p>\n\n\n\nFor example<\/strong>, to compress an image to a lower resolution, say 360p<\/strong>, use the following command:<\/p>\n\n\n\n~$ ffmpeg -i INPUT.jpg -filter:v scale=-2:360 OUTPUT.jpg <\/code><\/pre>\n\n\n\nThe above command will reduce the file size, but the visual quality will also be reduced. To prevent such reduction, use the FFmpeg’s default settings i.e. no need to supply any flags:<\/p>\n\n\n\n
~$ ffmpeg -i INPUT.jpg OUTPUT.jpg<\/code><\/pre>\n\n\n\nYou should try to play with all other video compression methods mentioned above and see which one works for you. <\/p>\n\n\n\n
7. Way Ahead<\/h2>\n\n\n\n As a going-away present, you should know that although I have mentioned compression and rescaling in separate headings, you can also use them together by using their flags side by side and thus get more file size reduction.<\/strong> The same goes for the mapping flag ( -map<\/code>) and other flags also.<\/p>\n\n\n\nThat’s all. That was the short magic of FFmpeg. FFmpeg is a very versatile tool and you can use it as a screen recorder tool, screenshot tool, and media information tool as well. <\/p>\n\n\n\n
Thank you for staying so long. If there is any mistake\/question\/ recommendation\/appreciation, please comment below. It helps the community.<\/p>\n","protected":false},"excerpt":{"rendered":"
Compress video or image using FFmpeg with\/without losing quality – use default or x265 encoder, get\/change resolution, keep the aspect ratio.<\/p>\n","protected":false},"author":2,"featured_media":1648,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[18,42],"class_list":["post-2075","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line-tools","tag-command-line-tools","tag-ffmpeg"],"yoast_head":"\n
FFmpeg: Compress and Rescale Video and Image | SmartTech101<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n\t \n\t \n\t \n