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. |
19th February 2020, 13:00 | #1 | Link |
Registered User
Join Date: Aug 2007
Posts: 44
|
Silent Film (Framerate Question) Help
https://www.mediafire.com/file/kkyx3...ilent.avi/file
I noticed this has an odd cadence. What is the proper way to make it progressive but at the right speed? Also, is there a way to determine what the framerate should be? So many questions and variables... I have seen many DVD's and BluRay's of silent films that are 23.976 and are the correct speed. The above sample seems to be a common cadence for the interlaced films to bring them to the correct speed I'm guessing? Any help would be much appreciated. |
19th February 2020, 17:36 | #3 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
The weird cadence is probably from the edits
It's closer to about 21.72 . 18 will drop too many good frames . fdecimate is tricky, in that you have to go linearly way back or it will mix up frames The other option to assuming a single constant framerate is to use VFR such as dedup or related methods |
20th February 2020, 02:13 | #5 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
If the cadence is a little strange, and doesn't repeat, you have to do something like what Sharc posted, where you set a really high cycle size so that Tdecimate can analyze huge chunks at once. This cuts way down on deleting good frames or preserving dups that should be decimated when you have a pattern which doesn't repeat often, if at all.
So, I did the same thing as Sharc, but used an even longer cycle. I came up with the following values, after walking through a very large number of fields (you should always do your analysis by first doing a separatefields() operation and then walking through a large number of fields). I stepped through 128 fields and got 47 unique images (i.e., where the motion moved horizontally). This means that I should have 94 (2 * 47) pairs of fields instead of 128. Subtracting 94 from 128 yields 34. Thus, if I use a Cycle of 128 and a CycleR of 34, I should get really good decimation, even if the pattern varies. I used the following script and seemed to get perfect results. Of course there is no guarantee it will do the entire movie without any errors, but it should get pretty darned close. Note that I end the script with an AssumeFPS() statement. This is where you re-time the video to play at what you think is the correct rate. There is absolutely no set number for old silent films, many of which were hand-cranked. Also, because this is Harold Lloyd, there is a possibility that some scenes are undercranked so that the footage would look to be sped up when projected, for comedic effect. Code:
loadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\TIVTC.dll") AVISource("e:\fs.avi").killaudio() AssumeTFF() #change to BFF is you get field reversal tfm(display=false) tdecimate(display=false,mode=0,cycleR=34,cycle=128) AssumeFPS(12) Last edited by johnmeyer; 20th February 2020 at 03:08. Reason: removed word that has multiple definitions; it was confusing |
20th February 2020, 09:23 | #6 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
john
Thanks for the analysis. I just noticed that your script has still 3 duplicates (101,102), (142,143), (413,414) if I am not mistaken. My prodedure has basically been much the same as you described. For what it's worth here a script which I occasionally use for analyzing and visualizing progressive vs interlaced vs phase-shifted vs telecined video: Code:
clip="your source filter" clip=clip.AssumeTFF().converttoYV12(interlaced=true) current=clip.trim(0,-0).showframenumber(scroll=true,x=60,y=260,size=24) #the current frame n next=clip.trim(1,-0).showframenumber(scroll=true,x=60,y=260,size=24,offset=1) #the next frame n+1 even_current=current.separatefields().selecteven().subtitle("current (even field)",align=5,size=24) odd_current=current.separatefields().selectodd().subtitle("current (odd field)",align=5,size=24) even_next=next.separatefields().selecteven().subtitle("next (even field)",align=5,size=24) odd_next=next.separatefields().selectodd().subtitle("next (odd field)",align=5,size=24) matched=current.TFM(pp=0,display=true).subtitle("field matched",align=5,size=24) pic1=stackvertical(even_current,odd_current) pic2=stackvertical(even_next,odd_next) return stackhorizontal(pic1,pic2,matched) Last edited by Sharc; 20th February 2020 at 10:14. Reason: added pp=0 in TFM() |
20th February 2020, 12:08 | #7 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
Here an interpolated version with framerate doubling, for smoother playback at 23.976 fps. Judge yourself regarding interpolation artifacts etc.
https://www.mediafire.com/file/z9bqr...lated.mp4/file |
20th February 2020, 18:29 | #8 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Code:
TFM(pp=0) Apparentfps(Dupethresh=1.5) Dupethresh is quite high [noisy clip] but plenty of movement in clip so reasonably good result I think. [Although any edits could have affected result (result would a bit be too high where dupes edited out)]
__________________
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; 20th February 2020 at 18:31. |
20th February 2020, 18:32 | #9 | Link | |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
Quote:
For instance here is an original 16p source converted to 60p using 60p using an AAA,BBBB,CCCC,DDDD cadence: https://www.youtube.com/watch?v=YHYaYOMc4eo&t=86s Last edited by Cary Knoop; 20th February 2020 at 18:35. |
|
20th February 2020, 18:55 | #10 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
I have occasionally used motion estimation on movie film, but the artifacts are so severe, as shown in that test clip, that I almost always recommend against it. Also, these days most displays can show any frame rate and are not locked in to 25 or 29.97 fps.
So my recommendation, which I made in my other post, is to experiment with AssumeFPS() to find a frame rate that makes the motion look to be the right speed, and then not do anything else. Just save the file and watch it. You'll have it at the correct speed; you won't have any funky, and sometimes awful, motion estimation artifacts; and you won't have the additional judder that any pulldown cadence is going to impart. |
21st February 2020, 07:31 | #11 | Link | |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
It's a pretty simple one, with a cycle of only 22 frames: TFM(pp=0).TDecimate(Cycle=22,CycleR=6) For which you get 21.796fps. You might not want to leave pp=0 for the whole thing, in case there are some quirks along the way. If for another DVD, it can be soft telecined using DGPulldown. Otherwise I'd leave the framerate alone. Last edited by manono; 21st February 2020 at 07:34. |
|
21st February 2020, 16:20 | #12 | Link | |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Quote:
You can also do a bob(), but given how bob() works in AVISynth, you can get distorted results if you don't use the correct parameters. |
|
21st February 2020, 20:03 | #13 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
Of course this is subjective and I would not use it for the archive. |
|
22nd February 2020, 01:53 | #14 | Link | |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Quote:
I've observed the same thing, namely that people always notice the judder on horizontal camera pans in low framerate film (12-16 fps that is typical on these really old films), but seldom notice what, to me, are very obvious ME artifacts. I think the reason for this is that most ME artifacts persist for only one frame. By contrast, the judder can go on for 5-10 seconds (or more) in many scenes. Also, some of the ME artifacts, while pretty obnoxious when viewed on a freeze frame, don't always call attention to themselves when that degraded frame is shown in motion. While I can still make other arguments for not doing ME, such as maintaining more sharpness (watch the sprinklers in the background, for instance and see how fuzzy they get), funky grain morphing (it's probably a good idea to do grain reduction if you're going to do ME); occasional REALLY bad artifacts (I can link you to my usual moose antler doozie in a 1940's parade clip which uses ME in order to reduce judder), I think your tests trump any argument I can make. Last edited by johnmeyer; 22nd February 2020 at 05:54. |
|
26th February 2020, 01:08 | #15 | Link | |
Registered User
Join Date: Aug 2007
Posts: 44
|
Quote:
The software I use to encode MPEG2 doesn't accept 21.796 as a legal framerate either. What should I do know? My endgame here is a DVD by the way. |
|
26th February 2020, 08:19 | #16 | Link | |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Yes, sort of, it's for applying soft telecine to MPV/M2Vs (the 'elementary stream' mentioned) encoded for DVD. Don't know why you'd try to open an AVI in it.
Quote:
Oh, also, later I figured it was even simpler than I had written earlier. You can use this instead: TFM().TDecimate(Cycle=11,CycleR=3) Good luck! Last edited by manono; 26th February 2020 at 08:25. |
|
26th February 2020, 11:48 | #17 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
Hmmm, I think we arrived almost where we started:
Your .avi was actually prepared for DVD compliance by hard telecining the original film to 29.97fps. The pattern was unusual because of the unusual base rate of the original film. If you don't succeed with DGpulldown try this and compare with your .avi: Code:
AVISource("silent.avi") converttoYV12(interlaced=true) TFM().tdecimate(mode=0,cycle=11,cycleR=3) #progressive frames with unusual framerate, as discussed #assumeFPS(16) #adjust the playback speed as you prefer separatefields() changeFPS(59.94) #hard telecine, DVD compliant field rate weave() Last edited by Sharc; 26th February 2020 at 12:47. Reason: added #assumeFPS() .... |
26th February 2020, 18:22 | #18 | Link | |
Registered User
Join Date: Aug 2007
Posts: 44
|
Quote:
Do I have that right? Another question, since the film doesn't just start, it has some junk before it so if I trim that how do I know I'll be in the right place for the cadence to begin? Here's the clip: https://www.mediafire.com/file/17yid...start.avi/file Or is the script smart enough to recognize where the cadence starts? Thanks! |
|
26th February 2020, 19:05 | #19 | Link | ||
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Quote:
There are two 'patterns' at work here. One goes 533, the other 443. That means for each frame count, there's one duplicate. When I write 5, it goes 1,2,3,4,4. 4 unique frames and one duplicate. 5+3+3=11, three numbers listed means 3 duplicates. The cycle is 11 frames (5+3+3=11, 4+4+3=11) and within that 11 frame cycle are 3 dupe frames. To figure that out you do have to start at the beginning of a cycle and not at any old place. Once you learn how it's done, you can do most silent films this way, being sure to also know how to look for the possible problems as outlined by johnmeyer. And with respect to Sharc, the whole point to encoding it progressively and adding soft pulldown later on is to avoid the problems associated with hard pulldown. The bitrate savings are considerable, something like 40% for the same quality, as compared to encoding the interlacing. I didn't look at your new sample. Was there some reason I should? Is it different somehow from the earlier sample? |
||
26th February 2020, 20:10 | #20 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
Last edited by Sharc; 26th February 2020 at 20:13. |
|
|
|