VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    I am looking to resize and upscale some of my videos with FFMPEG as the other alternative but what is the FFMPEG alternative to "Nearest Neighbor", "Lanzcos3" and "PointResizing"? I also want to make my videos the "HD" with a 4:3 ratio. I mostly use Virtualdub2 for resizes but some people suggest I use FFMPEG for resizes. What is the equivalent of that stuff on FFMPEG?
    Quote Quote  
  2. https://ffmpeg.org/ffmpeg-scaler.html

    -vf scale=1920x1080:flags=lanczos
    or -vf scale=504:376 -sws_flags bilinear
    default is a sharp bicubic.
    Quote Quote  
  3. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Is that how you set it up? If so, Thanks.
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Of course you also substitute the '1920*1080', which is 16:9 with 1440*1080. But I guess you already knew that.
    Quote Quote  
  5. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Originally Posted by DB83 View Post
    Of course you also substitute the '1920*1080', which is 16:9 with 1440*1080. But I guess you already knew that.
    I mostly used Virtualdub2 for my upscales. I also had to look up the sizes as well.
    Quote Quote  
  6. SWScaler options for ffmpeg:
    Code:
    SWScaler AVOptions:
      -sws_flags         <flags>      E..V...... scaler flags (default bicubic)
         fast_bilinear                E..V...... fast bilinear
         bilinear                     E..V...... bilinear
         bicubic                      E..V...... bicubic
         experimental                 E..V...... experimental
         neighbor                     E..V...... nearest neighbor
         area                         E..V...... averaging area
         bicublin                     E..V...... luma bicubic, chroma bilinear
         gauss                        E..V...... Gaussian
         sinc                         E..V...... sinc
         lanczos                      E..V...... Lanczos
         spline                       E..V...... natural bicubic spline
         print_info                   E..V...... print info
         accurate_rnd                 E..V...... accurate rounding
         full_chroma_int              E..V...... full chroma interpolation
         full_chroma_inp              E..V...... full chroma input
         bitexact                     E..V...... 
         error_diffusion              E..V...... error diffusion dither
    Note that those are simple resizers, not neural network, AI, upscalers. ffmpeg also supports a few nn upscalers like nnedi and srcnn.
    Last edited by jagabo; 27th Jan 2021 at 07:20.
    Quote Quote  
  7. Member
    Join Date
    Nov 2019
    Location
    Europe
    Search PM
    Hmm... this got me thinking now. The nearest neighbour/point algorithm in particular. Mostly, when resizing, I have been using flags=none and understood that would be the same as nearest/point. I've been using that for years, many years, I remember specifically reading somewhere about how to eliminate the default bicubic filter, not really because of how it looks but simply because nearest is much faster . And I have a distinct memory that the flag for that was simply "none".

    Now that I read the docs now... there is no such flag listed, however "neighbor" is. Anyone happen to know whether they're the same thing and "none" is just deprecated or something? It's weird, because there's no errors or anything to indicate otherwise, so I've assumed it works and did what I thought it did... but it actually isn't documented! At least not anymore.
    Quote Quote  
  8. Originally Posted by non-vol View Post
    Hmm... this got me thinking now. The nearest neighbour/point algorithm in particular. Mostly, when resizing, I have been using flags=none and understood that would be the same as nearest/point. I've been using that for years, many years, I remember specifically reading somewhere about how to eliminate the default bicubic filter, not really because of how it looks but simply because nearest is much faster . And I have a distinct memory that the flag for that was simply "none".

    Now that I read the docs now... there is no such flag listed, however "neighbor" is. Anyone happen to know whether they're the same thing and "none" is just deprecated or something? It's weird, because there's no errors or anything to indicate otherwise, so I've assumed it works and did what I thought it did... but it actually isn't documented! At least not anymore.
    You could just try both yourself and find out. I just did a quick comparison and "none" is definitely not the same as "neighbor". I'll leave it to you to figure out which it is...
    Quote Quote  
  9. You can try up-scale.
    This is a hybrid of Avisynth and ffmpeg, i.e. an Avisynth script is created (nnedi3), this can be modified and adapted; afterwards the script is encoded with ffmpeg.
    Quote Quote  
  10. Member
    Join Date
    Nov 2019
    Location
    Europe
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by non-vol View Post
    Hmm... this got me thinking now. The nearest neighbour/point algorithm in particular. Mostly, when resizing, I have been using flags=none and understood that would be the same as nearest/point. I've been using that for years, many years, I remember specifically reading somewhere about how to eliminate the default bicubic filter, not really because of how it looks but simply because nearest is much faster . And I have a distinct memory that the flag for that was simply "none".

    Now that I read the docs now... there is no such flag listed, however "neighbor" is. Anyone happen to know whether they're the same thing and "none" is just deprecated or something? It's weird, because there's no errors or anything to indicate otherwise, so I've assumed it works and did what I thought it did... but it actually isn't documented! At least not anymore.
    You could just try both yourself and find out. I just did a quick comparison and "none" is definitely not the same as "neighbor". I'll leave it to you to figure out which it is...
    I tried it as far as to see that for example "-vf "scale=1440x1080:flags=noune" gives an error message, like you'd definitely expect... it's a syntax error, or not really, some kind of lookup table, but it's an error. It's a complete mystery what the "none" means. It's nowhere to be seen in the docs. I don't have the know-how or other software to do a comparison (easily), I suspect it goes to defaults or something. But it's really weird, why does it accept an argument that's not documented? I can't even find the site or sites where the "none" was, this was something like 4 years ago. And do note that this is "flags=none", not "sws_flags". Live and learn, I guess.

    BTW same thing with x265 and limit-sao. I have no idea if it's enabled or disabled, it's accepted as a parameter but it's not visible anywhere if it's active during an encode. (and as far as that goes... I have SUB-zero knowledge how to figure something like THAT out after the fact...)
    Last edited by non-vol; 27th Jan 2021 at 08:25.
    Quote Quote  
  11. Originally Posted by non-vol View Post
    I tried it as far as to see that for example "-vf "scale=1440x1080:flags=noune" gives an error message
    For me "none" gives the same as the default, "bicubic".

    x264 and x265 save all the settings used for an encode in their metadata. You can see it with MediaInfo.
    Quote Quote  
  12. Member
    Join Date
    Nov 2019
    Location
    Europe
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by non-vol View Post
    I tried it as far as to see that for example "-vf "scale=1440x1080:flags=noune" gives an error message
    For me "none" gives the same as the default, "bicubic".

    x264 and x265 save all the settings used for an encode in their metadata. You can see it with MediaInfo.
    Oh, that's interesting. Thanks for the tip. I still think it's a little odd that those things aren't shown during the encode... since a whole lot of stuff is. I also thought that info might be present in some separate log file... which might be in some very random directory (Windows build...) . Really off-topic already but actually getting the live console log to also be saved onto a file would be nice. I am sure there possibly might be a switch to do that or maybe that just happens... surely it would be in /var/*, /etc/*, ...
    Quote Quote  
  13. Originally Posted by non-vol View Post
    I still think it's a little odd that those things aren't shown during the encode...
    The codecs' internal settings are invisible to ffmpeg. For example, if you just specify "-c:v libx264 -preset slow" ffmpeg doesn't know how that effects all the internal x264 settings. Any other settings you specify -- well, you just put them on the command line so you know what you set. And ffmpeg doesn't know if the codec paid any attention to them.
    Quote Quote  
  14. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Does FFMPEG come with codecs or do you need find them in places like this site?
    Quote Quote  
  15. Originally Posted by Guernsey View Post
    Does FFMPEG come with codecs or do you need find them in places like this site?
    It comes with codecs - commonly distributed ffmpeg binaries are compiled with a bunch of codecs
    Quote Quote  
  16. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Guernsey View Post
    Does FFMPEG come with codecs or do you need find them in places like this site?
    It comes with codecs - commonly distributed ffmpeg binaries are compiled with a bunch of codecs
    Okay I got you.
    Quote Quote  



Similar Threads

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