Log in

View Full Version : Re-interlacing a Bobbed Video That's Been Converted To 30fps?


SyntheticEmpathy
15th September 2012, 20:54
Hey,I don't know if this is possible, and will provide a sample later. Basically, I'm testing out a new capture card that captures 480p video. Now for some reason, it looks like it's bob deinterlaced to then converted to 30fps. It wouldn't be a problem if it were bobbed to 60fps without the conversion because I could just re-interlace it using the methods around the forums. It's kind hard to explain lol, but I'll provide an example ASAP.

EDIT: Sample http://imageshack.us/a/img402/3209/fixthis.png

LoRd_MuldeR
15th September 2012, 21:20
30 fps doesn't sound like it has been bobbed.

The term "bobbing" is usually used for deinterlacing techniques that "restore" one progressive frame for each field in the interlaced input. So, for example, from an NTSC video with ~30 interlaced frames (~60 fields) per second we would get 60 progressive frames per second after bobbing, not only 30 fps. Unless your original input was 15 interlaced frames (30 fields) per second, which is VERY uncommon, it obviously has not been bobbed.

My guess would be that a simple "skip field" or "blend" deinterlacing has been applied. If that is the case, you can't re-interlace to 30 interlaced frames (60 fileds) per second, because one half of the temporal information has already been destroyed! Of course it's also possible that the video has first been bobbed and then, at some point, every second frame was dropped/removed. The result would be the same though: One half of the temporal information is gone for good.

(Well, of course you could use some kind of framerate upsampling tool to get 60 progressive frames per second from your 30 progressive frames video and then do the re-interlacing. But it will never be as good as original interlaced source)

SyntheticEmpathy
15th September 2012, 22:50
30 fps doesn't sound like it has been bobbed.

The term "bobbing" is usually used for deinterlacing techniques that "restore" one progressive frame for each field in the interlaced input. So, for example, from an NTSC video with ~30 interlaced frames (~60 fields) per second we would get 60 progressive frames per second after bobbing, not only 30 fps. Unless your original input was 15 interlaced frames (30 fields) per second, which is VERY uncommon, it obviously has not been bobbed.

My guess would be that a simple "skip field" or "blend" deinterlacing has been applied. If that is the case, you can't re-interlace to 30 interlaced frames (60 fileds) per second, because one half of the temporal information has already been destroyed! Of course it's also possible that the video has first been bobbed and then, at some point, every second frame was dropped/removed. The result would be the same though: One half of the temporal information is gone for good.

(Well, of course you could use some kind of framerate upsampling tool to get 60 progressive frames per second from your 30 progressive frames video and then do the re-interlacing. But it will never be as good as original interlaced source)

Knew most of what you said already, but learned a thing or two. Thanks :). Updated the OP.

LoRd_MuldeR
15th September 2012, 23:11
A still image doesn't help much. Please post an unprocessed sample clip (a short sequence should be sufficient).

BTW: Why do you want to re-interlace at all?

SyntheticEmpathy
15th September 2012, 23:17
A still image doesn't help much. Please post an unprocessed sample clip (a short sequence should be sufficient).

http://www.mediafire.com/?f6dok68fcrww2dd

LoRd_MuldeR
15th September 2012, 23:41
That clip is really strange. Most of it looks like progressive frames, but then again there are some frames with obvious interlacing artifacts ("combing") near the end of your clip. Also there is some pretty strong aliasing.

My guess here would be that some "motion adaptive" deinterlacer was used, but it didn't catch all the combing, i.e. it detected some areas as "static" that obviously aren't static and thus we now see the remaining combing in those areas.

Also it looks like in the "non static" areas some pretty bad interpolation method was used, thus the annoying aliasing artifacts that you have marked on your screenshot.

SyntheticEmpathy
15th September 2012, 23:46
That clip is really strange. Most of it looks like progressive frames, but then again there are some frames with obvious interlacing artifacts ("combing") near the end of your clip. Also there is some pretty strong aliasing.

My guess here would be that some "motion adaptive" deinterlacer was used, but it didn't catch all the combing, i.e. it detected some areas as "static" that obviously aren't static and thus we now see the remaining combing in those areas.

Also it looks like in the "non static" areas some pretty bad interpolation method was used, thus the annoying aliasing artifacts that you have marked on your screenshot.

Thanks, is there anything you would recommend doing to fix it?

LoRd_MuldeR
16th September 2012, 00:05
Configure you capturing device (or software) in a way so it doesn't "deinterlace" (screw up) the video anymore. If not possible, look for an alternative capturing device and/or software.

If you really can't get a better recording than what you posted, I don't know if it can be "fixed". By looking at the individual fields of you sample clip, it seems like the "bottom field" has much worse quality (stronger aliasing) compared to the "top field".

So you might try something like NNEDI3(field=1) instead of the usual NNEDI3(field=2) plus Merge(Last.SelectEven(), Last.SelectOdd()) to fight the aliasing. Still doesn't look very good though...

SyntheticEmpathy
16th September 2012, 01:06
Configure you capturing device (or software) in a way so it doesn't "deinterlace" (screw up) the video anymore. If not possible, look for an alternative capturing device and/or software.

