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 14th January 2021, 00:57   #1  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Does Frame Rate Matter?

I've been doing some deeper diving into improving play of hybrid TV episodes and found that using TDecimate(Cycle=10,CycleR=1) does the trick for some of these episodes. Of course, this decimates only 10% of an NTSC video, leaving an fps of 26.973. It gives uniformly smooth playback and no sync issues.

Is there any issue leaving these videos at 26.973 frame rates?

Incidentally, I've tried TDecimate(hybrid=1), TDecimate(hybrid=3) and TDecimate(Mode=2,Cycle=10,CycleR=1), but all of these generate inferior results.

Last edited by Danette; 14th January 2021 at 00:59.
Danette is offline   Reply With Quote
Old 14th January 2021, 01:25   #2  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by Danette View Post

Is there any issue leaving these videos at 26.973 frame rates?
For playback on a computer? No issues that I can think of.

These are from DVDs? Out of curiosity, do you have a sample we can see?
manono is offline   Reply With Quote
Old 14th January 2021, 01:26   #3  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
That is a super weird framerate so there is lots of potential for incompatibility with non-PC devices.

Also, those of us who care about judder have solutions for normal frame rates that might not work for that, but I assume this is a non-issue given the way this source was created (this level of judder is likely baked in already). madVR's smooth motion would work.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 14th January 2021, 03:22   #4  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Quote:
Originally Posted by manono View Post
For playback on a computer? No issues that I can think of.

These are from DVDs? Out of curiosity, do you have a sample we can see?
Seems to work on a TV. Yes, these are from DVD's. This particular series has numerous challenges that have proven very interesting.

Sample: https://www.mediafire.com/file/aw4ts...ack01.m2v/file

This sample seems to have a 5-5 pattern.

Last edited by Danette; 14th January 2021 at 03:29.
Danette is offline   Reply With Quote
Old 14th January 2021, 06:05   #5  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by Danette View Post
I've been doing some deeper diving into improving play of hybrid TV episodes and found that using TDecimate(Cycle=10,CycleR=1) does the trick for some of these episodes. Of course, this decimates only 10% of an NTSC video, leaving an fps of 26.973. It gives uniformly smooth playback and no sync issues.

Is there any issue leaving these videos at 26.973 frame rates?
Why are you doing this??

Hybrid TV means that a portion of the show is filmed (24 fps) and then telecine is added to have it show at 30 fps. Other parts of the show (often the credits) are at 30 fps interlaced.

Applying:

TDecimate(Cycle=10,CycleR=1)

is going to butcher both the film content as well as the true video. You will end up with some really weird cadences, I would think. Watch carefully on any scenes where the camera pans horizontally. That should show any problems.

Last edited by tebasuna51; 15th January 2021 at 00:18.
johnmeyer is offline   Reply With Quote
Old 14th January 2021, 11:50   #6  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by Danette View Post
Seems to work on a TV. Yes, these are from DVD's. This particular series has numerous challenges that have proven very interesting.

Sample: https://www.mediafire.com/file/aw4ts...ack01.m2v/file

This sample seems to have a 5-5 pattern.
The sample seems to have a fields pattern like
2-2-2-2-3-2-2-2-3
which could have its root in a 25i to 30i conversion.

Did you try
Code:
TFM().TDecimate(Cycle=10,CycleR=1) #gives 26.973fps
AssumeFPS(25)
You would have to resample the audio accordingly.

Last edited by Sharc; 14th January 2021 at 13:33.
Sharc is offline   Reply With Quote
Old 14th January 2021, 12:40   #7  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
I remember a long time ago coming across some episodes of this show.... I can't remember where or why, but I recall at the time thinking someone had made a mess of them, mostly because they seemed to be playing fast. It's impossible to tell from the sample, and it's a fair hike down from 26.973 to 24fps, but I'm wondering if the speed up is deliberate. I thought maybe it was done to fit into a particular duration, and you'd hope that sort of thing wouldn't find it's way to a DVD, but now I'm thinking along the same lines as Sharc....

TFM()
TDecimate(cycle=20,CycleR=2)
AssumeFPS(24)

You'd have to find a section with normal speech and slow the audio to match to see if it's natural. It's not obvious from the sample whether 26.973fps is too fast, but slowing it down to 24fps doesn't look too slow.

TDecimate's hybrid modes expect combinations of telecined film (23.976 after IVTC) and interlaced video (29.97fps after de-interlacing). I doubt the hybrid modes would work well with anything else.

