Log in

View Full Version : Help Me Encode Interlaced AVC To Progressive


Chumbo
6th February 2012, 02:48
Hi,
I'm trying to encode an AVC interlaced cartoon using x264 but I can't seem to get the deinterlacing right for whatever reason for this particular one. I put a 30 second clip here:
http://www.mediafire.com/?3lc8hvc28pf28bd

MediaInfo shows it as 30fps (below) but eac3to shows it as 60i.General
ID : 1 (0x1)
Complete name : BugsClip.ts
Format : MPEG-TS
File size : 34.9 MiB
Duration : 29s 857ms
Overall bit rate : 9 793 Kbps
Maximum Overall bit rate : 35.5 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 27
Duration : 29s 933ms
Bit rate mode : Variable
Bit rate : 8 921 Kbps
Maximum bit rate : 20.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.143
Stream size : 31.8 MiB (91%)
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 129
Duration : 29s 920ms
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 1.37 MiB (4%)
Language : English
Do I need to IVTC before deinterlacing or anything like that? I've tried TIVTC, I've tried just deinterlacing and several other attempts and all do not provide smooth progressive output.

I'm using 64bit AviSynth so I'm limited to the available filters in this environment.

I'm not an expert at this stuff especially encoding interlaced to progressive material so I'm hoping those of you that are experts can help me out if you have the time please. Thank you.

Here's the avs script that came closes to getting good output but I'm getting a strange thing happening in that after it's muxed, there's a consistent break in the audio that seems caused by the video since the audio plays just fine by itself. I played the script in vdub64 and it seems to play back fine but there's something that's not right.LoadPlugin("E:\megui64\tools\ffms\ffms2.dll")
LoadPlugin("E:\megui64\tools\avisynth_plugin\LeakKernelDeint.dll")
LoadPlugin("E:\megui64\tools\avisynth_plugin\TDeint.dll")
FFVideoSource("BugsClip.ts", threads=1)
orig=last
telecide(guide=1,order=1,hints=true,post=1)
tdeint(order=1,clip2=orig)
converttoyv12()
I also tried encoding it at both 30fps and 60fps with the same results. Either way though I have to mux it to MKV using 60fps. Please let me know if I need to provide any more info. Thanks again for any help.

Chumbo
6th February 2012, 02:56
About a minute after I hit the post button, I vaguely remembered an issue with h264 material and ffms2. So I did a search and found this link which I'm sure is the cause of my problems here.
http://forum.doom9.org/showthread.php?p=1507010#post1507010

Ironically, the post above was probably precipitated by questions I had asked and had forgotten until now.