Detelecine & then 2-3 pull-down

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
markfilipak
Regular User
Posts: 109
Joined: Thu Aug 01, 2019 8:58 pm

Detelecine & then 2-3 pull-down

Post by markfilipak » Fri Aug 02, 2019 3:36 am

Greets! I'm new. This is my 1st post. It's good to be here. HandBrake is awsome.

Description of problem or question:
If I detelecine an i29.97 movie within a custom preset that makes an i29.97 mp4, does HB do standard 2-3 pull-down or does it do any fancy blending? Can it be persuaded to do some fancy field blending?

HandBrake version (e.g., 1.0.0):
1.2.2 (2019022300)

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Win10-1803

Warm Regards,
Mark.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5441
Joined: Sat Feb 09, 2008 7:21 pm

Re: Detelecine & then 2-3 pull-down

Post by JohnAStebbins » Fri Aug 02, 2019 3:47 pm

If the source is hard telecined, there is no need to do field blending. The detelecine filter recombines fields to produce the original progressive frames. You do need to set the output framerate to 23.976 if doing constant framerate output. HandBrake's default variable framerate output is also fine. Blending is something you might want for interlaced (not telecined) content and HandBrake's deinterlace filters do various types of interpolation and blending.

There isn't much video out there that is hard telecined though. So it's rare that you would need this filter at all. Most telecined video is *soft* telecined, meaning there are flags in the data that tell you what fields to combine to reconstruct the progressive frames. No fancy filtering required.

markfilipak
Regular User
Posts: 109
Joined: Thu Aug 01, 2019 8:58 pm

Re: Detelecine & then 2-3 pull-down

Post by markfilipak » Sat Aug 03, 2019 7:32 am

Hi John, Good to meet you.
JohnAStebbins wrote:
Fri Aug 02, 2019 3:47 pm
If the source is hard telecined, there is no need to do field blending.
Can you define hard telecined?
The detelecine filter recombines fields to produce the original progressive frames.
The source is 16:9-480i29.97. I enabled IVTC and was surprised that the resulting MP4 was 16:9-480i29.97. Then I realized that my preset had Video:Framerate:'Same as source' -- oops. I set Framerate to 23.976 and produced a 16:9-480p23.976 MP4 that looks terrific in VLC and is tiny, tiny, tiny. (For some reason, PowerDVD converts it to i29.97 during playback & smears background pans -- hahaha...)
You do need to set the output framerate to 23.976 if doing constant framerate output. HandBrake's default variable framerate output is also fine. Blending is something you might want for interlaced (not telecined) content and HandBrake's deinterlace filters do various types of interpolation and blending.
Well, I architected a 2-3 pull-down scheme that does some field blending (similar to mean, but much simpler & faster) and I'd love to be able to test it to see whether it defeats motion object combing but I don't have any low-level authoring tools. I hoped that I could use HB with IVTC 'ON', dump 10 seconds of raw frames, then apply my blending scheme, then use HB to encode i30 from the raw frames, but I guess HB can't do that.
There isn't much video out there that is hard telecined though. So it's rare that you would need this filter at all.
When you wrote "this filter", did you mean IVTC or deinterlace?
Most telecined video is *soft* telecined, meaning there are flags in the data that tell you what fields to combine to reconstruct the progressive frames. No fancy filtering required.
...That's if I want p24 output, but what if I want i30 output for compatability reasons. Then, I do need fancy filtering, don't I?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5441
Joined: Sat Feb 09, 2008 7:21 pm

Re: Detelecine & then 2-3 pull-down

Post by JohnAStebbins » Sat Aug 03, 2019 6:32 pm

