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
-
-
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. -
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
If I take out the scaling and leave the yadif alone you can see the horizontal lines flickering when there is no movement. -
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
http://avisynth.org.ru/docs/english/corefilters/tcpdeliver.htm
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 reducedLast edited by poisondeathray; 2nd Nov 2016 at 17: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:"yadif=1:-1:0"
Code:"zscale=d=ordered:f=spline36:w=1280:h=720:r=full"
Code:"nnedi=nnedi3_weights.bin:field=af:deint=all:nsize=s8x4:nns=n16:qual=fast"
-
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. -
Similar Threads
-
Converting 720p to 480p (Getting rid of black bars on the side of 720p)
By fri3ndlygiant in forum Video ConversionReplies: 5Last Post: 22nd Mar 2016, 05:20 -
Best Quality encoding from 1080p to 720p & 720p to 720p in Xvid4PSP?
By Odie111 in forum Video ConversionReplies: 8Last Post: 9th Jan 2016, 16:42 -
Do I need to resize 1080p PGS subs to 720p when making 720p AVCHD ???
By FulciLives in forum Authoring (Blu-ray)Replies: 3Last Post: 20th Aug 2015, 12:26 -
Convert 720p Web Stream to Blu-ray Muxing ready ts/m2ts using ffmpeg
By danswano in forum Video ConversionReplies: 2Last Post: 2nd Jul 2014, 06:21 -
Convert 720p25 back to 1080i50?
By RowanDDR in forum Video ConversionReplies: 2Last Post: 15th Aug 2012, 17:39