Log in

View Full Version : Family Guy IVTC (19.181 FPS?)


Vitality
22nd October 2018, 21:39
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.

hello_hello
23rd October 2018, 06:06
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.

manono
23rd October 2018, 08:14
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.

Sharc
23rd October 2018, 14:22
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.

Vitality
23rd October 2018, 14:32
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
23rd October 2018, 14:48
Here's the demuxed M2V: https://mega.nz/#!wsV1WArY!bTqpnt-9f7DoF-HtqC5fUuKHdg1OkYplq_fZ5V0fhfg

I had some trouble uploading to here so I decided to use MEGA

videoh
23rd October 2018, 17:24
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.

Vitality
23rd October 2018, 19:49
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?

manono
23rd October 2018, 22:36
How do I do that in StaxRip
If you can't tell StaxRip to perform an IVTC, then surely it allows you to edit the AVS it creates. I don't use it so can't comment further.

And does external IVTC mean I'll have to encode 2 times?

No, it's in the script. One encode only.

How to IVTC it correctly is shown in your other thread:

https://forum.videohelp.com/threads/390616-FPS-Issue-on-MakeMKV-DVD-rip-help

Vitality
24th October 2018, 01:38
If you can't tell StaxRip to perform an IVTC, then surely it allows you to edit the AVS it creates. I don't use it so can't comment further.



No, it's in the script. One encode only.

How to IVTC it correctly is shown in your other thread:

https://forum.videohelp.com/threads/390616-FPS-Issue-on-MakeMKV-DVD-rip-help

I was talking about "Honor Pulldown Flags", but Thank you with explaining external IVTC. Here's my AVS file so far:
LoadPlugin("J:\StaxRip-x64-1.7.0.0-stable\Apps\Plugins\avs\MPEG2DecPlus\MPEG2DecPlus64.dll")
MPEG2Source("K:\Family Guy S01\VIDEO_TS\VTS_01_1_temp\VTS_01_1.d2v")


If I go to Apps > DGIndex in StaxRip, and then Video > Field Operation in DGIndex, "Honor Pulldown Flags" appears to be enabled. But in StaxRip the video says 23.976FPS. How can I apply the pulldown flags to make it 29.97 so I can then IVTC it back to 23.976?

videoh
24th October 2018, 02:35
You should post your issue in the StaxRip support thread. Or at least change your title to include a reference to StaxRip.

https://forum.doom9.org/showthread.php?t=172068

Vitality
24th October 2018, 03:15
You should post your issue in the StaxRip support thread. Or at least change your title to include a reference to StaxRip.

https://forum.doom9.org/showthread.php?t=172068

I can't change my title

manono
24th October 2018, 03:18
If I go to Apps > DGIndex in StaxRip, and then Video > Field Operation in DGIndex, "Honor Pulldown Flags" appears to be enabled. But in StaxRip the video says 23.976FPS

As I said, I don't use StaxRip, although it has a good reputation. You can confirm the field operation used by checking the framerate of the D2V. Open it in Notepad and see what it says beside "Frame_Rate".

What you're looking for prior to the IVTC is:

Field_Operation=0
Frame_Rate=29970 (30000/1001)

If it's really 23.976fps, then either the field operation used was "Forced Film", or it was "Honor Pulldown flags with an IVTC in the script. There are no other choices. If you inadvertently set it for Forced Film, go through the settings to find whatever you did that screwed it up.

Vitality
24th October 2018, 03:20
As I said, I don't use StaxRip, although it has a good reputation. You can confirm the field operation used by checking the framerate of the D2V. Open it in Notepad and see what it says beside "Frame_Rate".

What you're looking for prior to the IVTC is:

Field_Operation=0
Frame_Rate=29970 (30000/1001)

If it's really 23.976fps, then either the field operation used was "Forced Film", or it was "Honor Pulldown flags with an IVTC in the script. There are no other choices.

Field_Operation=1
Frame_Rate=23976 (24000/1001) in my D2V.

manono
24th October 2018, 08:00
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.

Vitality
24th October 2018, 14:34
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:
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.
https://i.imgur.com/CQevZ19.png

hello_hello
24th October 2018, 18:57
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)

https://i.postimg.cc/9MCgzQrm/FG.jpg

videoh
24th October 2018, 19:12
That's why the IVTC filters do postprocessing.

Vitality
24th October 2018, 19:42
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)

https://i.postimg.cc/9MCgzQrm/FG.jpg

I knew this DVD was trash

hello_hello
24th October 2018, 19:43
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.php?p=1848202#post1848202
TDeint here:
http://www.avisynth.nl/index.php/TDeint
I've no idea how to add them to StaxRip.

https://i.postimg.cc/vT8L9PRk/FG2.jpg

manono
24th October 2018, 19:49
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.

Vitality
24th October 2018, 19:51
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.php?p=1848202#post1848202
TDeint here:
http://www.avisynth.nl/index.php/TDeint
I've no idea how to add them to StaxRip.

https://i.postimg.cc/vT8L9PRk/FG2.jpg

Would this work with QTGMC?

hello_hello
24th October 2018, 20:12
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.

https://i.postimg.cc/9F1RrGBR/FG3.jpg

hello_hello
24th October 2018, 20:29
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

Vitality
24th October 2018, 21:36
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.

manono
25th October 2018, 00:46
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.

Vitality
25th October 2018, 03:11
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.

Import("J:\StaxRip-x64-1.7.0.0-stable\Apps\DeinterlaceTool.avsi")
Import("J:\StaxRip-x64-1.7.0.0-stable\Apps\Srestore.avsi")
QTGMC(Preset="Slower", FPSDivisor=2)
Srestore(frate=23.976)


