VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. I am trying to downscale a .ts 1080i50 video to 720p using ffmpeg.

    I tried using yadif and w3fdif deinterlacers but they don't produce a good quality.

    Playing with fields doesn't work either, during motion it doesn't look right.

    Does anybody have a recommendation which produces good quality ?
    Quote Quote  
  2. Originally Posted by illus View Post
    I am trying to downscale a .ts 1080i50 video to 720p using ffmpeg.

    I tried using yadif and w3fdif deinterlacers but they don't produce a good quality.

    Playing with fields doesn't work either, during motion it doesn't look right.

    Does anybody have a recommendation which produces good quality ?
    IMHO yadif provide quite OK results and there is nothing better available in ffmpeg.
    Perhaps there is issue with your script? - are you able to provide script then i can check if there is any issue.
    If you pursuing HQ deinterlacer then QTGMC seem to be only option for you however be prepared for very slow processing - QTGMC is highly demanding and can eat any existing CPU.
    Quote Quote  
  3. Source is upper field

    Code:
    ./ffmpeg -i recording.ts -c:v libx264 -profile high -vf "yadif=3:0,scale=1280:720" -b:v 4M -c:a copy -f mpegts out.ts
    Lines in the video look aliased with above.

    If I take out the scaling and leave the yadif alone you can see the horizontal lines flickering when there is no movement.
    Quote Quote  
  4. Is it animated material? Yadif doesn't work well with animation.
    Quote Quote  
  5. it's sports content
    Quote Quote  
  6. If quality is your highest priority, then you might want to try QTGMC. Be advised however, that it is very resource hungry and on HD content even more so. Also, it will require Avisynth and an ffmpeg build that supports Avisynth script input plus something like vdub or avspmod to debug your scripts. I don't use Avisynth for much (try to avoid it as mush as possible), but for de-interlacing, QTGMC is my go to tool. There is even a setting in QTGMC that is equivalent to yadif. For HD content I would definitely try to get the multi-thread version of QTGMC up and running. Once you have de-interlaced, you can insert any resizing filter you want in your Avisynth script like Spline36, Lanczos, Blackman, etc. for the 1080p to 720p downrez. Also, why are you downscaling to 720p? If this is for a bluray, you can send the script straight to x264 to make a bluray compliant .264 stream which I would recommend over ffmpeg.
    Quote Quote  
  7. The input is UDP. Is there a pipeline which can take udp and pass it to QTGMC/avisynth? it seemed to me that it only works with vod?

    The reason is to reduce the bitrate significantly, and 1080i doesn't look good with e.g 3mbs, so i have to downscale....
    Quote Quote  
  8. Originally Posted by illus View Post
    it's sports content
    Thin white lines on the playfield will suffer the same aliasing problems as thin black lines in animation. QTGMC is your only hope.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    QTGMC is your only hope.
    It will need a file isn't it ? It won't be able to process on the fly a udp input?
    Quote Quote  
  10. Yes it needs a file.

    There is a tcpdeliver/tcpsource plugin that works over tcp not udp, but I've never tested it

    http://avisynth.org.ru/docs/english/corefilters/tcpdeliver.htm

    Originally Posted by illus View Post

    Code:
    ./ffmpeg -i recording.ts -c:v libx264 -profile high -vf "yadif=3:0,scale=1280:720" -b:v 4M -c:a copy -f mpegts out.ts
    Also , why skip the spatial check for yadif ? Quality is higher with mode 1 instead of 3 ( i.e Try -vf "yadif=1:0,scale=1280:720" ) . No question QTGMC is much better, but it might be "good enough" for your purposes . When downscaling many of the artifacts are reduced
    Last edited by poisondeathray; 2nd Nov 2016 at 18:00.
    Quote Quote  
  11. Have you looked at ffmpeg's nnedi deinterlacer? It sounds promising.

    QTMGC is great, but it requires you to:
    - Grab the video from your (Internet? LAN?) source and save to file without deinterlacing, preferably to a lossless format like utvideo.
    - Create an AviSynth script to process the file (this will difficult the first time, but worth the effort)
    - Feed the script to ffmpeg, VirtualDub, XMedia or other encoder that supports Avisynth.

    BTW, I've tested TCPServer & TCPSource a little bit and I believe they are for frameserving to other machines on a local network (ie, render farms), not for grabbing videos from the Internet.
    Quote Quote  
  12. Point to raffriff42 - completely forgotten about nnedi implemented already in ffmpeg.
    With your current script you hurting yadif quality - i always use yadif like this
    Code:
     "yadif=1:-1:0"
    , you may consider to use zscale instead scale - for example:
    Code:
    "zscale=d=ordered:f=spline36:w=1280:h=720:r=full"
    nnedi in ffmpeg can be used like this:
    Code:
    "nnedi=nnedi3_weights.bin:field=af:deint=all:nsize=s8x4:nns=n16:qual=fast"
    but before use you need to download and place in ffmpeg folder file https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
    Quote Quote  
  13. Thank you for your replies!

    First look on nnedi seems that it takes too much resources.. also horizontal lines flickering when image is static.

    I will check also the scale
    Quote Quote  
  14. Originally Posted by illus View Post
    Thank you for your replies!

    First look on nnedi seems that it takes too much resources.. also horizontal lines flickering when image is static.

    I will check also the scale
    QTGMC relies heavily on neural network edge directed interpolation as well which is one of the reasons it is so resource intensive. It also goes a significant step further by applying some noise reduction. If you are trying to de-interlace HD content on the fly with QTGMC or any similar strategy, you are going to need some serious computing power to avoid dropping too many frames. It has been a while since I last deint HD content, but I don't recall being anywhere near real time and that was multi-threaded on an i7-3770K (which I would add is significantly harder to optimize than for SD content). Maybe it is possible with a Broadwell-E 8 or 10 core monster, but that is some serious $$$$.

    Have you tried MadVR? Lanczos + Anti-Ringing or some similar combination might get you the results you are looking for.
    Quote Quote  
  15. Originally Posted by illus View Post
    First look on nnedi seems that it takes too much resources.. also horizontal lines flickering when image is static.
    You can apply selective blur, also de-noising may help to avoid this.
    Quote Quote  



Similar Threads

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