If you really can't get a better recording than what you posted, I don't know if it can be "fixed". By looking at the individual fields of you sample clip, it seems like the "bottom field" has much worse quality (stronger aliasing) compared to the "top field".

So you might try something like NNEDI3(field=1) instead of the usual NNEDI3(field=2) plus Merge(Last.SelectEven(), Last.SelectOdd()) to fight the aliasing. Still doesn't look very good though...

Alright thanks. It could be the compression causing it too, since it's MJPEG. I usually record with HuffYUV, UT etc.

Bloax
16th September 2012, 01:54
Since I can't really get my eyes on a lot of detail, here's a quickie:
NNEDI3(2)
Merge(SelectEvery(1,1)).SelectEven()
Merge(SangNom(0,19))

Looks somewhat smudgy, but so does the source. I'm pretty sure there are better solutions though.

SyntheticEmpathy
16th September 2012, 23:47
Configure you capturing device (or software) in a way so it doesn't "deinterlace" (screw up) the video anymore. If not possible, look for an alternative capturing device and/or software.

If you really can't get a better recording than what you posted, I don't know if it can be "fixed". By looking at the individual fields of you sample clip, it seems like the "bottom field" has much worse quality (stronger aliasing) compared to the "top field".

So you might try something like NNEDI3(field=1) instead of the usual NNEDI3(field=2) plus Merge(Last.SelectEven(), Last.SelectOdd()) to fight the aliasing. Still doesn't look very good though...

Okay, there is a mode where I can have it interlaced, but it kind of degrades the quality, and there is a little bit of pink around bright colors. If I can fix that, I would probably be done with the situation.

LoRd_MuldeR
17th September 2012, 00:08
I don't know what you mean. NNEDI3 is a deinterlacing (bobbing) filter, there is no mode to "have it interlaced". Especially because your input, at least the clip you posted, already is (mostly) progressive!

My suggestion was to use NNEDI3 as an "anti-aliasing" filter: Use NNEDI3 in "bob" mode to interpolate one progressive frame from the "top filed" and one from the "bottom field" of each source frame, then blend the odd/even frames together.

Another option to use NNEDI3 here (and maybe the preferable one) would be interpolating progressive frames only from the "top filed" or only from the "bottom field", in which case we don't need the blend (merge) step afterwards.

Re-interlacing from the footage you have posted is impossible, I think. That's because it's 30 fps progressive. The remaining "combing" artifacts that we see on some of the frames don't change this fact ;)

SyntheticEmpathy
17th September 2012, 00:24
I don't know what you mean. NNEDI3 is a deinterlacing (bobbing) filter, there is no mode to "have it interlaced". Especially because your input, at least the clip you posted, already is (mostly) progressive!

My suggestion was to use NNEDI3 as an "anti-aliasing" filter: Use NNEDI3 in "bob" mode to interpolate one progressive frame from the "top filed" and one from the "bottom field" of each source frame, then blend the odd/even frames together.

Another option to use NNEDI3 here (and maybe the preferable one) would be interpolating progressive frames only from the "top filed" or only from the "bottom field", in which case we don't need the blend (merge) step afterwards.

Re-interlacing from the footage you have posted is impossible, I think. That's because it's 30 fps progressive. The remaining "combing" artifacts that we see on some of the frames don't change this fact ;)

My bad, I meant I found a way to have it record as interlaced via the capture card settings, but the ghosting problem still stands. It only happens with vivid colors though.

LoRd_MuldeR
17th September 2012, 15:20
Sounds like some "chroma" issue.

What chroma sub-sampling is used? Only YUV 4:2:2 is "safe" for interlaced video, while YUV 4:2:0, if not used in a special "interlaced" mode (which effectively subsamples each field separately), will "mix" chroma samples that belong to different fields and thus cause chroma artifacts. AFAIK, JPEG commonly uses YUV 4:2:0 sub-sampling (and thus MJPEG too), but I'm not sure it has an "interlaced-friendly" mode for that.

Can you post an unprocessed clip, captured in interlaced mode?

kolak
18th September 2012, 00:46
Try to resize it to half res vertically and upscale back with NNEDI3. Drastic solution but may work.

SyntheticEmpathy
20th September 2012, 03:05
Sounds like some "chroma" issue.

What chroma sub-sampling is used? Only YUV 4:2:2 is "safe" for interlaced video, while YUV 4:2:0, if not used in a special "interlaced" mode (which effectively subsamples each field separately), will "mix" chroma samples that belong to different fields and thus cause chroma artifacts. AFAIK, JPEG commonly uses YUV 4:2:0 sub-sampling (and thus MJPEG too), but I'm not sure it has an "interlaced-friendly" mode for that.

Can you post an unprocessed clip, captured in interlaced mode?

Sorry, but I think I'll just keep recording in 480i component since that works flawlessly for me. There's no point in capturing 480p in interlaced mode, because I wanted to capture in x264vfw to save space(plus 480p gives a sharper picture with slightly more detail). Can't do that with interlaced footage because of chroma subsampling(when it comes to deinterlacing). If you still want to figure it out how to fix the footage I can still provide a sample.