Log in

View Full Version : Encoding interlaced video (x264)


kartola
11th September 2011, 10:04
I tried to encode my edited video from my HD cam (panasonic TM700) but i can't find a solution to use X264 with good result.
Look the frame encoded by mainconcept (keeping the video interlaced)
http://img231.imageshack.us/img231/3825/premierem2tsnapshot0002.jpg


and same frame encoded by x264 (with --interlaced option)
http://img263.imageshack.us/img263/5776/sfarfalldebugdeintmkvsn.jpg

If i use the deinterlce filter of avisinth the result is the same.
Is possible to fix that or x264 is limited with interlaced video?

Thanks for helping me...

nm
11th September 2011, 11:12
Both frames have been deinterlaced, so we can't see what the encoder really produced. Chroma ghosting points to cropping the interlaced video incorrectly before encoding, or maybe a field order issue.

Post your AviSynth script and x264 command line. A sample clip from the encoded video would also be helpful.

kartola
11th September 2011, 18:37
OK
i can't upload original file, it is h264 files edited by premiere, i can upload uncompressed edited video but for 5 seconds of video it will be about 700 mb...

i encoded the same 5 second with x264 and with mainconcept.

Mainconcept encode well interlaced video, keeping it interlaced. Instead x264 doesn't have a real interlaced mode, and the video looks flickering...

x264 video was encoded with those parameters:
--tune film --crf 21 --level 4.1 --keyint 48 --b-pyramid strict --vbv-bufsize 30000 --vbv-maxrate 40000 --aud --slices 4 --nal-hrd vbr --interlaced --output "<target>" "<source>"

Avisinth script:
AVISource("F:\Premiere\USA2010\render\TEST\Sequence 03.avi", audio=false)
Crop(0,0, -Width % 8,-Height % 8)
ConvertToYV12()

You can compare them.

x264 video: http://www.multiupload.com/C0AKHVKPJ4 (http://www.multiupload.com/C0AKHVKPJ4)

mainconcept video: http://www.multiupload.com/QY1DZUGUM3 (http://www.multiupload.com/QY1DZUGUM3)

Thanks

Blue_MiSfit
12th September 2011, 03:23
x264 absolutely has a real interlaced mode, you simply haven't set things up correctly.

This "Sequence 03.avi" it's YUY2, right?

ConvertToYV12() will then completely destroy your chroma. You need to use ConvertToYV12(interlaced=true) instead.

Also, you need to set x264 into interlaced mode by using either "--tff" or "--bff". I'm guessing your source is TFF, so use that.

Derek

kartola
12th September 2011, 05:55
Thank you Derek, you're right, someone else answer me the same thing in another forum, and is the key to resolve the problem.
I found no difference in the past using --interlaced or --tff, but i'm gonna try again to confirm that.
Thanks again