Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2009, 22:15   #1  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
Which MPEG2 codec with deinterlacing?

For playing back recorded TV shows a good mpeg2 decoder is needed. It needs to have high quality deinterlacing that also outputs at 25 FPS to keep ReClock happy, and to be able to use FFDShow upscaling (50 FPS is just too much work dispite having dualcore 2.1GHz CPU). Last thing it needs is to detect aspect ratio changes properly.

The only decoders I've found that fit the requirements are cyberlink and arcsoft. Both are good but I think arcsoft is a little better. I'm interested to know what other people out there are using...
mr.duck is offline   Reply With Quote
Old 20th April 2009, 23:21   #2  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by mr.duck View Post
The only decoders I've found that fit the requirements are cyberlink and arcsoft. Both are good but I think arcsoft is a little better. I'm interested to know what other people out there are using...
What's wrong with using ffdshow for MPEG2 decoding and it's YaDIF deinterlacer? Works great for all my DVDs...

np: Kontext - Blinkende Stjerne (Round Black Ghosts 2)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 21st April 2009, 11:54   #3  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
Only thing wrong with it is I thought it was impossible to use deinterlacing and upscaling in FFDshow at the same time. Some sort of limitation with FFDshow.

I'm just trying to find out how to get best possible video playback quality.
mr.duck is offline   Reply With Quote
Old 21st April 2009, 13:26   #4  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by mr.duck View Post
Only thing wrong with it is I thought it was impossible to use deinterlacing and upscaling in FFDshow at the same time. Some sort of limitation with FFDshow.
Whatever made you think that?

Just make sure to deinterlace before resizing - you can drag the entries in the filters list to change the order in which they are applied.

np: DOOM - Batty Boyz (Born Like This)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 21st April 2009, 19:22   #5  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
Ok I think I got mixed up when I was using DScaler deinterlacing filters before. It would produce this flickering picture.

YaDIF is nice... it works well but at only 25fps it is too juddery. It needs some motion blur. For example at the cinema, the movie is only 24fps but you never think "this film's frame rate isn't high enough".

Try linear blending in FFDShow. That is the only one that produces a smooth, fluid video at 25fps. But it doesn't produce a great picture, it is too smeary. Not clean and crisp enough.

