VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. I have been downscaling for years, typically from 4K to 1080p. This saves a lot of space. However, I do not understand why a lossless encode spits out a blurry video. It's obviously the scaler, because no matter the codec or bitrate it pretty much looks the same, just slightly blurry when I zoom in. I always scale like this
    -vf scale=1920:-1:flags=lanczos+accurate_rnd
    I do get better results if I sharpen
    -vf unsharp=7:7:0.3,scale=1920:-1:flags=lanczos+accurate_rnd
    Now when I am viewing a 4K video in MPC-HC it scales to my screen perfectly. Even if my with resolution set to 900p. So something isn't right. I can throw 300% more bitrate at the video than what is in the original and it still looks a little blurry. There has to be a better scaler out there. How can I use whatever scaler is in VLC or MPC-HC, I think it uses ffdshow or something? I have used every scaling option in FFMPEG and the above is the best result, yet still not good enough. Of course my end result won't be perfect but I sure as heck don't want to lose fidelity to the scaler. I should only lose it to encoder compression. Can anyone please help me with this? I think 99% of people would say a little blurry when zoomed in is "good enough", I am just not one of those people.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I used a command line similar to yours reducing 1080p to 720p, results look good
    Code:
    ffmpeg -i "S:\videos\demos\1080p demo Sharp Italia Parasols-slower-17-5.mp4" -y -ss 00:00:15 -t 45 -c:v libx264 -f mp4 -vf "scale=1280:-1:flags=lanczos+accurate_rnd" -c:a copy connout7e.mp4
    Image Attached Files
    Quote Quote  
  3. Most players are set up to have the graphics card do the scaling by default. In my experience graphics cards usually use Bicubic or Bilinear. Bicubic is the sharper of the two. Lanczos is sharper than both of those.

    I recommend the OP post his 4K sample and his downscaled version(s). So we can see if his expectations are realistic. One expects a 2K video to be less sharp than a 4K video (when viewed at 4K).
    Quote Quote  
  4. Try with zscale:
    Code:
    -vf zscale=w=1920:h=-8:f=5
    Quote Quote  
  5. I think the reason why it appears MPC-HC playing the original video is more clear than the lossless downscale at a monitor resolution of just 900p is because I am viewing the frame zoomed in about 300% and so the media player is not really downscaling the whole frame. One of the reasons I wanted a lossless 1080p version is so I can compare it to my final version and run a VMAF comparison to see how close I am to the original video. After thinking about it a little while, I might be doing this backwards. I should probably be taking a sample of the original video without scaling and then comparing that to a lossless upscale sample of my final version and calculating the VMAF from that. This is the only way to ensure I am comparing to a near exact version of the original.
    Quote Quote  
  6. Originally Posted by pandy View Post
    Try with zscale:
    Code:
    -vf zscale=w=1920:h=-8:f=5
    I got pretty much the same result.
    Quote Quote  
  7. So, reversing my test strategy really revealed a lot. I compared my encoded file with a lossless upscale to the original file and I can see that both files are very similar. Some of my samples that I previous thought were better appear to be not as good. Now I am comparing more apples to apples it is obvious the player is distorting the files depending on resolution so going forward I think I can make better decisions doing it this way.
    Quote Quote  
  8. Originally Posted by tony95 View Post
    Originally Posted by pandy View Post
    Try with zscale:
    Code:
    -vf zscale=w=1920:h=-8:f=5
    I got pretty much the same result.
    You can always presharpen video before downscale.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    On the test clip I used the zscale produced a result that looked sharper than the original, the other scaler was a closer match.
    It doesn't surprise the OP's issue turned out be something unrelated to the scaling in FFmpeg
    Quote Quote  
  10. Originally Posted by davexnet View Post
    On the test clip I used the zscale produced a result that looked sharper than the original, the other scaler was a closer match.
    It doesn't surprise the OP's issue turned out be something unrelated to the scaling in FFmpeg
    I never thought there was anything wrong with the scaler, I was just looking for a better way. But I did realize it wasn't as bad as I thought when I went the other direction. I used the lanczos flag when I tested zscale and got near identical vmaf scores.
    Quote Quote  
  11. zscale should be faster than native ffmpeg swscale (also swscale has other quirks so whenever it is possible i'm trying to use zscale in my scripts)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!