First I just want to say a bit more about my title, I am not referring to the fact that upscaling doesnt add data(as often asked when upscaling) - but something different.


I have raw video A1 (854x480)

I encode A1 to B1 ignoring scale - therefore keeping same 854x480.

ffmpeg -i C:\A1.mkv -preset veryslow -crf 24 C:\B1.mkv

I play this video in a player, and upscale it by enlarging the window of the player, the video is now 1092x614, I save a screenshot of frame 88.

I now encode A1 to C1 specifying scale 1092x614 (Like the screenshot we have)

ffmpeg -i C:\A1.mkv -preset veryslow -crf 24 -filter_complex scale=1092:614 C:\C1.mkv

I save a screenshot of frame 88 in C1 at its native screensize - 1092x614

Because I am using a Raw Original for both encodes, I assumed that both screenshots would look the same - but they do not, the upscaled encode C1 is alot poorer quality compared to the manual upscaled encode B1.

I thought that when I upscale manually with my player and see the image, ffmpeg does the same whilst its encoding - therefore it would see the same image I see and build the encode based on that, but its as though the rendering engine ffmpeg uses is different/not as good.

Is there a way to get around this issue?

Can we achieve similar by a different technique? Such as editing the metadata of the Original Raw A1 and setting the Width:Height - making any player open the video at that size unknowingly upscaling it on playback.

My use case for this is I am trying to simulate dimensions recognized in most major video hosts - any video below a threshold wont be encoded by the host with certain settings.

  • 3
    scale just does a raw interpolate , it is suggested to add -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp to have better resize filter for scale . see around here ffmpeg-users.933282.n4.nabble.com/… for many interpolation methods, simple bilinear or bicubic can be used by players sometimes. – Psycogeek Jul 12 '14 at 2:49
  • Try the intermediate step of first scaling the the raw content and then doing the encode. I have found that filter can override some parameters. The crf might default to 23 (quality increase) but preset might default to medium (possible decrease). Regardless, this will help isolate the issue. – dstob Jul 16 '14 at 14:30

As you said your original video is raw, means its not compressed, when upscaled manually using your player, its still uncompressed but interpolated. means its still at highest quality. But -crf 24 is high compression, if you want your video look like the upscaled raw one, you can try -crf 19 or lower.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.