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. |
23rd December 2010, 16:56 | #1 | Link |
unrecognized user
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
|
30i on top of 24p
I've looked the forums high and low, but couldn't find a thread about this particular problem, although I doubt it's new.
So let's say we have 24p scrolling images, then telecined to 30i, and on top of it overlayed a pure 30i of scrolling text. How would one restore such a thing to a smooth motion of both the images and the text? I can only seem to manage to get 24p with proper motion in back and ok but jumpy text, or 30p with smooth text and obviously jumpy background due to duplicates. Is there a way? Thanks.
__________________
zzz |
23rd December 2010, 17:45 | #4 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
You can look at the p60to24p function:
http://forum.doom9.org/showthread.ph...547#post814547 However this may be not the best tool to achieve what you need. The following function deinterlaces 60i credits on the top of a 24 fps telecined footage. It virtually oversamples the video to 120 fps with motion interpolation on credits only, and decimates to 24 fps. It has the advantage of avoiding footage frames interpolation, leaving them very clean, whatever the motion they contain. However, the drawback is that it requires to manually measure the origin of the 3:2 pulldown pattern (and split the clip in parts if it changes). Code:
# Version 1.1 Function ivtc_txt60mc (clip src, int frame_ref, bool "srcbob", bool "draft") { srcbob = Default (srcbob, false) draft = Default (draft, false) field_ref = (srcbob) ? frame_ref : frame_ref * 2 field_ref = field_ref % 5 invpos = (5 - field_ref) % 5 pel = (draft) ? 1 : 2 src (srcbob) ? last \ : (draft ) ? Bob () \ : QTGMC (SourceMatch=3, Lossless=2, tr0=1, tr1=1, tr2=1) clean = SelectEvery (5, 1 - invpos) jitter = SelectEvery (5, 3 - invpos, 4 - invpos) jsup = jitter.MSuper (pel=pel) vect_f = jsup.MAnalyse (isb=false, delta=1, overlap=4) vect_b = jsup.MAnalyse (isb=true, delta=1, overlap=4) comp = jitter.MFlowInter (jsup, vect_b, vect_f, time=50, thSCD1=400) fixed = comp.SelectEvery (2, 0) Interleave (clean, fixed) Trim (invpos / 2, 0) } I've put in this archive examples showing several common methods to deinterlace 60i credits. The one covered by the above script is correct.mp4. If you can read french, I wrote a more detailed article about this kind of issue: http://qualiter.fr/viewtopic.php?f=11&t=24
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 9th May 2011 at 04:05. Reason: Added srcbob and draft parameters. |
23rd December 2010, 19:03 | #7 | Link |
Registered User
Join Date: Apr 2008
Posts: 1,181
|
The scrolling credit only occupies a fixed area in the image. Cut the rectangle(top and bottom location should be mod4) off and run deinterlacer on it. Do IVTC to the rest of the image. Overlay the deinterlaced rectangle back to the original place.
Remember doing anything other than IVTC to telecined part will destroy the image. |
23rd December 2010, 19:53 | #8 | Link | |
unrecognized user
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
|
Quote:
@cretindesalpes, that demo sample is very good, but I can't replicate the good results here. I did a couple seconds in the end and the script did it's thing, the text is definitely shifted compared to a normal ivtc, quite interesting, but it's not 'evenly distributed' so ti's still jumpy, slightly less than before. I should mention the text and background both scroll the same way, unlike the demo where one was vertical and the other horizontal.
__________________
zzz |
|
23rd December 2010, 21:05 | #9 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
On which hardware ? I've got 0.75 fps with these settings (1440x1080) on a 4-core CPU, using only 50% CPU. Make sure you've allocated enough memory to AviSynth, otherwise things tend to become damn slow. QTGMC + subsequent MVTools is a real resource hog. Also, you shouldn't do any other processing in this script because of the aforementioned reasons. Load the video, trim the segment to process, call ivtc_txt60mc and save the result to a lossless file.
Make sure the frame_ref value is correct, and constant on all the processed clip. If it still doesn't work, post a sample.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
23rd December 2010, 21:45 | #10 | Link |
unrecognized user
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
|
Well, I have a decent c2d, but i guess memory might be a problem.
Here's a raw sample: http://ul.to/zsq2yv Compared to normal ivtc, where i get normal jump, normal jump, normal jump, big jump (the scrolling text), with this script now I get small jump, small jump, big jump, big jump. Which makes things slightly worse. I'm pretty sure the frame ref value was good, because the background remained in same position as normal ivtc (I tried other values and it's always worse).
__________________
zzz |
24th December 2010, 00:15 | #11 | Link | |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 24th December 2010 at 00:19. |
|
24th December 2010, 10:15 | #13 | Link | |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
I also had to increase SetMemoryMax to 1300.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 16th June 2011 at 09:22. Reason: broken link |
|
24th December 2010, 17:19 | #14 | Link |
unrecognized user
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
|
Thanks. Looks good. Too bad I can't replicate the results. If values are the same as in the posted script, I guess it must be a wrong filter version on my side.
Later edit: seems like I solved the problem, thanks for the help.
__________________
zzz Last edited by Daodan; 24th December 2010 at 18:12. |
25th December 2010, 04:34 | #15 | Link | |
warpsharpened
Join Date: Feb 2007
Posts: 787
|
Quote:
Given the choice I would output it to mkv, not mp4, although h264 lossless would not be my first choice (see below). Since the section we're talking about is probably not very big (an opening/ending perhaps), your second option to encode to some type of lossless file first is probably the best option, although I would use ut video instead of h264 lossless. |
|
16th June 2011, 15:40 | #16 | Link |
Registered User
Join Date: Dec 2009
Posts: 10
|
Hi, I'm trying to do a script but it keeps geting me the error of invalid arguments for the function "ivtc_txt60mc", here is the part where it gets the error:
Code:
Trim(0,38889).AnimeIVTC(mode=4, omode=2, pass=1) + Trim(38890,40626).ivtc_txt60mc(frame_ref=108) + Trim(40627,41089).AnimeIVTC(mode=4, omode=2, pass=1) |
16th June 2011, 16:43 | #17 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
frame_ref is a mandatory parameter (it is not enclosed in quotes in the function definition), so cannot be passed by name.
... + Trim(38890,40626).ivtc_txt60mc(108) + ... but if your 38908 is correct, it should be 18, not 108. |
17th June 2011, 01:51 | #18 | Link |
Registered User
Join Date: Dec 2009
Posts: 10
|
Thanks, it worked, btw what if the background instead of being 24p, was 29p would it still work?? If not would it be possible to make a script like this for 29p parts?
EDIT: Forget about that I thought I had 29p parts but it was just that the telecine was hard to spot... Is there something that we can change on the script to obtain credits at 29,970p instead of 23,976p?? But the backgorund stays at 24p Last edited by The Showstopper; 17th June 2011 at 16:30. |
22nd April 2016, 09:02 | #19 | Link |
Registered User
Join Date: Mar 2016
Posts: 3
|
Hi, cretindesalpes
Is this function interchangeable with mvtools-pfmod2.7.0.1? It was used by the same condition, but error "Error requesting frame 1" "windowsError: exception: access violation reading 0x34AEF406" Should this question be done by other threads? system environment windows10_32bit Avisynth260_x86 |
27th April 2016, 05:23 | #20 | Link |
Guest
Posts: n/a
|
If you're comfortable with having a VFR file as your output you could very comfortably IVTC the 24p sections and deinterlace the interlaced sections (albeit only to 30p) and have the resulting clip play both parts at their resulting rate.
It's not too tricky when you've done it a few times and if you want to go down this path I'd be happy to help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|