PS. If you add the audio to a script, you can slow it down with this function.
AudioSpeed
It'd be something like:

Video = mpeg2source("D:\Source_Track01.d2v")
Audio = FFAudioSource("D:\Audio.ac3")
AudioDub(Video, Audio)
TFM()
TDecimate(cycle=20,CycleR=2)
AssumeFPS(24)
AudioSpeed(24.0, 27000.0/1001.0, PitchCorrect=true) # Add Info=false to disable the overlaid text.
ConvertAudioTo16bit() # as required

Then open the script with a player such as MPC-HC to see how it looks and sounds.

Last edited by hello_hello; 14th January 2021 at 13:36.
hello_hello is offline   Reply With Quote
Old 14th January 2021, 13:30   #8  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 234
We had these odd framerates after correct decimating with Michael Landon's Highway To Heaven some years ago. There were some episodes intentionally accelerated - some say, to have more room for commercials. Maybe this could be the point here. If so you should correct the framerate to 23.976 in the end with an assumefps().
Frank62 is offline   Reply With Quote
Old 14th January 2021, 18:33   #9  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by Frank62 View Post
We had these odd framerates after correct decimating with Michael Landon's Highway To Heaven some years ago. There were some episodes intentionally accelerated - some say, to have more room for commercials. Maybe this could be the point here. If so you should correct the framerate to 23.976 in the end with an assumefps().
If the episode was accelerated, isn't that usually done by deleting frames and, if so, wouldn't deleting even more frames be a bad thing?

If a movie that has been telecined was sped up, I'd suspect that this would be done by removing some of the pulldown fields. If so, the correct thing would be to create a TDeicimate Cycle/CycleR ratio that would eliminate fewer than the normal number of fields (it would be a LOT more than 1 out of 10, as shown in post #1).

You'd also need to determine what needs to be done to the audio.
johnmeyer is offline   Reply With Quote
Old 14th January 2021, 18:52   #10  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 234
Quote:
Originally Posted by johnmeyer View Post
If the episode was accelerated, isn't that usually done by deleting frames and, if so, wouldn't deleting even more frames be a bad thing?
That's possibly why the thread starter deleted 1 of 10 instead of the normal 1 of 5 resp. 1 of 6 for back-to-PAL-conversion. So he deleted fewer, because there were already too less. The resulting pseudo-framerate is too high and has to be slowed down - if from PAL not that much, from 26.973 to 25 - to get the original speed.
Frank62 is offline   Reply With Quote
Old 15th January 2021, 01:38   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
The sample isn't long enough to tell if it's regular, but stepping through the frames after TFM, these are the duplicates.

3,13,23,33,43,54,64,74,84,94,104,114,124,134,144,154,165,175,185...

If that's regular, I assume my original Cycle=20 and CycleR=2 is wrong and it should be

TFM()
TDecimate(Cycle=111, CycleR=11)

and the result would be 26.9738fps, or 1000000/37073 to be precise (according to Avisynth).
hello_hello is offline   Reply With Quote
Old 15th January 2021, 05:50   #12  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Thanks for all of the insight. I hadn't considered the possibility of a sped-up video. Of the 36 episodes in this season, four are like this sample. Re-checking, I found that the bulk of this season are the expected ~25 minutes, correctly telecined, while these four episodes are ~22 minutes, which does support the speed difference. I do recall having encountered this type of thing about 15 years ago with the "Combat!" series. I will have to add taking a quick look at all future series to rule-out this possible difference in time lengths.

When I first encountered such things, the reason has been that, when a studio doesn't have access to the original 35mm film, they often have to use what they can find, and this may be the sped-up episodes that were done this way for syndication. Rather than cutting scenes, the syndication effort might choose to increase the speed to deliver the entire original episode. So, these oddities apparently pop up more often than I thought.

I haven't had time to try some of the above approaches, but will and I will report back on what I find.
Danette is offline   Reply With Quote
Old 15th January 2021, 11:40   #13  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 234
Quote:
Originally Posted by Danette View Post
when a studio doesn't have access to the original 35mm film
Your source seems to have PAL origin. European studios access to U.S. 35mm material? We do this since 2007 and there wasn't one single case where we had access to anything else than what the licensor gave us - and that's the masters he made. From new restored great quality down to syndicated, blended, very old 1'' sourced tapes (often)
Apart from that: 35mm access, scanning, restoring nowadays is financially only possible for very well selling feature films, even if you do restoring in-house as we do. A whole series? No way.
Frank62 is offline   Reply With Quote
Old 16th January 2021, 05:49   #14  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Good catch, for those that suspected the speed problem. The script offered by hello_hello worked great on these four episodes. The cycle=10,CycleR=1 still seems indistinguishable, upon viewing, vs. the other decimation suggestions, so I've stayed with that.

I can't preview the script though, at least not in MPC-HC (VDub crashes), as MPC-HC throws off a "Script error: there is no function named 'MPEG2Source'." Googling the issue hasn't helped. If anyone has a solution, it would preclude the need to wait for full processing of the file.
Danette is offline   Reply With Quote
Old 16th January 2021, 10:54   #15  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
VDub crashes
You using VDub2 ? :- https://forum.doom9.org/showthread.php?t=172021

Quote:
"Script error: there is no function named 'MPEG2Source'."
Do you have "DGDecode.dll" in your plugins folder ? [Comes with DGIndex, un-official x64 DGDecode.dll is also available from somewhere]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 16th January 2021 at 10:58.
StainlessS is offline   Reply With Quote
Old 16th January 2021, 12:57   #16  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Danette View Post
I can't preview the script though, at least not in MPC-HC (VDub crashes), as MPC-HC throws off a "Script error: there is no function named 'MPEG2Source'." Googling the issue hasn't helped. If anyone has a solution, it would preclude the need to wait for full processing of the file.
How do you normally open DVD video?

I remember you using MeGUI, so if that's correct you can index with MeGUI/DGIndex and edit the script. You'll find DGDecode in the MeGUI Tools folder, but after indexing, MeGUI will open the video like this.

LoadPlugin("C:\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\Source_Track01.d2v")

I think there's other source filters (maybe older ones) that also open video with mpeg2source, so MeGUI plays it safe and makes sure DGDecode is being used.

DGDecode_mpeg2source("D:\Source_Track01.d2v")

This should work too though.

LoadPlugin("C:\MeGUI\tools\dgindex\DGDecode.dll")
mpeg2source("D:\Source_Track01.d2v")

Failing that, just open the video with whatever source filter you've been using until now. You can use FFMs2 to open the video and audio together so you won't need AudioDub(), if they're in the same file, but I guess I assumed you were indexing with DGIndex and extracting the audio as a separate file.

FFMS2("D:\Something Something.mkv", atrack=-1)

Last edited by hello_hello; 16th January 2021 at 13:09.
hello_hello is offline   Reply With Quote
Old 16th January 2021, 13:15   #17  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Didn't realize that Danette was using MeGUI, that explains it perfectly.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 16th January 2021, 15:50   #18  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Regarding MPC-HC failure to play avs files:

I do use VDub2 and "DGDecode.dll" (32-bit) is in the plugins folder (AviSynth+).

I do normally use MPC-HC to view video, but have never tried it with avs files (works fine for all type of video files I’ve used). I do all script development and previewing in AvsPmod and, sometimes, in Vdub2 (which doesn’t crash with avs files when not using the audio dub of the above script).

Tried the script:
LoadPlugin("C:\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\Source_Track01.d2v") and Mpeg2source("D:\Source_Track01.d2v")
but it threw off the warning about not using a 64-bit DGDecode.dll version in 64-bit AviSynth. Tried placing the 64-bit DGDecode.dll from MPEG2DecPlus into the plugins folder (AviSynth+), but no help.

I do use MeGUI, but just for processing avs files with OneClick. In preparing the avs files, I demux video, audio and chapters, and then use StainlessS’ DGIndex Batcher. So, FFMs2 would complicate things. Previewing is done in the AvsPmod player and Vdub2, as necessary (AvsPmod has no audio player).
Danette is offline   Reply With Quote
Old 16th January 2021, 16:20   #19  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Assuming that you are using 32 bit, take out the x64 version of DGDecode.dll from plugins, it dont belong there.
If you get some warning about 64 bit, then sounds like you are using eg 64 bit version of MPC-HC (or whatever issues that warning).
Can ONLY use x64 apps with x64 Avisynth and x64 plugins, cannot swap and change [same for any other non Avs app, dlls].
x86 is probably the least problematic version of AVS, so maybe also get x86 version of MPC-HC. [can be installed side by side, but need to open with the correct one].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 16th January 2021, 17:05   #20  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Quote:
Originally Posted by StainlessS View Post
un-official x64 DGDecode.dll is also available from somewhere
Official DG version has been available for a while.
videoh 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 16:27.


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