Can you define hard telecined?
Hard telecine simply lacks the flags in the data stream to tell the software how to reconstruct progressive frames. Telecine content has a detectable pattern of combing in some frames. The detelecine filter finds a few combed frames, locks to the pattern and reverses the telecine to create progressive frames.
The source is 16:9-480i29.97. I enabled IVTC and was surprised that the resulting MP4 was 16:9-480i29.97
HandBrake doesn't change the framerate automatically when the detelecine filter is enabled because the filter can be used on a non-telecined NTSC source without harming the output. HandBrake used to have some presets that had detelecine enabled by default. Since HandBrake's default framerate mode is "variable", if the filter deteced telecine and converted it HandBrake's variable framerate output handled the change in framerate transparently. So for example you can create a generic preset for NTSC interlaced content that enabled both the detelecine filter and the decomb filter with variable framerate enabled and HandBrake would do the right thing regardless of whether the source is progressive, soft telecine, hard telecine or interlaced content. If the source is not hard telecine, the detelecine filter doesn't do anything. If the source is not interlaced, the decomb filter doesn't do anything.
Well, I architected a 2-3 pull-down scheme that does some field blending ... and I'd love to be able to test it to see whether it defeats motion object combing
If the source is telecined, there is no motion object combing, period, full stop. telecined content *is* progressive once the telecine is reversed. There is *no* combing. If you are seeing combing, then either detelcine failed, or the source is not telecined.
When you wrote "this filter", did you mean IVTC or deinterlace?
detelecine, since that is the filter you would use with hard telecined sources
That's if I want p24 output, but what if I want i30 output for compatability reasons. Then, I do need fancy filtering, don't I?
If you require i30 output, HandBrake isn't the right tool. HandBrake can be coaxed into creating interlaced output with special flags passed to the encoder, but HandBrake's pipeline is designed to produce progressive output. If the source is soft telecined, HandBrake will always convert it to progressive frames and the original telecine pattern is lost. HandBrake has no filter to re-telecine it.

markfilipak
Regular User
Posts: 109
Joined: Thu Aug 01, 2019 8:58 pm

Re: Detelecine & then 2-3 pull-down

Post by markfilipak » Sat Aug 03, 2019 9:08 pm

Thank you for your insightful response, John.
JohnAStebbins wrote:
Sat Aug 03, 2019 6:32 pm
Can you define hard telecined?
Hard telecine simply lacks the flags in the data stream to tell the software how to reconstruct progressive frames. Telecine content has a detectable pattern of combing in some frames.
I've seen that pattern form in my architectural models (and in actual video of course). Hmm... "hard telecine". I get it. Thanks! I'll add "hard telecine" to my documentation.
The detelecine filter finds a few combed frames, locks to the pattern and reverses the telecine to create progressive frames.
You know, I thought that HB must be doing that. Thanks for the confirmation.
Aside: It's unfortunate that some processes, for example, telecine, are called "filters". I was taught (a long time ago) that filters are static whereas processes are dynamic. Now I read expressions like "dynamic filter" that actually refer to processes -- I initially found that confusing.
Well, I architected a 2-3 pull-down scheme that does some field blending ... and I'd love to be able to test it to see whether it defeats motion object combing
If the source is telecined, there is no motion object combing, period, full stop.
Correct me, please. I've always thought that "2-3 pull-down" is synonymous with "NTSC telecine".
Before telecine: p24 = frame[ A/a ] frame[ B/b ] frame[ C/c ] frame[ D/d ].
After telecine: p30 = frame[ A/a ] frame[ B/b ] frame[ B/c ] frame[ C/d ] frame[ D/d ].
Aside: It's the [ B/c ] & [ C/d ] frames (and fields) that produce the motion-object combing. It's especially the temporal proximity of field[ B ] immediately followed by field[ d ] that produces the perceived comb.
Or do I have that wrong?
... telecined content *is* progressive once the telecine is reversed. ...
Again, correct me, please. I thought that once an i30 is detelecined (aka IVTC) to p24, it's no longer telecined. Um... Now that I think on it, I guess "detelecined" makes sense: As referring to a formerly telecined video.
... There is *no* combing. If you are seeing combing, then either detelcine failed, or the source is not telecined.
Yes, of course, p24 can't exhibit combing. I was referring to the p24-to-i30 (telecine) process.
... If you require i30 output, HandBrake isn't the right tool.
Hmmm... It seems to do the job. What would be better?
HandBrake can be coaxed into creating interlaced output with special flags passed to the encoder, but HandBrake's pipeline is designed to produce progressive output.
Well, that's good information. Thanks.
If the source is soft telecined, HandBrake will always convert it to progressive frames and the original telecine pattern is lost. HandBrake has no filter to re-telecine it.
Well, i30-to-p24 followed by p24-to-i30 seemed to work for me. Can you illuminate to me why it worked?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5441
Joined: Sat Feb 09, 2008 7:21 pm

Re: Detelecine & then 2-3 pull-down