Are there any other deinterlacing filters that can be used with FFDShow? I tried DScaler4 ones but they don't work at the same time as resizing.
mr.duck is offline   Reply With Quote
Old 21st April 2009, 19:31   #6  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
for what it's worth, I use Gabest's MPEG2 decoder in "auto" mode/YV12, it does the job! I never managed to get YADIF to output good stuff w/o double frame rate(which my Avisynth scripts can't process fast enough for realtime use).

tom'smocomp is good too, well last time I tried it on DVD at least....but not combing free.
leeperry is offline   Reply With Quote
Old 21st April 2009, 21:02   #7  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Have you got your heart set on resizing in ffdshow?

My own preference for genuine 50i video would definitely be double rate output (with something like Yadif) and no resizing (more specifically, let the graphics card resize), rather than same as input rate output (with any deinterlacer) and resizing.

You just lose motion going from 50i to 25p, hence the judders. Any advantage there may be using ffdshow to resize rather than the graphics card will, in my opinion, be more than lost by discarding movement with a same rate deinterlacer.

If the source isn't proper 50i then it's a different story.
TinTime is offline   Reply With Quote
Old 22nd April 2009, 14:20   #8  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
Yes Gabest's MPEG2 decoder has got to be one of my favorite free mpeg2 decoders. I used it with bob deinterlace and found the quality to be really excelent. If it could handle aspect ratio changes properly, I would still be using it now. It's a shame it's stoped being developed.

tomsmocomp is watchable but not great. Somthing not quite right about it. Plus some very strange effects if you put the search effort up.

YaDIF with double framerate is really excelent just like Gabest's MPEG2 decoder with BOB. And even better, I can still resize without overloading the CPU! I couldn't do that with Gabest decoder, so FFDshow must be coded very well. I'm just using the generic build, beta6 rev2527. CPU is Athlon X2 2.1GHz and get around 80% CPU usage accross both cores. Excelent stuff.
mr.duck is offline   Reply With Quote
Old 22nd April 2009, 14:25   #9  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
AR works fine here w/ Gabest's MPEG2 decoder...I think

I don't use it in BOB mode, though.
leeperry is offline   Reply With Quote
Old 22nd April 2009, 14:29   #10  |  Link
mark0077
Registered User
 
Join Date: Apr 2008
Posts: 1,106
yadif is the best software de-interlacer I have ever seen. I still think it could be slightly improved to try and match up to some of the hardware de-interlacers. Should be possible cpu power wise nowadays with our 4 cores etc. I wonder who the author is to see if he has ideas for further improving it
mark0077 is offline   Reply With Quote
Old 22nd April 2009, 15:32   #11  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by mark0077 View Post
yadif is the best software de-interlacer I have ever seen. I still think it could be slightly improved to try and match up to some of the hardware de-interlacers. Should be possible cpu power wise nowadays with our 4 cores etc. I wonder who the author is to see if he has ideas for further improving it
The author is Michael Niedermayer, who is also one of the major maintainers of ffmpeg & mplayer at present.
roozhou is offline   Reply With Quote
Old 22nd April 2009, 15:52   #12  |  Link
mark0077
Registered User
 
Join Date: Apr 2008
Posts: 1,106
Thanks, I will try and track him down on a forum maybe to see if he can take yadif further, quality wise.
mark0077 is offline   Reply With Quote
Old 22nd April 2009, 17:32   #13  |  Link
mr.duck
quack quack
 
Join Date: Apr 2009
Posts: 259
Quote:
Originally Posted by leeperry View Post
AR works fine here w/ Gabest's MPEG2 decoder...I think
Aspect ratio is correct until the aspect changes mid video. The gabest decoder doesn't seem to recognise when that happens. You can get a lot of aspect ratio changes with TV recordings.


Quote:
Originally Posted by mark0077 View Post
yadif is the best software de-interlacer I have ever seen. I still think it could be slightly improved to try and match up to some of the hardware de-interlacers. Should be possible cpu power wise nowadays with our 4 cores etc. I wonder who the author is to see if he has ideas for further improving it
From what I have seen, there are 2 categories of deinterlacers. YaDIF is good at deinterlacing true interlaced video such as video shot in 25i by TV film crews. The other type is like the cyberlink and arcsoft decoders. They try to restore the original video such as hollywood movies shot at 24p and then converted to interlaced format for TV transmission. So for YaDIF to be improved, it can be taken down 2 different paths.
mr.duck is offline   Reply With Quote
Old 22nd April 2009, 18:11   #14  |  Link
mark0077
Registered User
 
Join Date: Apr 2008
Posts: 1,106
Or down both paths and smartly handle everything I contact the creator to ask if he has any intentions of improving it further.
mark0077 is offline   Reply With Quote
Old 22nd April 2009, 23:10   #15  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Guys.. don't get ahead of yourseleves. You're getting your terminology confused.

YADIF is a deinterlacer. Meaning, it can take pure interlaced input and output either single rate or double rate progressive. In the case of PAL, this means outputting 25p (losing half the temporal resolution / motion) or 50p (keeping all temporal resolution).

The other "category" you're thinking of is inverse telecine. This is not deinterlacing It's simply matching fields and deleting duplicates to restore the original 23.976p out of 29.97i (usually). Most new DVDs use a technique called soft pulldown, where the stream is actually encoded at 23.976p, and there are flags in the bitstream to perform the 3:2 pulldown when necessary. On the PC, this is never necessary, so if your player is set up correctly there should be no IVTC required.

The important thing to realize is that YADIF is a deinterlacer. It has nothing to do with inverse telecine, though it can be used as part of an advanced inverse telecine workflow for oddball sources where smart-bobbing is necessary.

Don't bother Michael with requests to make YADIF capable of IVTC. That's not what it's intended to do, and there are plenty of alternatives out there that do a perfectly fine job

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 22nd April 2009, 23:26   #16  |  Link
mark0077
Registered User
 
Join Date: Apr 2008
Posts: 1,106
I thought there was something strange about mr.duck's post on 2 different paths!

Yeah libavcodec in ffdshow does a nice job of doing inverse telicine although I never have a need for it.

Regarding de-interlacing quality, I can see slightly better quality de-interlacing though from nvidia and ati hardware de-interlacing. It would be nice to see yadif improved to this standard where cpu power is high enough.

Regarding detecting of interlaced vs progressive sources (not relying on flags), haruhiko yamagata says he may get time to look into doing this in software if he has enough time. I am sick and tired of having to manually enable / disable de-interlacing for my PAL DVD's, 95 of which are badly marked.
mark0077 is offline   Reply With Quote
Old 22nd April 2009, 23:50   #17  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
Quote:
Originally Posted by Blue_MiSfit View Post
YADIF is a deinterlacer. Meaning, it can take pure interlaced input and output either single rate or double rate progressive. In the case of PAL, this means outputting 25p (losing half the temporal resolution / motion) or 50p (keeping all temporal resolution).
so you can't get the whole motion in 25p? it's interlaced, so buffering one field over the other should turn 25i into 25p? ah well, I never really understood that stuff

turning 25i in 50p is actually 50p in the end? or some "trimension" 50i w/ interpolated frames? coz that's what it looks like..
leeperry is offline   Reply With Quote
Old 23rd April 2009, 00:19   #18  |  Link
mark0077
Registered User
 
Join Date: Apr 2008
Posts: 1,106
Quote:
Originally Posted by leeperry View Post
so you can't get the whole motion in 25p? it's interlaced, so buffering one field over the other should turn 25i into 25p? ah well, I never really understood that stuff

turning 25i in 50p is actually 50p in the end? or some "trimension" 50i w/ interpolated frames? coz that's what it looks like..
If my understanding is correct, 25i contain's 25 interlaced frames, each of which contains two fields (essentially half frames, picture a frame cut into strips, each field is a collection of half of these strips, the next field being the second half of these strips but from a small section of time later).

This corresponds to 50 fields, or 50 half frames per second....

Because each field wasn't take at the same time (by the camera....).. to combine these 50 half frames into 50 normal frames, the missing strips (missing half) of information needs to be filled in for each. What most of the best hardware de-interlacers do is something like trimension that you talk about, an attempt to guess what would have being originally in those stripped out areas based on the fields before / after it.

My hope is that yadif can be improved to better guess what would have originally being in these stripped out areas using better techniques, as it seems its still not as good as the hardware de-interlacers that seem to detect motion using "motion vector de-interlacing" and are able to more accurately fill in those missing areas with useful content leading to beautiful 50 progressive frames from the 50 half / stripped frames.

Someone correct me if I am wrong but this is my understanding. 25p is not the perfect outcome from a 25i -> progressive transformation, 50p is, otherwise we would be just throwing away data, not using it in the best way possible. (unless the top and bottom field are from the exact same time? (take at the same time by the camera and later transformed into interlaced form for some reason), in this case 25p would be the correct output and could be achieved by simply "weaving" the two fields into one frame assuming they were originally recorded at the precise same time).

Last edited by mark0077; 23rd April 2009 at 00:36.
mark0077 is offline   Reply With Quote
Old 23rd April 2009, 01:10   #19  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by mark0077 View Post
Someone correct me if I am wrong but this is my understanding. 25p is not the perfect outcome from a 25i -> progressive transformation, 50p is, otherwise we would be just throwing away data, not using it in the best way possible.
Firstly it's generally referred to (although I've seen debate over this before) as 50i, not 25i, so I'm going to stick with 50i

