1

I have a video file that is a 4K upscale of a 1080p video in VP9 (upscaled to 4K to force Youtube to use higher bitrate for the video).

I want to downscale the 4K video file to 1080p while (effectively) losing no data, ie not forcing re-compression of the finished product.

I'm not familiar with VP9 so I'm not sure if this even makes sense in the context of how the codec works, but any advice is helpful.

A note, if it would result in a file size reduction even if slight then that would be ideal.

1 Answer 1

0

Downscaling requires using the scale filter, and filtering requires encoding.

Options:

  • accept some quality loss (but you may not notice)
  • use a lossless encoder (giant files, probably not what you actually want)
  • use your player to downscale as it plays

Accept some quality loss

Just provide it enough bits and you may not notice. Assuming you want VP9 output, an example using a somewhat arbitrary -crf value:

ffmpeg -i input.webm -vf "scale=-2:1080" -c:v libvpx-vp9 -crf 20 -b:v 0 -c:a copy output.webm

Adjust -crf as needed. Lower is better quality.

See FFmpeg Wiki: VP9.

Using a lossless encoder

Assuming you want VP9 output:

ffmpeg -i input.mp4 -vf "scale=-2:1080" -c:v libvpx-vp9 -lossless 1 -c:a copy output.webm

This will make a huge sized file.

See FFmpeg Wiki: VP9.

Use a player

This will use a player named ffplay to downscale while playing. No output file is created.

ffplay -vf scale=-2:1080 input.webm
1
  • Thanks for your answer, its unfortunate that this isn't possible but I expected it. I will likely just retain full size or possibly re-encode since data loss is not exactly significant with enough bitrate.
    – yuuuu
    Commented Jun 15, 2021 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .