INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MKV files not de-interlacing?  (Read 14706 times)

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
MKV files not de-interlacing?
« on: January 08, 2013, 04:25:03 pm »

I have some MKV files that are flagged correctly as interlaced and 29.970 frame rate - but they don't de-interlace when played back in MC. 
Settings in MC are ROHQ and Hardware Accelerate.  Graphics card is an ATI Radeon HD 5570.

Am I missing something somewhere?

Example file details:
Code: [Select]
Format                           : Matroska
File size                        : 1.80 GiB
Duration                         : 44mn 14s
Overall bit rate                 : 5 834 Kbps
Encoded date                     : UTC 2010-04-17 21:54:22
Writing application              : MakeMKV v1.5.2 beta win(x64-release)
Writing library                  : libmakemkv v1.5.2 beta (0.7.7/0.8.1) win(x64-release)

Video
ID                               : 1
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@Main
Format settings, BVOP            : No
Format settings, Matrix          : Default
Codec ID                         : V_MPEG2
Codec ID/Info                    : MPEG 1 or 2 Video
Duration                         : 44mn 14s
Bit rate mode                    : Variable
Bit rate                         : 5 077 Kbps
Nominal bit rate                 : 9 800 Kbps
Width                            : 720 pixels
Height                           : 480 pixels
Display aspect ratio             : 16:9
Original display aspect ratio    : 16:9
Frame rate                       : 29.970 fps
Standard                         : Component
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Interlaced
Scan order                       : Top Field First
Compression mode                 : Lossy
Bits/(Pixel*Frame)               : 0.490
Stream size                      : 1.57 GiB (87%)
Language                         : English
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: MKV files not de-interlacing?
« Reply #1 on: January 09, 2013, 06:43:29 am »

Same observation made here:
https://yabb.jriver.com/interact/index.php?topic=77033.0

specifically this post:
https://yabb.jriver.com/interact/index.php?topic=77033.msg521827#msg521827

Either way, I contributed it to me not knowing how to make a proper mkv.
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #2 on: January 09, 2013, 01:31:09 pm »

Either way, I contributed it to me not knowing how to make a proper mkv.

But in this case, it appears that it IS a proper MKV.

From that post:
Quote
It does deinterlace MKVs, however it doesn't deinterlace if the MKV already claims a FPS of 50/60, instead of the more approriate 25/30, like many oddly encoded MKVs do (the madVR stats would tell you this)

As you can see, mine are properly(?) flagged as 29.970 interlaced top field first.  I am open to the fact that there IS a problem with the info in the MKV header that is causing the problem - just am at a loss as to what it might be.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: MKV files not de-interlacing?
« Reply #3 on: January 09, 2013, 01:43:35 pm »

yeh, I know. I redid mine as well specifying 50i and it wouldn't enable deinterlacing but I don't know enough about mkv's to say if that was what Nev was talking about or not. And since it wasn't the main issue I didn't want to dwell on that.

But now that I'm no longer the only one with the issue maybe it can get some attention from the experts again :P.

Cheers.
Logged

hulkss

  • Galactic Citizen
  • ****
  • Posts: 447
Re: MKV files not de-interlacing?
« Reply #4 on: January 10, 2013, 12:05:09 am »

I de-interlace all of my video offline when I make my mkv's. It does look equal to or better than realtime de-interlacing.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MKV files not de-interlacing?
« Reply #5 on: January 10, 2013, 08:19:24 am »

I de-interlace all of my video offline when I make my mkv's. It does look equal to or better than realtime de-interlacing.

I wondered about this too.

What would be the point of having an interlaced MKV in the first place, since all monitors you're going to use a MKV on are Progressive-Scan devices?  While the GPU-intensive deinterlacing routines can do a very good job on the fly, multi-pass deinterlacing during encode can always do a better job.

Interlaced content == evil.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Sandy B Ridge

  • Citizen of the Universe
  • *****
  • Posts: 885
Re: MKV files not de-interlacing?
« Reply #6 on: January 10, 2013, 08:46:40 am »

I de-interlace all of my video offline when I make my mkv's. It does look equal to or better than realtime de-interlacing.
I wondered about this too.

What would be the point of having an interlaced MKV in the first place, since all monitors you're going to use a MKV on are Progressive-Scan devices?  While the GPU-intensive deinterlacing routines can do a very good job on the fly, multi-pass deinterlacing during encode can always do a better job.

Interlaced content == evil.
Very good point chaps. It never occurred to me to deinterlace files offline. I have always been a 'preserve the original content and optimise playback' kind-of-guy, but this could really change my mind.

What is considered the best deinterlacer for doing this offline? Under what circumstances is it worth doing IVTC at the same time? ie. what content would benefit?

SBR
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #7 on: January 10, 2013, 10:00:25 am »

I wondered about this too.

What would be the point of having an interlaced MKV in the first place, since all monitors you're going to use a MKV on are Progressive-Scan devices?  While the GPU-intensive deinterlacing routines can do a very good job on the fly, multi-pass deinterlacing during encode can always do a better job.

Interlaced content == evil.

This is content that was interlaced to begin with and has not been re-encoded.  The point is keeping the original video intact, since the original video when properly de-interlaced during playback is better quality than re-encoded material.  If I were re-encoding for a specific device (like my iPad), I would de-interlace when doing that but for the original quality content the DVD quality video is bad enough.  It gets noticeably worse (to my eyes) when re-encoded with Handbrake (background walls with grain/noise become a mass of macro blocks for example).
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MKV files not de-interlacing?
« Reply #8 on: January 10, 2013, 10:44:17 am »

The point is keeping the original video intact, since the original video when properly de-interlaced during playback is better quality than re-encoded material.

Pet Peeve Alert:

This kind of argument always makes me laugh.  You don't have the "original video".  BluRay has the holy living CRAP compressed out of it, compared to the way it was shot (or scanned if it was shot on film).

If you recompress using proper settings, you will not be able to tell the difference.  Now, if you're trying to take the 50GB source and squeeze it into 4GB (or worse)?  Well, of course that's going to have a noticeable quality drop.  But the original source of that two-hour movie was probably terabytes in size, and it was shot progressively.

Almost all commercially available interlaced content can be deinterlaced essentially "perfectly" because the footage was shot using a progressive camera (or scanned from film, which is by nature progressive).  The only real exceptions are for sources that were originally shot interlaced (almost always news or sports footage).  If it was shot interlaced, the quality is junk anyway (because it was almost certainly shot with a cheap news camera).  Interlacing is almost always done for broadcast.  If you get an interlaced BluRay, it is because the producers were too lazy/cheap to go back and re-encode the source to get rid of the interlacing.  It is the mark of a terrible quality disc.

To sum up my pet peeve:  The version you can obtain commercially != "the original".
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MKV files not de-interlacing?
« Reply #9 on: January 10, 2013, 10:46:16 am »

However, I should add, there is a good reason not to recompress:  time.  If you have a lot of these, it is a royal pain to do so, and would take a bunch of time.

If I only had a few, I'd take the time, because Interlaced = Crap (and I'd consider trying to find a better source disc, often they're available).  But if I was an anime nerd or something and I had a huge pile of discs?  Well, then, that makes sense.

But it isn't about the quality when you're coming from an interlaced source.  That quality is already bad.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: MKV files not de-interlacing?
« Reply #10 on: January 10, 2013, 10:48:49 am »

I wondered about this too.

What would be the point of having an interlaced MKV in the first place, since all monitors you're going to use a MKV on are Progressive-Scan devices?  While the GPU-intensive deinterlacing routines can do a very good job on the fly, multi-pass deinterlacing during encode can always do a better job.

Interlaced content == evil.

As usual I agree with you but I don't always want to reencode. I have plenty of dvd's left unripped, if I can't or don't want to play the dvd itself, I quickly rip and mux it into an mkv. It's quick and dirty and doesn't take nearly as much time as reencoding. Mind you, doing proper deinterlacing during encoding will up the encoding time by a factor 4 or something. Sometimes someone is visiting and he has the bright idea to pick something from my collection I haven't ripped yet.

All the suggestions are work arounds for an issue that should work in the first place; deinterlacing mkv's by Madvr (unless our Mkv's are not created properly, I don't know for sure).
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #11 on: January 10, 2013, 11:15:03 am »

Pet Peeve Alert:

This kind of argument always makes me laugh.  You don't have the "original video".  BluRay has the holy living CRAP compressed out of it, compared to the way it was shot (or scanned if it was shot on film).

If you recompress using proper settings, you will not be able to tell the difference. 

Now you are just being ornery because I pushed a 'hot button' :P.

By 'original', I mean the video as it exists on my best quality source (and I am pretty sure you know that is what I meant).  I have no access to the true source material and the 'best' quality available to me is the interlaced DVD content.

As to the statement about re compressing, I wish someone would share what the 'proper' setting are.  I have tried multiple times with various settings and have never been able to produce a final file that is transparent to the original.  The video always goes from lousy to even worse.  Even though we are talking about over 450 episodes I would be willing to re-encode them all if I could get output that was transparent to the input quality wise.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MKV files not de-interlacing?
« Reply #12 on: January 10, 2013, 11:15:45 am »

As usual I agree with you but I don't always want to reencode. I have plenty of dvd's left unripped, if I can't or don't want to play the dvd itself, I quickly rip and mux it into an mkv. It's quick and dirty and doesn't take nearly as much time as reencoding.

Yep.  That's a good reason.

And, I agree, that it should work.  The problem is, probably, that examples are relatively rare and so no one noticed it was broken (if, indeed, it is).  I don't have any examples in my substantial library to even test it with.

I could make one, of course, but that's annoying.  ;) ;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MKV files not de-interlacing?
« Reply #13 on: January 10, 2013, 11:16:27 am »

Now you are just being ornery because I pushed a 'hot button' :P.

Hah.  Yep.  That's why I put the Pet Peeve Alert prefix.  ;) ;D

Transcode to x264, two-pass, target data rate ~25Mbps (or higher).  Make sure you're not resizing or changing the framerate (Edit: Duh, you have to in order to remove the interlacing.  Make sure the deinterlacing is done properly.  You want to detelecine whenever possible, not use the "analysis" modes, and revert the framerate back to the original, usually 24p or 30p for American stuff, 24 or 25p for PAL stuff.)  Copy audio as-is.  If you can still see visible artifacts, then you've likely got a bunk transcoder (sorry, mine are all pro/expensive, so I can't make specific recommendations here), or something else is going on.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: MKV files not de-interlacing?
« Reply #14 on: January 10, 2013, 11:38:54 am »

For DVD content, I find Handbrake does the best job as far as GUI's go. I don't use it for HD content. Preset profiles work fine, or you do your settings manually, decomb on default, constant quality set to 19 (max, 18 to shrink a bit more), you'd need to experiment what the content needs.

Handbrake supports passthrough for most audio streams as well, and it supports subtitles for DVD (not bluray, unfortunately).
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #15 on: January 10, 2013, 12:05:26 pm »

For DVD content, I find Handbrake does the best job as far as GUI's go. I don't use it for HD content. Preset profiles work fine, or you do your settings manually, decomb on default, constant quality set to 19 (max, 18 to shrink a bit more), you'd need to experiment what the content needs.

Handbrake supports passthrough for most audio streams as well, and it supports subtitles for DVD (not bluray, unfortunately).

I've tried Handbrake with default settings, and different variations.  I'll re-do an encode and post up pictures of what I am seeing.  The original content is mostly film based and has a lot of grain/noise.  End result is a solid wall in the background full of grain/noise becomes a mass of large macro blocks and visible gradient lines.
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #16 on: January 10, 2013, 12:08:57 pm »

Hah.  Yep.  That's why I put the Pet Peeve Alert prefix.  ;) ;D

Transcode to x264, two-pass, target data rate ~25Mbps (or higher).  Make sure you're not resizing or changing the framerate (Edit: Duh, you have to in order to remove the interlacing.  Make sure the deinterlacing is done properly.  You want to detelecine whenever possible, not use the "analysis" modes, and revert the framerate back to the original, usually 24p or 30p for American stuff, 24 or 25p for PAL stuff.)  Copy audio as-is.  If you can still see visible artifacts, then you've likely got a bunk transcoder (sorry, mine are all pro/expensive, so I can't make specific recommendations here), or something else is going on.

Thanks, I will try that.  I think the issue is the consumer quality software (like Handbrake) I have to work with.  It can handle high quality content acceptably, but with the lower quality TV releases, not so much.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: MKV files not de-interlacing?
« Reply #17 on: January 10, 2013, 12:15:14 pm »

I may have misunderstood, I thought you were talking about regular dvd movies and alike. I have absolutely zero experience encoding film based material. Actually, I know very little about video encoding in general, just some experience reencoding my own dvd collection, and bluray as of late.
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #18 on: January 10, 2013, 12:17:49 pm »

I may have misunderstood, I thought you were talking about regular dvd movies and alike. I have absolutely zero experience encoding film based material. Actually, I know very little about video encoding in general, just some experience reencoding my own dvd collection, and bluray as of late.
I am talking about DVD.  Most DVD's come from a film source.

Edit:  The problem is that most TV stuff on DVD is sourced from the interlaced version created for broadcast and was never remastered properly for DVD.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: MKV files not de-interlacing?
« Reply #19 on: January 10, 2013, 01:41:50 pm »

Right. I knew that I just thought I'd misunderstood and you were now talking about home videos on film that are old and grainy :).

I'm sorry I can't be of more help to you, I'm not an expert and for my dvd's, I think Handbrake did a very acceptable job, I typically don't see a difference compared to the original.

When people say grainy parts become a solid blur, I tend to think compression was set too high, but maybe thats too simple. When I took the advised settings from the Handbrake manual I thought the image was too soft too and lost a lot of detail. I just increased CQ by 1 and tried again, then by another until I was happy. I ended up with ~40% compression on a dvd with generally no visible loss in quality.

But the thing is (not to say this is what you're doing), but when I take a frame from the original dvd and the same frame from the reencoded video and compare them side by side as a still image, I'm sitting 60cm's from 2 calibrated 24" Dell Ultrasharps ... yes I'm going to see a lot of differences. But when played back side by side (VLC can do that, 2 instances of the program) from a normal viewing distance, that's a whole different story and a lot harder to spot differences. On the TV from 3 or 4 meters away, no differences can be spotted. At least, from my experience that is. YMMV of course.
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: MKV files not de-interlacing?
« Reply #20 on: January 10, 2013, 10:47:54 pm »

Per my other post about missing FPS values - it seems that these 'problem' files are missing the FPS data (about 250 files in total with the issue).  Am updating the library and will test over the weekend (or maybe tomorrow) to see if this fixes it.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10719
Re: MKV files not de-interlacing?
« Reply #21 on: January 11, 2013, 01:11:34 pm »

You could also try with build 112, and see if anything potentially changed (there was an update of LAV in there, with some changes to how FPS is determined)
Logged
~ nevcairiel
~ Author of LAV Filters
Pages: [1]   Go Up