How do I set the interlaced flag on an MKV file so that VLC can automatically play it back deinterlaced?

Todd Lehman picture Todd Lehman · Feb 15, 2012 · Viewed 8.1k times · Source

I've got an MKV file whose source is interlaced NTSC MPEG-2 video. I converted it to H.264 MKV with HandBrake, but this process did not set the "interlaced" flag in the MKV file. The content is interlaced—and I do want it to stay interlaced because it looks much better playing back as 60 fields-per-second content with on-the-fly deinterlacing than it does as 30 frames-per-second content that's been deinterlaced at encode-time.

I tried this...

mkvpropedit -e track:v1 -a interlaced=1 foo.mkv

which did indeed set the interlaced bit...

|+ Segment tracks
| + A track
|  + Video track
|   + Pixel width: 704
|   + Pixel height: 480
|   + Display width: 625
|   + Display height: 480
|   + Interlaced: 1

But when I play the video with VLC with Deinterlace set to Automatic, it doesn't think the video is interlaced and therefore doesn't do the deinterlacing.

What am I doing wrong?

Software versions:
HandBrake 0.9.5
mkvpropedit v5.0.1
Mac OS X 10.7.3

Answer

Joachim O. picture Joachim O. · Jul 26, 2014

to make handbrake set the interlaced flag:

-use H.264(x264) Video Codec

-at the bottom of the Advanced Tab add :tff or :bff, ( dependant if source is top field first or bottom field first)