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 > General > Newbies
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd October 2018, 21:39   #1  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Family Guy IVTC (19.181 FPS?)

I'm encoding Family Guy to x265 in StaxRip. Here's the VOB of my source (S01E03): https://hastebin.com/ucuwurebix.pl. When IVTC was applied to S01E01 the FPS was 23.976. But on S01E02 and afterwards if IVTC is applied, the frame rate becomes 19.181 FPS. So, should I IVTC? Will 19FPS cause bad motion? I am kinda confused here.

Last edited by Vitality; 22nd October 2018 at 21:42.
Vitality is offline   Reply With Quote
Old 23rd October 2018, 06:06   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by Vitality View Post
I'm encoding Family Guy to x265 in StaxRip. Here's the VOB of my source (S01E03): https://hastebin.com/ucuwurebix.pl. When IVTC was applied to S01E01 the FPS was 23.976. But on S01E02 and afterwards if IVTC is applied, the frame rate becomes 19.181 FPS. So, should I IVTC? Will 19FPS cause bad motion? I am kinda confused here.
Telecine (or pulldown) is a way of increasing the (almost) film frame rate of 23.976fps to 29.970fps by repeating fields.
https://en.wikipedia.org/wiki/Three-two_pull_down
It can be encoded that way (hard-telecine), or it can be encoded at 23.976fps and a DVD player would apply the pulldown on playback (soft telecine). DVDs were originally designed to be displayed on an interlaced display at 29.970fps, or more correctly, at 59.940 "fields" per second. When it's encoded or decoded with pulldown, IVTC reverses the process to give you the original 23.976 progressive video.

If it's 100% soft-telecine, it can simply be decoded at 23.976fps, ignoring the repeat field flags that'd normally cause pulldown to be applied on playback, so no, you wouldn't apply IVTC.

That's assuming it is 100% soft telecine, which in your case it appears to be. DVDs can be a mixture of soft telecine, hard telecine and interlaced video. It's not unusual for an episode of a TV show to contain a mixture of all three, in which case after applying IVTC to the telecined sections, and de-interlacing the interlaced sections, it'd normally be converted to a common frame rate. For example, if it's mostly progressive "film", the TIVTC plugin can apply IVTC to the "film" sections, de-interlace any video sections to 29.970fps, and then convert them from 29.970fps to 23.976fps by dropping/blending frames if it's configured correctly. I don't use StaxRip so I don't know how you'd go about determining the source type correctly or configuring TIVTC.

It's also not unusual for one episode to be encoded with pulldown, or a mixture of hard and soft pulldown and video sections, while another episode is different.

Last edited by hello_hello; 23rd October 2018 at 06:12.
hello_hello is offline   Reply With Quote
Old 23rd October 2018, 14:32   #3  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by hello_hello View Post
Telecine (or pulldown) is a way of increasing the (almost) film frame rate of 23.976fps to 29.970fps by repeating fields.
https://en.wikipedia.org/wiki/Three-two_pull_down
It can be encoded that way (hard-telecine), or it can be encoded at 23.976fps and a DVD player would apply the pulldown on playback (soft telecine). DVDs were originally designed to be displayed on an interlaced display at 29.970fps, or more correctly, at 59.940 "fields" per second. When it's encoded or decoded with pulldown, IVTC reverses the process to give you the original 23.976 progressive video.

If it's 100% soft-telecine, it can simply be decoded at 23.976fps, ignoring the repeat field flags that'd normally cause pulldown to be applied on playback, so no, you wouldn't apply IVTC.

That's assuming it is 100% soft telecine, which in your case it appears to be. DVDs can be a mixture of soft telecine, hard telecine and interlaced video. It's not unusual for an episode of a TV show to contain a mixture of all three, in which case after applying IVTC to the telecined sections, and de-interlacing the interlaced sections, it'd normally be converted to a common frame rate. For example, if it's mostly progressive "film", the TIVTC plugin can apply IVTC to the "film" sections, de-interlace any video sections to 29.970fps, and then convert them from 29.970fps to 23.976fps by dropping/blending frames if it's configured correctly. I don't use StaxRip so I don't know how you'd go about determining the source type correctly or configuring TIVTC.

It's also not unusual for one episode to be encoded with pulldown, or a mixture of hard and soft pulldown and video sections, while another episode is different.
Sorry I mean it's the MediaInfo for the VOB.
Vitality is offline   Reply With Quote
Old 23rd October 2018, 14:48   #4  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Here's the demuxed M2V: https://mega.nz/#!wsV1WArY!bTqpnt-9f...Yplq_fZ5V0fhfg

I had some trouble uploading to here so I decided to use MEGA
Vitality is offline   Reply With Quote
Old 23rd October 2018, 17:24   #5  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Thank you for the sample. It's a mix of hard and soft pulldown. You will have to make your project with Honor Pulldown Flags and then do external IVTC.

