![]() ![]() The simple fix here is to change -1 to -2 to tell ffmpeg to choose a number that’s divisible by 2 (instead of 1) so the end script might look like this: INPUT_VIDEO='some-large-4k-video.mp4'įfmpeg -hide_banner -loglevel panic -i "$INPUT_VIDEO" -vf scale=-2:360 -r 60000/1001 -preset slow -an -crf 23 -y -loglevel quiet -stats "$OUTPUT_FILENAME-360.mp4"Įcho "Generating a ?x720 video from $INPUT_VIDEO"įfmpeg -hide_banner -loglevel panic -i "$INPUT_VIDEO" -vf scale=-2:720 -r 60000/1001 -preset slow -an -crf 23 -y -loglevel quiet -stats "$OUTPUT_FILENAME-720.mp4"Įcho "Generating a ?x1080 video from $INPUT_VIDEO"įfmpeg -hide_banner -loglevel panic -i "$INPUT_VIDEO" -vf scale=-2:1080 -r 60000/1001 -preset slow -an -crf 23 -y -loglevel quiet -stats "$OUTPUT_FILENAME-1080. When you try to downscale a 1080x1920 video to 360 high using -vf scale=-1:360 you end up trying to make a video that is 202.5 pixels wide, and that’s no good! The problem happens when you get interesting video dimensions, such as a vertical video that might be 1080 wide by 1920 high. Go to the 'Height' bar, then input your new video desired height. Click on the 'width' box, key in your preferred video width. ![]() Then select 'project settings.', A new window will open. And I think for some types, it may be necessary to use -2 instead of -1. jpg images in the folder, sets the width 480 while keeping ratio, and add 'Small-' at the start of the resized image name. I give an example below, using this filter, which also simply copies the. for j in (.jpg) do ffmpeg -i 'j' -vf scale480:-1 'Small-nj.jpg' This command will resize all. ![]() If you’re trying to shrink a video by half along the lines of this, you may encounter an error about “width not divisible by 2” during processing, or you just might get an empty mp4 file: INPUT_VIDEO='some-large-4k-video.mp4'Įcho "Generating a ?x360 video from $INPUT_VIDEO"įfmpeg -hide_banner -loglevel panic -i "$INPUT_VIDEO" -vf scale=-1:360 -r 60000/1001 -preset slow -an -crf 23 -y -loglevel quiet -stats "$OUTPUT_FILENAME-360.mp4" To use FFmpeg to resize the video, click on the 'File' menu at the top-right corner of your interface. Newer versions of FFmpeg would be better to use FFmpegs scale video filter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |