I'm working on archiving my old Fantasia LaserDisc to DVD.
I had a lot of problems with the automated IVTC filters like Telecide, perhaps due to the noisy source.
Here's the manual IVTC sequence I came up with by scanning through it with VDub:
Here's the problem. I finally tried a quick CCE Basic encode (no noise reduction) of the whole movie to check audio sync after IVTC. I saw lots of combing artifacts as if the cadence was wrong. I also saw plenty of combing problems later in the encoded movie.Trim(0, 579).SeparateFields().SelectEvery(10, 1,2, 3,4, 6,7, 8,9).Weave() + \
Trim(580, 51891).SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave() + \
Trim(51892, 70278).SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave() + \
Trim(70280, 112304).SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave() + \
Trim(112306, 0).SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave()
When I open the script in VirtualDub and step through the start of the movie, there are combing artifacts in the opening scene. If I then seek back to the start (ctrl-left-arrow) and step through again, I get perfect progressive frames! As before, the whole movie is perfect then.
So I can't trust the pattern breaks I find by scrubbing through the movie in VDub, since seeking seems to change the cadence used by Avisynth.
I tried going back to Avisynth version 2.5.7 but got the same results. I see the same change after seek in other media players playing the script, so I don't think it's VDub.
I've also tried some alternative syntax in the script to do the same thing but I get the same results no matter what.
Any ideas? Any tricks to make this consistent? I can't go frame-by-frame through the whole movie to find pattern breaks!
One other quick question. After a progressive encode with CCE, previewing the result shows a "12344" sequence of frames with repeated frames making up the 23.976->29.97 frame rate conversion. Is that normal when playing it back on the computer? Is there a setting in CCE I overlooked? I hope I don't need CCE SP for this. Basic has served me very well.
Thanks for any help,
- LoopinFool
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 28 of 28
Thread
-
-
I can't go frame-by-frame through the whole movie to find pattern breaks!
After a progressive encode with CCE, previewing the result shows a "12344" sequence of frames with repeated frames making up the 23.976->29.97 frame rate conversion.
If you were to open it in GSpot, if you don't see Pics/s as 23.976 then you messed up.
Perhaps the IVTC is failing for a reason different than what you think. Can you post a link to a short 10 second sample with movement, one that shows the IVTC failing. Use the [ and ] buttons of DGIndex to isolate a small section and then File-Save Project and Demux Video. -
Here is my manual IVTC script:
Code:function manualIVTC(clip v) { v=assumeFrameBased(v) # Sync pulldown pattern #v=loop(v, 1, 0,0)# times, start,end # split five frames v_a = selectevery(v,5, 0).subtitle("a") v_b = selectevery(v,5, 1).subtitle("b") v_bc = selectevery(v,5, 2).subtitle("bc") v_cd = selectevery(v,5, 3).subtitle("cd") v_d = selectevery(v,5, 4).subtitle("d") # fix the C-frame c2=selecteven(separatefields(v_bc)) c1=selectodd(separatefields(v_cd)) v_c=weave(interleave(c1,c2))#.subtitle("c") v=interleave(v_a, v_b, v_c, v_d) #v=interleave(v_a, v_b, v_bc, v_cd, v_d) #v=v_c return v.assumeFPS(23.976) }
You can sometimes do a quick check by uncommenting the #v=v_c line which only reveals the c-frame. But I've never had the problem you describe. I can check it in Virtual Dub and it's golden.
EDIT:
Now that I take a closer look at your function, I admire its simplicity for getting the same thing done. Nice job. I was working too hard! LOL.
Darryl -
Originally Posted by jagabo
This was the CAV pressing, so there are many "sides" in the capture that I had to edit together. There aren't that many pattern breaks -- the script snippet I posted is for the whole 2hr movie. There also seems to be a pattern break at one point in the middle which might have been a capture glitch or minor video edit they did before the pressing.
I tried CCE both with and without the "inverse 2:3 pulldown" option selected. I didn't see any difference when playing them back, but need to do more testing. I always had progressive and zig-zag on.
Thanks,
- LoopinFool -
Originally Posted by manono
I started out trying a manual override file with Telecide and decided this would be simpler/clearer. It's also what I found recommended here.
After a progressive encode with CCE, previewing the result shows a "12344" sequence of frames with repeated frames making up the 23.976->29.97 frame rate conversion.
If you were to open it in GSpot, if you don't see Pics/s as 23.976 then you messed up.
Perhaps the IVTC is failing for a reason different than what you think. Can you post a link to a short 10 second sample with movement, one that shows the IVTC failing. Use the [ and ] buttons of DGIndex to isolate a small section and then File-Save Project and Demux Video.
I'm now leaning towards it being a problem using the DirectShow filter to seek in the source file. I have an alternative Quicktime filter to try. I normally do my captures/edits in the Avid software and use CCE to encode directly from the reference QT file. This is the first movie I've done and the first capture that really needed a lot of processing (comb filter, noise filters, levels, etc.). Avisynth is great for that.
Worst case, I could re-capture the movie directly to AVI files to avoid the QT stuff. I still have the LD player (for now), but didn't want to spend even this much time on the project.
Thanks for the help!
- LoopinFool -
Originally Posted by LoopinFool
SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 8,9).Weave()
I think the SelectEvery() in the first line (as posted) of your script will pose a problem:
...SelectEvery(10, 1,2, 3,4, 6,7, 8,9)...
By removing the very first field you have changed the field order of the remaining fields. AviSynth won't Weave() the fields back together the way you want. When this happens I start one frame earlier or one frame later and adjust the SelectEvery() pattern to suit. -
Originally Posted by jagabo
I think LoopinFool is experiencing a problem with the DirectShow filter. I used to see much of the same thing with mpeg2 filters. Now I use dgIndex to parse the m2v (or vob) file and that problem has gone away. That worked for mpeg2, but I don't know how to work around the directshow filter with your file. If you play it from the start instead of scrubbing through it, is it fine then?
Darryl -
Originally Posted by jagabo
Thanks, everyone. I now have some ideas for how to attack this (after the weekend).
- LoopinFool -
I think Enosoft has a free tool that will let you remux DV: http://www.enosoft.net/
-
I did some quick testing Friday night with just the original file through the QT DShow filter. That is indeed the problem.
It looks like when you seek backwards, you get one extra frame from an internal (look-ahead?) buffer instead of the destination frame.
That makes the frame numbers off-by-one which completely changes the pulldown sequence.
I think seeking forward is fine. I should be able to re-do the search for pattern breaks, being careful never to seek backwards.
I may still try an older version of the Medialooks QT filter or a different one.
I'm glad to have found the source of the problem. Thanks again for your knowledgeable input.
- LoopinFool -
Update:
I found that any seeking changes the pulldown sequence. So, I re-did my pattern change search using the results of 1-pass CBR encodes. I only needed four zones so it didn't take too long.
As to CCE and the frame rate issue:
CCE Basic doesn't support Film->NTSC pulldown at all. I had the "DVD" option selected during early encodes, which made CCE change the frame rate to be DVD-compliant. It did that by inserting frames.
By changing to the "MPEG-2" option, I got it to do a true 23.976 encode, though the MPEG frames were still flagged as interlaced.
I am able to use PULLDOWN.EXE to fix the m2v file now that I know the magic "-prog_frames p" option (which really should be the default). DVD-lab can also apply the pulldown flags but it left the frames flagged as interlaced.
I may give HCEnc a try for this. Some people like it better than CCE for animation, and it can natively write out a proper 3:2 pulldown-flagged file. There's also ffmpeg, but nobody seems to use it for DVD encoding. That one's also a pain because it doesn't write out a sequence end code in the mpegtsraw format. PULLDOWN.EXE needs an end code or it messes up the end of the stream.
I'm not too worried about the encoder's speed, though. Once I put the processing filters back into my AviSynth script (TComb, ColorYUV, FFT3D, and MSmooth), the full movie will take forever to process anyway.
- LoopinFool -
You can also use DgPulldown to add pulldown flags. It can handle 25 to 29.97 fps pulldown, and other patterns.
-
According to the Doom9 guide to Basic CCE, there's a check box (along with a pic showing exactly where) to have it flagged as progressive:
Check Progressive source if you're dealing with progressive content, if your content is interlaced, make sure this is not checked.
I am able to use PULLDOWN.EXE to fix the m2v file now that I know the magic "-prog_frames p" option (which really should be the default). -
jagabo,
Thanks for the pointer to DGPulldown. I forgot about that one. I'll give it a try and see if it's faster/better/works on ffmpeg output.
manono,
That CCE check box just tells the encoder to treat the source frames as progressive vs interlaced. I have it checked, along with the Zigzag scan order. It clearly has nothing to do with the output.
CCE SP fully supports film encoding, but Basic doesn't. I found that it always marks the output frames as interlaced even when doing a progressive encode at 23.976. It simply doesn't support pulldown. It's pretty lousy that it duplicated frames with the "DVD" option, but it did create a DVD compliant bitstream!
When I used PULLDOWN.EXE with the defaults (the docs say it will flag all frames as interlaced), both WinDVD and my Panasonic standalone player looked pretty bad. Hard to describe, but every other frame had some softness and field artifacts. Since the stored frames in the m2v file really are progressive, it makes sense (to me) to mark them that way. The pulldown flags are still in there. The results of setting the "-prog_frames p" option speak for themselves.
I've been very happy using CCE Basic for video encodes for around 5 years now. This is my first film-based project and it's been an adventure. Thanks again for the help!
- LoopinFool -
Originally Posted by LoopinFool
-
Originally Posted by manono
-
Originally Posted by manono
Thanks for checking that out. I must be setting something different than you did. Of course, the file still needs pulldown processing and all the flags can be re-set to the right values then.
Perhaps CCE is relying on the i/p status coming from its input and saving the "correct" type based on that. The source is DV so is interlaced. I don't know how to fix it if that's why CCE thinks the source is interlaced.
What program did you use to examine the file? I like that display. It's compact and full of info.
*edit: Nevermind, I see it's the latest version of DGIndex.
Trying to learn,
- LoopinFool -
Right, I forgot to check in GSpot, and if I had I would have mentioned that it's unreliable as far as CCE encodes go. That was an oversight on my part and I apologize. I did check using ReStream and it shows it as progressive. This is using the CCE Basic Trial 2.70.01.14 that puts the nasty logo in the video.
Of course, the file still needs pulldown processing and all the flags can be re-set to the right values then.
The source is DV so is interlaced. -
Originally Posted by manono
I would think that checking the "progressive source" option in CCE would override everything else. It's possible I still have the BFF option checked, too (or TFF unchecked - don't remember which is in there).
I'll do some more checking this weekend to figure out why CCE is creating strange MPEG files for me. I do believe I have it properly doing progressive encodes at 23.976 and that it's just flagging its output wrong. I now have more tools with which to investigate. Maybe it was just GSpot getting it wrong.
I also plan to use DGPulldown instead of pulldown.exe. I trust it more and the pattern it creates matches what HCenc creates when viewed in ReStream.
- LoopinFool -
FWIW, I revised my own manual IVTC function as follows:
Code:function manualIVTC(clip v, int p) { v=loop(v, p, 0,0) v=v.SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 7,8).Weave() v=trim(v,int(p*3/5),0) return v.assumeFPS(23.976) }
Darryl -
Thanks for bringing this thread back from the dead. Nice little function, by the way.
I had meant to post an update after I got everything working.
The main thing that fixed this project was finding QTSource.dll for AviSynth. It's a real source filter that uses the Quicktime library via its QTInput() function. I got completely consistent pulldown results after I started using it. It fixed all seek-related problems I was getting using DirectShowSource.
My confusion was mainly due to GSpot not giving me the correct info. Once I started using DGPulldown and DGIndex, everything looked right.
If anyone runs across this thread after doing a search -- go get QTSource.dll if you need to process Quicktime files in AviSynth. It will save you headaches.
- LoopinFool -
how about replacing 'v.assumeFPS(23.976)' with 'v.assumeFPS(v.FrameRate()*4.0/5.0)' to avoid the hardcoded '23.976' ?
users currently on my ignore list: deadrats, Stears555 -
-
Argh right, the frame rate needs to be taken from the input,...
users currently on my ignore list: deadrats, Stears555
Similar Threads
-
AviSynth or GPU based deinterlacing / IVTC
By topsyturvy in forum Video ConversionReplies: 2Last Post: 7th May 2011, 09:07 -
Trouble with .mkv and VirtualDub using AVISynth
By Jonnycat in forum Video ConversionReplies: 3Last Post: 6th Apr 2010, 16:43 -
IVTC Program on Mac like Avisynth??
By kmxe in forum MacReplies: 0Last Post: 18th Mar 2010, 17:03 -
ivtc help
By iamtehsux in forum Newbie / General discussionsReplies: 3Last Post: 20th Dec 2008, 19:58 -
Avisynth IVTC and fps
By snidwar in forum Video ConversionReplies: 5Last Post: 27th Sep 2008, 22:11