Last edited by videoh; 23rd October 2018 at 23:13.
videoh is offline   Reply With Quote
Old 23rd October 2018, 19:49   #6  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by videoh View Post
It's a mix of hard and soft pulldown. You will have to make your project with Honor Pulldown Flags and then do external IVTC.
How do I do that in StaxRip. And does external IVTC mean I'll have to encode 2 times? Won't that reduce video quality?

Last edited by Vitality; 23rd October 2018 at 21:49.
Vitality is offline   Reply With Quote
Old 23rd October 2018, 08:14   #7  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by Vitality View Post
I'm encoding Family Guy to x265 in StaxRip. Here's the VOB of my source (S01E03):
All I see when clicking the link is a bunch of text. Did I misunderstand you, or did I do something wrong to get the VOB? Please upload a portion of a real VOB or an M2V extracted from that VOB. DGIndex can easily extract a 10 second or so piece from the VOB. If that text file is all there is so far then, 1) it's not a VOB, and 2) it's less than useless for determining what you have and how to treat it.

The way you get 19.181fps is to 1) wrongly set the Field Operation of DGIndex to Forced Film (which gives 23.976fps already) followed by applying an IVTC to that. Depending on your source, you might do one or the other, but not both. If intending to perform an IVTC you set the Field Operation for "Honor Pulldown Flags" which gives you a 29.97fps D2V project file, followed by performing the IVTC on that.

If the episode is 100% film as determined by DGIndex, you can set the field order to "Forced Film", save the D2V project file, and you're done. No IVTC needed.

Last edited by manono; 23rd October 2018 at 08:18.
manono is offline   Reply With Quote
Old 23rd October 2018, 14:22   #8  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by Vitality View Post
I'm encoding Family Guy to x265 in StaxRip. Here's the VOB of my source (S01E03): https://hastebin.com/ucuwurebix.pl. When IVTC was applied to S01E01 the FPS was 23.976. But on S01E02 and afterwards if IVTC is applied, the frame rate becomes 19.181 FPS. So, should I IVTC? Will 19FPS cause bad motion? I am kinda confused here.
I am not familiar with StaxRip and the tools which it uses, but if I remember correctly there is a caveat with TSMUXER:
When pulldown flags of clip 1 get removed the framerate is correctly set to 23.976fps. But when the next clip 2 is hard telecined i.e. no pulldown flags, then the framerate of TSMUXER has to be explicitly reset to 29.97 in the CLI. Otherwise it will assume by default that the underlying film is 19.181.
Simply said, it's safe to always set the correct framerate explicitly in TSMUXER.

Last edited by Sharc; 23rd October 2018 at 14:54. Reason: typo
Sharc is offline   Reply With Quote
Old 24th October 2018, 08:00   #9  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Make your own, then, with the Field Operaton set for "Honor Pulldown Flags". Except I think you might have messed up something in StaxRip. Or else StaxRip chooses what settings to use by just checking that first frame that says "Progressive". If so, that's a very bad idea.

You can even edit the D2V to make it 29.97fps, but ... never mind. Don't. Create a fresh one.
manono is offline   Reply With Quote
Old 24th October 2018, 14:34   #10  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by manono View Post
Make your own, then, with the Field Operaton set for "Honor Pulldown Flags". Except I think you might have messed up something in StaxRip. Or else StaxRip chooses what settings to use by just checking that first frame that says "Progressive". If so, that's a very bad idea.

You can even edit the D2V to make it 29.97fps, but ... never mind. Don't. Create a fresh one.
So I created a new D2V in DGIndex with "Honor Pulldown Flags" enabled, and got this:
Code:
Field_Operation=0
Frame_Rate=29970 (30000/1001)
When I set the IVTC filter (replaced the IVTC code with your code you gave me on VideoHelp) the framerate didn't go to 19.181. It went to 23.976. I'm doing an "Ultra Fast" x264 encode to see if this actually worked.

EDIT: There appears to be interlacing still, even after IVTC was applied. I added QTGMC and there is some "minor" ghosting.

Last edited by Vitality; 24th October 2018 at 16:57.
Vitality is offline   Reply With Quote
Old 24th October 2018, 19:49   #11  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by Vitality;1855909...
the framerate didn't go to 19.181. It went to 23.976
Which is the way it's supposed to be. Making progress.

I'm not sure to what you're referring when you say "There appears to be interlacing still". If the uneven line along his collar, that's not interlacing and might be fixed by a line darkener. If you mean the "colors outside the lines" there are chroma settings to try. You're getting the chroma from the previous or next frames in the current frames. I expect you'd get the same results even if you had StaxRip do the job.
manono is offline   Reply With Quote
Old 24th October 2018, 18:57   #12  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
What appears to be de-interlacing problems is actually baked into the individual fields. The IVTC/De-interlacing isn't causing it. I don't know how you'd go about fixing it. Someone may have a clever idea.

DGDecode_mpeg2source("D:\VTS_01_1.demuxed.d2v")

A=last.SeparateFields().Info()
B=A.SelectOdd()
C=A.SelectEven()
StackVertical(C,B)

