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 > (HD) DVD, Blu-ray & (S)VCD > DVD & BD Rebuilder

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th December 2020, 02:44   #1  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 429
Duplicate frame issue with EU retail disc.

Hi folks,

I will often get EU discs and change them to 24fps so that my NA player will handle them. I use BDRebuilder to rebuild them first to strip out all the stuff I don't need (other audio, subs, extras, etc) and then I re-author them with TSMuxer, after changing the audio stream to match the stretched video time. Usually this works fine.

But "Pillars of the Earth" presented a new issue that I haven't seen before. There is a repeating duplication of frames, such that 5 frames are displayed then the next is a repeat of the 5th, then 5 more plus a repeat of the 5th, and so on. It really makes a mess of panning shots.

I did a bit of googling and it seems that there might be an avisynth setting that can remove these repeating frames, but I really don't know how to go about getting the job done. I know that BDrebuilder uses avisynth, since that app is in its tool bundle, so maybe I have the tools I need at hand.

I believe I have to create an avisynth script (basically a txt file), and then feed that script into an app that can interpret the script and write the output to a new file. Could someone give me a little push in the right direction, letting me know what app to use to read the script and create the output?

Thx.
RobertM is offline   Reply With Quote
Old 18th December 2020, 08:55   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,459
Using Avisynth means the video has to be re-encoded.

It sounds like it was PAL converted to 29.97fps. Someone asked about that issue here. There's a downscaled re-encode of the sample in post #5 without the duplicates.

If you haven't used Avisynth before, try MeGUI (File/Open and follow the prompts). If you get as far as indexing the video and MeGUI opening it's Script Creator, adding the following to the script it creates will get you to 24fps, assuming I've assumed what the problem is accurately. What's the video framerate?

Code:
LoadPlugin("C:\MeGUI\tools\avisynth_plugin\TIVTC.dll")  # change the file path as required
TDecimate(Cycle=6)  # this removes the duplicates for 24.975fps
AssumeFPS(24)  # slow the frame rate to 24fps
You can possibly use BDRebuilder if it uses Avisynth and it'll let you edit the scripts it creates. I don't know anything about it.

The audio time-stretch won't be a standard one, but one thing at a time....

Edit: uploading a small sample and providing a link to it would be helpful.
You can do that here without registering.

Last edited by hello_hello; 18th December 2020 at 09:33.
hello_hello is offline   Reply With Quote
Old 18th December 2020, 14:48   #3  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 429
Looks like MeGUI is going to do the trick.

I took a 30sec sample, having approx 900 frames, and did a test run to get comfortable. Then I added in the script lines you provided, and on the next run it reported that it was processing about 750 frames. The resulting vid is completely lacking in duplicated frames, as far as I can tell.

Thanks a bunch.

BTW, what happens if the duplication gets out of phase during a long encode. For example, if a cut was made somewhere that briefly breaks the 5+1 cycle, then the problem would no longer happen at an even 6 frame multiple relative to the beginning. Would this function then cut out good frames and leave the duplicates? Or does it actually compare data for each frame to determine which actual frames are duplicates? In that case, it would have to be smart enough to handle still shots and credits.

Anyhow, looking good so far.
RobertM is offline   Reply With Quote
Old 18th December 2020, 18:47   #4  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,459
TDecimte(Cycle=6) removes a single frame in each group of six, starting from the first frame (frame zero).
frames 0-5, 6-11, 12-17 etc.
If the video was edited after the frames were duplicated, I don't think it's possible for each group not to have a duplicate frame, at least when it's only edited by removing frames.
It doesn't matter if the cycle changes... for instance if the 5th frame is the duplicate in each group for a while, then it's the 2nd frame etc. It might have to leave a duplicate behind though if the video happens to be edited so a group of frames contains 2 duplicates.

The default Mode=0:
TDecimte(Mode=0, Cycle=6)
looks at each group of frames, finds the two most similar in the group and removes one of them. It doesn't remove more than a single frame from each group.
Mode=1 works the same way, but if there's a run of duplicates in a group it removes the last one. That's the recommended mode for animation where there's often multiple duplicate frames in succession.