Post by JohnAStebbins » Sat Aug 03, 2019 9:18 pm

Correct me, please. I've always thought that "2-3 pull-down" is synonymous with "NTSC telecine".
Before telecine: p24 = frame[ A/a ] frame[ B/b ] frame[ C/c ] frame[ D/d ].
After telecine: p30 = frame[ A/a ] frame[ B/b ] frame[ B/c ] frame[ C/d ] frame[ D/d ].
Aside: It's the [ B/c ] & [ C/d ] frames (and fields) that produce the motion-object combing. It's especially the temporal proximity of field[ B ] immediately followed by field[ d ] that produces the perceived comb.
Or do I have that wrong?
Perhaps just a difference in perspective here. To me, telecine is completely reversible and pointless to keep. Once you've reversed it, you have progressive frames. There are no combing artefacts to remove once telecine has been reversed. I view telecined content as progressive because the original source content was progressive and the telecine process is 100% reversible. i.e. telecine is just one alternative way of encoding progressive frames.

If you are going to keep the content at i30, don't touch it with a filter. Leave the original telecine as pristine as possible so that it can be detelecined by the player if the playback environment supports display of progressive frames. If the playback environment is interlaced, then the original telecine is already optimal for that environment.

markfilipak
Regular User
Posts: 109
Joined: Thu Aug 01, 2019 8:58 pm

Re: Detelecine & then 2-3 pull-down

Post by markfilipak » Sat Aug 03, 2019 10:41 pm

JohnAStebbins wrote:
Sat Aug 03, 2019 9:18 pm
Correct me, please. I've always thought that "2-3 pull-down" is synonymous with "NTSC telecine".
Before telecine: p24 = frame[ A/a ] frame[ B/b ] frame[ C/c ] frame[ D/d ].
After telecine: p30 = frame[ A/a ] frame[ B/b ] frame[ B/c ] frame[ C/d ] frame[ D/d ].
Aside: It's the [ B/c ] & [ C/d ] frames (and fields) that produce the motion-object combing. It's especially the temporal proximity of field[ B ] immediately followed by field[ d ] that produces the perceived comb.
Or do I have that wrong?
Perhaps just a difference in perspective here. To me, telecine is completely reversible and pointless to keep.
Well, I'm creating p24 MP4s as compact, portable versions (2.5GB for the p24 MP4 v. 5.6GB for the main feature's VOBs). The p24 MP4s look wonderful in VLC. But if I feed p24 MP4 to PowerDVD, PowerDVD converts it to i30 for playback, and does a lousy job, and the result is awful.
Once you've reversed it, you have progressive frames.
Indeed.
If you are going to keep the content at i30, don't touch it with a filter.
The i30 is a DVD.
Leave the original telecine as pristine as possible so that it can be detelecined by the player if the playback environment supports display of progressive frames.
VLC judders hugely when fed i30. I don't know why. Judder can't be caused by IVTC, so it's a mystery to me. I think that the VLC devs have screwed their buffer maintenance. Aside: The 3.x.x versions of VLC just crash immediately on DVD playback and the devs seem unable fix it.
If the playback environment is interlaced, then the original telecine is already optimal for that environment.
Yes, when played by PowerDVD. I create p24 MP4s for size. So my home theater options are p24 MP4s played by VLC or i30 DVD-ISOs played by PowerDVD. I can live with that, though storing both somewhat defeats the purpose of having a media server.

To wrap up this thread:
1 - Thanks for giving me more insight into what HB does.
2 - I'd hoped to do this: i30-to-p24 followed by experimentation followed by p24-to-i30, but I don't have the tool set to support that workflow and HB can't help me.

Warm Regards, and Thanks Again.

markfilipak
Regular User
Posts: 109
Joined: Thu Aug 01, 2019 8:58 pm

Re: Detelecine & then 2-3 pull-down

Post by markfilipak » Sat Aug 03, 2019 10:56 pm

PS: The frame blending I wanted to try is simply this:
i30 = frame[ AA/aa ] frame[ AB/bb ] frame[ BC/bc ] frame[ CC/cd] frame[ DD/dd]
That blending actually decreases perceived combing (I think), and it makes perceived frame & field timing perfect (instead of 80%-120%).
That blending should be very quick (as opposed to more 'fancy' processing) and should look wonderful. Oh, well. Seems I can't go any further.

Post Reply