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 ?
+ Reply to Thread
Results 1 to 15 of 15
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.
Source is upper field
./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
If I take out the scaling and leave the yadif alone you can see the horizontal lines flickering when there is no movement.
Is it animated material? Yadif doesn't work well with animation.
it's sports content
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.
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....
Yes it needs a file.
There is a tcpdeliver/tcpsource plugin that works over tcp not udp, but I've never tested it
Last edited by poisondeathray; 2nd Nov 2016 at 18:00.
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.
Point to raffriff42 - completely forgotten about nnedi implemented already in ffmpeg.
With your current script you hurting yadif quality - i always use yadif like thisCode:
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
Have you tried MadVR? Lanczos + Anti-Ringing or some similar combination might get you the results you are looking for.