If the pattern is very irregular you can, for instance, tell TDecimate to remove 2 frames in each group of 12 instead, but it's generally not necessary.
TDecimate(Cycle=12, CycleR=2)

There's also hybrid modes, intended for use with NTSC sources. You'd use it in combination with TFM.

TFM()
TDecimate(Hybrid=2, Cycle=5, CycleR=1)

For the above, TFM field matches to convert telecined film back to progressive (the process results in one repeated frame in each group of five), and for video sections it de-interlaces to 29.97fps. Hybrid=2 tells TDecimate to remove the duplicates from the film sections for 23.976fps and convert the video sections to 23.976fps using frame blending to keep the motion smooth.

It can do a lot more, but hopefully that gives you some idea.

Last edited by hello_hello; 18th December 2020 at 19:14.
hello_hello is offline   Reply With Quote
Old 18th December 2020, 20:35   #5  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 20,821
Quote:
I will often get EU discs and change them to 24fps so that my NA player will handle them. I use BDRebuilder to rebuild them first to strip out all the stuff I don't need (other audio, subs, extras, etc) and then I re-author them with TSMuxer, after changing the audio stream to match the stretched video time.
Just in case you don't know -- BD Rebuilder can do all of this for you automatically (including the audio correction). It can take a 25 fps european source and output it to 24 fps (23.976 fps) U.S. version.
__________________
Help with development of new apps: Donations.
Website: www.jdobbs.net

Last edited by jdobbs; 18th December 2020 at 20:38.
jdobbs is offline   Reply With Quote
Old 19th December 2020, 04:30   #6  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 429
That would sure simplify things. Does this mean I would use the "use AVS filters during encoding" setup option? Is there a write up somewhere saying how to do that? Thanks.
RobertM is offline   Reply With Quote
Old 19th December 2020, 18:13   #7  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 20,821
Quote:
Originally Posted by RobertM View Post
That would sure simplify things. Does this mean I would use the "use AVS filters during encoding" setup option? Is there a write up somewhere saying how to do that? Thanks.
There are several ways to do it. The easiest is to add IMPORT_PAL_TO_FILM=1 to your INI file and import the source.
__________________
Help with development of new apps: Donations.
Website: www.jdobbs.net
jdobbs is offline   Reply With Quote
Old 19th December 2020, 22:21   #8  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,459
Can BD Rebuilder handle removing the repeated frames added to convert 24.975fps to 29.97fps?

I live in PAL land, and even back when video rental places existed, it wasn't that uncommon to rent a DVD and discover it was NTSC, because pretty much all PAL players can play NTSC DVDs, so I suspect RobertM bought a similar substitute, assuming he thought he was buying a 25fps disc.
hello_hello is offline   Reply With Quote
Old 20th December 2020, 18:17   #9  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 429
I tried adding "IMPORT_PAL_TO_FILM=1" to my ini file and imported one of the episodes. When the rebuild was complete, the resulting m2ts file had certainly been processed, but the result wasn't right.

The original m2ts files had a repeating frame structure like ABCDEE ABCDEE ABCDEE, etc. Using the AVISynth script with meGUI yielded ABCDE ABCDE ABCDE, which is what I need. It was a bit of a pita to also scale the audio and subs to match, but after a bit of farting around it all worked out. I imported the 3 fixed files into BDRebuilder, edited the menu text, and now have a good working disc.

The "IMPORT_PAL_TO_FILM=1" method yielded a frame structure like this: AABBCCDDEEEE AABBCCDDEEEE AABBCCDDEEEE. I verify this by opening the m2ts in VLC and stepping through it on frame at a time using the 'e' key.

Quite possible I did something wrong in trying out the "IMPORT_PAL_TO_FILM=1" method. But no joy so far.
RobertM is offline   Reply With Quote
Old 21st December 2020, 23:53   #10  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Posts: 1,043
In SETUP try checking IVTC sources with 3:2 pulldown
gonca 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 01:34.


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