hello_hello is offline   Reply With Quote
Old 24th October 2018, 19:12   #13  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
That's why the IVTC filters do postprocessing.
videoh is offline   Reply With Quote
Old 24th October 2018, 19:42   #14  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by hello_hello View Post
What appears to be de-interlacing problems is actually baked into the individual fields. The IVTC/De-interlacing isn't causing it. I don't know how you'd go about fixing it. Someone may have a clever idea.

DGDecode_mpeg2source("D:\VTS_01_1.demuxed.d2v")

A=last.SeparateFields().Info()
B=A.SelectOdd()
C=A.SelectEven()
StackVertical(C,B)

I knew this DVD was trash
Vitality is offline   Reply With Quote
Old 24th October 2018, 19:43   #15  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
This is the best I've managed to come up with. It's simple, but removes most of the blended chroma, or whatever the cause is. I'm not quite sure I understand why it works yet, but.... make sure DGDecode is honouring pulldown flags (outputting 29.970fps).

mpeg2source("D:\VTS_01_1.demuxed.d2v")
TDeint(mode=1)
FixBlendX(1)

The FixBlend function is here:
https://forum.doom9.org/showthread.p...02#post1848202
TDeint here:
http://www.avisynth.nl/index.php/TDeint
I've no idea how to add them to StaxRip.


Last edited by hello_hello; 24th October 2018 at 20:15.
hello_hello is offline   Reply With Quote
Old 24th October 2018, 19:51   #16  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by hello_hello View Post
This is the best I've managed to come up with. It's simple, but removes most of the blended chroma, or whatever the cause is. I'm not quite sure I understand why it works yet, but.... make sure DGDecode is honouring pulldown flags (outputting 29.970fps).

mpeg2source("D:\VTS_01_1.demuxed.d2v")
TDeint(mode=1)
FixBlendX(1)

The FixBlend function is here:
https://forum.doom9.org/showthread.p...02#post1848202
TDeint here:
http://www.avisynth.nl/index.php/TDeint
I've no idea how to add them to StaxRip.

Would this work with QTGMC?
Vitality is offline   Reply With Quote
Old 24th October 2018, 20:12   #17  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by Vitality View Post
Would this work with QTGMC?
QTGMC doesn't always work well with animation, probably because it has lots of repeated frames. When I replaced TDeint with QTGMC, I found an artefact pretty quickly. See the ghosting under Peter's chin in the pic below.
Plus TDeint() seems to do field matching, which is mostly what's needed here. It doesn't de-interlace unless it has to. The TDeint(mode=1) output is much like TFM(), only it repeats frames for double the frame rate. It doesn't produce jagged lines and edges as Yadif(mode=1) would.

FixBlendX() works in a fixed pattern, so if there's not a fixed pattern of blending (or whatever it is) it mightn't work for the whole video and you'll have to split it into sections.
You could try SRestore() instead, but I thought it was dropping frames it shouldn't in this case (Edit, that's incorrect. See the next post). Or there's AnimeIVTC(). I haven't used it much myself.


Last edited by hello_hello; 24th October 2018 at 20:49.
hello_hello is offline   Reply With Quote
Old 24th October 2018, 20:29   #18  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
I'll take back what I said about SRestore(). I did a side by side comparison with FixBlendX(1) and they were outputting the same frames. I obviously didn't combine SRestore with the right field matching or de-interlacing earlier. This should work just as well.

mpeg2source("D:\VTS_01_1.demuxed.d2v")
TDeint(mode=1)
SRestore(24.0/1.001)

http://avisynth.nl/index.php/Srestore

Last edited by hello_hello; 24th October 2018 at 21:19.
hello_hello is offline   Reply With Quote
Old 24th October 2018, 21:36   #19  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by hello_hello View Post
I'll take back what I said about SResore(). I did a side by side comparison with FixBlendX(1) and they were outputting the same frames. I obviously didn't combine SRestore with the right field matching or de-interlacing earlier. This should work just as well.

mpeg2source("D:\VTS_01_1.demuxed.d2v")
TDeint(mode=1)
SRestore(24.0/1.001)

http://avisynth.nl/index.php/Srestore
If I ran TDeint and then QTGMC would it screw things up? Because I have "viberating" frames in the source and QTGMC seems to fix that while TDeint didn't.
Vitality is offline   Reply With Quote
Old 25th October 2018, 00:46   #20  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Well, I tried to fix it using an IVTC and got nowhere. However, I was able to fix it using:

MPEG2Source("Test.d2v")
QTGMC()
Srestore(frate=23.976)


See if that works for you. You might be able to use a faster preset to make the encoding faster. I just used the default setting for QTGMC. QTGMC also has the added advantage of maybe fixing (or improving) the "vibrating" of which you wrote.
Attached Images
 

Last edited by manono; 25th October 2018 at 00:49.
manono is offline   Reply With Quote
Reply


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 21:36.


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