View Full Version : Field order and interlaced x264 encoding
multimediaman
23rd April 2009, 09:58
Hi!
I am trying to encode top field first interlaced video with avidemux and mencoder. It works and result is very good in terms of crf and file size. :) However deinterlacers are trying to deinterlace encoded video as bottom field field first order.
Well, I can change deinterlacing field order using mplayer and yadif. Is there anyway to get it working as it should be?
Linux user.
By compiling x264 with the nal-hrd & interlace patch (http://komisar.gin.by/x.patch/last.used/x264_hrd_pulldown.11_interlace.diff), it is possible to include field order signals in the encoded video. Use these x264 parameters (nal-hrd requires VBV parameters to be set):--nal-hrd --vbv-bufsize X --vbv-maxrate Y --tff
Same parameters should work in MEncoder when you compile it against the patched libx264: nal-hrd:vbv-bufsize=X:vbv-maxrate=Y:tff
With the field order signals present in the video, it is up to the decoder and player to interpret and use them. If there is some specific player that doesn't listen to these signals and defaults to bottom-field-first, you could also swap the fields before encoding. I'd still recommend signaling the field order properly because the player might get fixed at some point or you might switch to some other playback solution.
multimediaman
23rd April 2009, 17:55
:thanks:
Works great!
DiKey
21st May 2009, 02:08
May be it is the best place to add link to nal-hrd & interlace patched version without any other patches?
May be it is the best place to add link to nal-hrd & interlace patched version without any other patches?
Nobody is distributing such builds for Linux, Mac OS X & Co. Or do you mean that you are making a generic Linux build?
microchip8
21st May 2009, 10:00
Nobody is distributing such builds for Linux, Mac OS X & Co. Or do you mean that you are making a generic Linux build?
I build a patched version of x264 for openSUSE which includes the AutoVAQ, NAL HRD and slicetype patches
http://download.opensuse.org/repositories/home:/microchip8/
also the NAL HRD patch can be found on h264enc site in the download section
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.