Your understanding of 25 interlaced frames per second is correct though. This means that the image is sampled fifty times per second. If you convert to 25p this effectively means throwing away half of any motion to try and retain sharpness, leading to stuttery motion. Alternatively it means blending two moments in time together, leading to smoother, but blurrier, playback. Imagine converting 50p to 25p and what that would do to any motion in the image. Static portions would still look ok though. It's the same with 50i to 25p.

So for good results (and IMO far more important than any other post-processing) the 50i source should be bobbed to 50p, if it's genuinely interlaced.

Quote:
Originally Posted by mark0077 View Post
(unless the top and bottom field are from the exact same time? (take at the same time by the camera and later transformed into interlaced form for some reason), in this case 25p would be the correct output and could be achieved by simply "weaving" the two fields into one frame assuming they were originally recorded at the precise same time).
There are a couple of cases here. The first is stuff shot on film. The stream may be flagged as 50i but each pair of fields comes from the same frame of film (sped up from 24 to 25fps). In this case the fields should just be weaved together resulting in 25p output as you said.

The second case is for genuinely interlaced material. If the image is static then although the two fields come from different times it doesn't matter because there's no motion. Then the fields can be weaved together.

Ideally want you want from a deinterlacer when converting 50i to 50p (or to 25p for that matter) is for it to weave together static portions of the image, and only interpolate motion.

Quote:
Originally Posted by mark0077 View Post
I am sick and tired of having to manually enable / disable de-interlacing for my PAL DVD's, 95 of which are badly marked.
Couldn't agree with you more.

Last edited by TinTime; 23rd April 2009 at 01:17. Reason: Typos
TinTime is offline   Reply With Quote
Old 23rd April 2009, 01:54   #20  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
well what I understood if that when you have the top field of the original frame, the bottom field of the same frame will be in n+1...basically you have fields constantly mismatched and need to put them back together by buffering n-1

but well, I avoid interlaced stuff like the plague, coz I don't like interpolated frames and my avisynth scripts can't process 50fps anyway
leeperry is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.