Do you know why it's saying "GScriptCilp" doesn't exist? I tried to install GScript and GRunT but they are 32bit. StaxRip x86 doesn't exist.

manono
25th October 2018, 04:31
You might not want to use FPSDivisor=2 because that limits the choice of frames from which SRestore can choose. However, if you can remove that chroma nastiness doing it that way, then more power to you. But I still wouldn't do it.

I use all 32 bit and don't have that problem. The last StaxRip 32-bit version can be found here:

https://www.videohelp.com/software/StaxRip

Scroll down a ways. Or use an older version of Srestore that doesn't require that GScript stuff (before v2.7f).

Vitality
25th October 2018, 14:41
You might not want to use FPSDivisor=2 because that limits the choice of frames from which SRestore can choose. However, if you can remove that chroma nastiness doing it that way, then more power to you. But I still wouldn't do it.

I use all 32 bit and don't have that problem. The last StaxRip 32-bit version can be found here:

https://www.videohelp.com/software/StaxRip

Scroll down a ways. Or use an older version of Srestore that doesn't require that GScript stuff (before v2.7f).

Any other ways to make the frame rate stay at 23 instead of 47? and

manono
25th October 2018, 19:45
Install a 32-bit version of AviSynth and do the "IVTC" outside of StaxRip. Or let those few frames of chroma nastiness remain after being IVTC'd within StaxRip. It's not as if you or anyone else will notice it when played at full speed. Or ask the developer to make it possible for you to use SRestore within his program. He can be found in the MPEG-4 Encoder GUIs Forum (https://forum.doom9.org/forumdisplay.php?f=78) here on Doom9

Vitality
25th October 2018, 20:32
Install a 32-bit version of AviSynth and do the "IVTC" outside of StaxRip. Or let those few frames of chroma nastiness remain after being IVTC'd within StaxRip. It's not as if you or anyone else will notice it when played at full speed. Or ask the developer to make it possible for you to use SRestore within his program. He can be found in the MPEG-4 Encoder GUIs Forum (https://forum.doom9.org/forumdisplay.php?f=78) here on Doom9

Yeah I give up, the chroma frames aren't really noticeable. I'll just IVTC and apply QTGMC/Dehalo Alpha. This DVD sucks. From what I've read FG is a "early" digital cartoon so some of the S01 episodes have issues, but S02 and later look better. It's not worth the work just to fix a few frames. Thanks for your help

DJ-1
4th January 2019, 14:05
Hi, I'm too looking at ripping Family Guy DVDs, I have some region 1(US) & some UK Pal versions..

From reading this, with the US versions either
Tdeint & decimate

Or
Qtgmc (default profile) & sRestore
?

What about the Pal ones, has anyone encountered those?
I wonder if its harder to sort out than the US ones..

Cheers.

Sent from my HTC_M10h using Tapatalk

manono
4th January 2019, 19:12
Post a sample taken from the DVD.

DJ-1
8th January 2019, 21:38
hi, sorry for the delay, a sample from PAL Dvd...

https://www.dropbox.com/s/1truc94o81qsoj7/VTS_01_1_0_4.vob?dl=0

Cheers.

manono
9th January 2019, 01:10
The content is progressive. It was even encoded as progressive, unusual for PAL. They're probably better than the NTSC versions, based purely on that sample.

DJ-1
17th January 2019, 22:05
Sorry for the long delay, ripped all the 1 5 seasons before getting any more samples..
seems to be more stuff going on with the early seasons, much more noticeable

i got a few random sample

season 1 disc 1: https://www.dropbox.com/s/uwmx4vdu9qkdqlt/season%201%20dvd%20disc%201.VOB?dl=0

Seeason 2 disc 2 :https://www.dropbox.com/s/wss340axbvpjokq/season%202%20dvd%20disc%202.VOB?dl=0

Season 3 disc 2: https://www.dropbox.com/s/wss340axbvpjokq/season%202%20dvd%20disc%202.VOB?dl=0

Season 4 disc 3: https://www.dropbox.com/s/c18fmnfxq45qxgt/season%204%20dvd%20disc%203.vob?dl=0

cheers.

manono
18th January 2019, 03:52
I only looked at the first one. It seems to be field-blended, so you bob it followed by using SRestore, something like:

QTGMC()
Srestore()

DJ-1
21st January 2019, 16:37
Ok..thanks.

I do also have (brother) access to the US versions.
But weren't sure which was better..

Ended up testing with Vaporsynth (since avisynth sResore horrendously slow)

Qtgmc @ Slower (default) preset + double FPS output, & then sRestore 23.976

Is this fairly safe for most instances here ? i.e: hard or soft blends, as form what I can tell looking through this seems there's a mixture.

Thanks.

Sent from my Pixel using Tapatalk

manono
22nd January 2019, 00:21
I don't know what "hard or soft blends" means. I've never used VapourSynth. SRestore is not "horrendously slow". QTGMC might be, but not SRestore.

Only a sample will prove useful.

DJ-1
22nd January 2019, 08:37
Sorry, should have been more clear, I meant hard & soft telcline...
I assume theres gonna be setting s individual to each individual episodes on some of these us versions?

& Yes, probably due to setup not being right, & not knowing how to get around it, sRestore (avisynth) isnt using all CPU resource..
I'm using the Hybrid GUI & Vaporsynth is just another option.

I don't have any samples of the US DVDs only the ripped .mkvs (from makemkv)
But from the episode I gave some else last night (since I was getting audio drift thought the duration of output file, using the qtgmc +sRestore) but suggesting that not deinterlace, but to Avisynth-Tfm

Thanks

Sent from my Pixel using Tapatalk