Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th April 2020, 09:34   #1  |  Link
magnetite
Registered User
 
Join Date: May 2010
Posts: 64
TDecimate usage inquiry

I was wondering about something. Is using TDecimate worth it if my plasma TV is 60 Hz and my source is 24p with some 30i video sections? Or should I only use TFM for this?
magnetite is offline   Reply With Quote
Old 27th April 2020, 18:13   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
TDecimate has hybrid modes for handling hybrid sources. It'll convert the whole lot to a constant frame rate by adding frames for the film sections or dropping frames for the interlaced sections (using frame blending). It's not ideal but okay if there's only small sections of one type or the other.

If you just use TFM, for the film sections the field matching will result in one frame in 5 being a duplicate and a 29.97fps frame rate. That'll make motion look choppy. TDecimate would normally remove that duplicate frame for 23.976.

There's also a variable frame rate mode. It requires 2 passes. The first is an analysis pass to produce the metrics files so it's pretty fast (many GUI's have an analysis pass mode). A timecodes file is created to use for encoding and the output ends up variable frame rate if you add the timecodes file to the x264 command line. The film sections are decimated to 23.976 and the interlaced sections are de-interlaced as 29.97fps. That's what Handbrake does in VFR mode if you set up the filtering correctly (I don't use it) so if you're not using additional Avisynth filters it might be an easier option.

For TIVTC the first pass for a VFR encode looks something like this:

TFM(Output="D:\TFM Episode1.txt")
TDecimate(Mode=4, Hybrid=2, Output="D:\TDecimate Episode1.txt")

After the analysis pass don't open that script again or it'll clear the txt files and you'll have to run it again.

The second pass for encoding looks like this:

TFM(Input="D:\TFM Episode1.txt")
TDecimate(Mode=5, Hybrid=2, Input="D:\TDecimate Episode1.txt", tfmIn="D:\TFM Episode1.txt", mkvOut="D:\Episode1 Timecodes.txt")

The timecodes file is created as soon as the script is opened so you can add it to the x264 command line even if it doesn't exist yet. You add it to the command line this way:

--tcfile-in "D:\Episode1 Timecodes.txt"

If x264 is writing the output file directly to MKV that's all you need to do. If the output is a raw video stream I think you'll also need to add the timecodes file to MKVToolNixGUI when muxing the output.

Another method is to use a decent bobber such as QTGMC and simply de-interlace the whole thing to 59.94fps progressive. You'll still have extra repeated frames for the film sections but they go by a lot faster and motion should look the same as if you were watching 24p video on a 60Hz display (where some frames display for 3 screen refreshes and some display for 2). When bobbing a telecined source for 59.94fps some frames will be repeated more than once. Something like:
AA BBB CC DDD etc.

Last edited by hello_hello; 27th April 2020 at 18:48.
hello_hello is offline   Reply With Quote
Old 27th April 2020, 19:26   #3  |  Link
magnetite
Registered User
 
Join Date: May 2010
Posts: 64
So to make things simple, I should try the MeGUI deinterlacing feature to determine the source and let it decide what kind of filtering it needs? Every source is different. For a source like 24, it's pretty easy to do, but for something like The Simpsons, it's completely different, because it's not a clean source like 24 is.

I was planning on compressing my media library so I could play it on my tablet while I'm away from home.
magnetite is offline   Reply With Quote
Old 27th April 2020, 19:49   #4  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by magnetite View Post
Or should I only use TFM for this?
The 30i sections can't be field-matched as there are no full frames. They'll only be deinterlaced. So, there's no point in using only TFM. If the amount of 30i sections is substantial, I'd suggest bobbing with QTGMC or similar. If there are only a few video sections, I'd IVTC back to 24p. And if animation, they're often jerky anyway and an IVTC should work out well. Perhaps try TDecimate's Hybrid=1 mode to see what it looks like and if you can live with it.

So, I'd say TFM alone is the worst of the 3 choices.
manono is offline   Reply With Quote
Old 27th April 2020, 22:47   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by magnetite View Post
So to make things simple, I should try the MeGUI deinterlacing feature to determine the source and let it decide what kind of filtering it needs? Every source is different. For a source like 24, it's pretty easy to do, but for something like The Simpsons, it's completely different, because it's not a clean source like 24 is.
I use MeGUI myself, but I'm not sure I'd trust it's analysis completely, especially for animation. It pays to check for yourself too.
Without any de-interlacing, a telecined section should have a pattern of five frames where three are clean and two have combing (they look interlaced), but it's easier to pick for normal video where there's not many repeated frames. Animation has a lot of them, so the telecined fields can appear to combine to make clean frames and mess with the pattern.

https://en.wikipedia.org/wiki/Telecine
The top and bottom fields of telecined "frames", with each letter representing the top and bottom filed of an original progressive frame.

A1 B1 B1 C1 D1
A2 B2 C2 D2 D2

For the telecine pattern above (I think it's correct) the first, second and last frame would normally look progressive and the other two would have combing (appear interlaced), but if the original "C" frame is a duplicate of "B" then the first three frames should appear progressive.

When a source is interlaced, each field is a different moment in time so every frame normally looks combed, but once again repeated frames can mess with that rule.

I'd try manono's suggestion and decimate to 23.976fps (something like "purely film" in the script creator's de-interlacing, or "mostly film" if that causes jerky motion) and play a few sections to see if motion looks okay. If it's just for viewing on a tablet I imagine it doesn't have to be perfect. I also suspect for The Simpsons there's not going to be much of it interlaced. Sometimes it's just the opening or closing credits, or interlaced credits overlaid on telecined animation.

Last edited by hello_hello; 27th April 2020 at 23:18.
hello_hello is offline   Reply With Quote
Old 28th April 2020, 03:52   #6  |  Link
magnetite
Registered User
 
Join Date: May 2010
Posts: 64
Okay I'll try both suggestions and see how it goes.
magnetite is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.