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 10th February 2019, 18:32   #1061  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
If you want to put this on DVD, which only accepts 30 fps (29.97), what you can do is duplicate (or interpolate) frames to 32 fps, and then use AssumeFPS(29.97) to change the speed of playback. All this does is change the playback speed, like slowing down the film projector speed. I doubt you will notice that change in speed and indeed, most PAL films are sped up from 24 to 25 fps without any adjustment, and people don't notice or complain.

FWIW, my advice is to not use interpolation to go from 16 to 30 or 32 fps. I do film transfers and have spent a LOT of time with motion estimation, tweaking all the settings to get the best possible results. The problem: motion estimation always fails at some point. You can count on it. And, when it fails, it does so spectacularly.

Having said that, I did use interpolation for some 1940s parade footage I posted on YouTube. You'll probably recognize the footage because StainlessS and others have used it a lot for testing various scripts. The problem is that at 16 fps, the temporal gap between frames is huge and therefore the motion estimation has a really hard time predicting where all those little blocks should be moved in order to synthesize the new frame. Even though I knew I'd create some problems, I used it on this clip because there was so much horizontal movement that the judder effect you get from slow frame rates was overwhelming (we were taught to never do horizontal pans with a movie camera).

Things to look for when watching this clip:
  • Artifacts when objects get revealed as the parade float moves down the street.
  • Artifacts from people legs moving back-and forth
  • Artifacts from waving flags.
  • The moose antlers (by far the worst artifact)
  • Rotating spokes on wheels
  • Object moving across the frame, close to the camera

I can go on, but you get the idea.

Here's the clip:

1940 Flint Michigan Parade
johnmeyer is offline   Reply With Quote
Old 10th February 2019, 20:49   #1062  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 482
I quote everything.
Unfortunately, linear interpolation is prone to fail and it will fail in a way or another.
Overall it looks smooth, but - as john said - motion estimation introduces artifacts,
from the most subtle ones:





to the more evident ones:





'till the most spectacular ones:




Truth is: there's nothing we can do about it, no fine-tuning of MVTools, not magical alternative filters that use magical algorithms, not hybrid blend-interpolation scripts based on mythological error estimation, nothing...
If you have to conform it to DVD, I would either blend or duplicate frames, but since blending would make it look even worse, my suggestion is to duplicate frames.
By the way, @sys32768 I'm sorry I didn't help you out any further when you uploaded the sample on the other topic, but I'm not that good with despot, descratch, image stabilization, denoise and color correction of old sources as I rarely do it, so I left it to other people.
Here on Doom9 there are more competent people when it's up to dealing with these kind of sources; for instance Fred and John are way more expert than me on this subject.
FranceBB is offline   Reply With Quote
Old 11th February 2019, 21:06   #1063  |  Link
sys32768
Registered User
 
Join Date: Dec 2018
Posts: 17
Here's an early 1960s parade I interpolated from 16fps to ~30 FPS: . No stabilization added. Basically just GamMac and interpolation. I've basically given up on sharpening because I cannot seem to find a "sweet spot".

For me personally, I prefer the 30fps because it feels more natural and lets me focus in on the faces. I definitely see the artifacts but I find 16fps makes the entire picture distracting with flickering/choppy frame rates. That being said, I'm storing all my 8mm with the 16fps originals along with the 30fps post-produced ones out of respect for the material and future generations who will see it.
sys32768 is offline   Reply With Quote
Old 11th February 2019, 21:32   #1064  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
That's a really nice looking transfer.

The playback was not smooth for me, but hopefully that is Vimeo, and not your transfer or the process you are using to interpolate to 30 fps. I am seeing persistent jerkiness, as though a frame is being dropped. If no one else sees it, then it is probably just Vimeo which often gives me problems, no matter what computer or browser I use.
johnmeyer is offline   Reply With Quote
Old 11th February 2019, 21:37   #1065  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,611
Makes me think of The Wonder Years.

I see some judders too. Probably a Vimeo issue. I'd seen YouTube be similarly slightly jerky on certain combinations of encoding settings.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 11th February 2019 at 21:43.
wonkey_monkey is online now   Reply With Quote
Old 12th February 2019, 11:52   #1066  |  Link
algia
Registered User
 
Join Date: Oct 2018
Location: Italy
Posts: 2
Hi,
I'm trying to use the original cleaning script from 2006 (first post) made by VideoFred, but it uses MVAnalyseMulti and MVDegrainMulti which are from the 'Josey Wells' multi-threaded version of MVtools, which is deprecated now.
I tried to change them to MAnalyse and MDegrain, but the parameters that Fred passes on the script are not recognised, so I think that - perhaps - the syntax has changed over time.

Code:
vectors= cleaned.MAnalyse(refframes=denoising_frames, pel=2, blksize=block_size, blksizev= block_size_v, overlap=block_over, idx=1)
denoised= cleaned.MDegrain(vectors, thSAD=denoising_strenght, SadMode=1, idx=2).unsharpmask(USM_sharp_ness3,USM_radi_us3,0).sharpen(last_sharp)
Do you have an updated version of the script?
Full script: https://pastebin.com/bQh7kEqZ

Thank you in advance,
Livio
algia is offline   Reply With Quote
Old 12th February 2019, 20:18   #1067  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
Quote:
Originally Posted by algia View Post
Hi,
I'm trying to use the original cleaning script from 2006 (first post) made by VideoFred, but it uses MVAnalyseMulti and MVDegrainMulti which are from the 'Josey Wells' multi-threaded version of MVtools, which is deprecated now.
I tried to change them to MAnalyse and MDegrain, but the parameters that Fred passes on the script are not recognised, so I think that - perhaps - the syntax has changed over time.
You can use any of my versions of his scripts. I posted them fairly early on in this long thread. One of the first things I did was to upgrade to the newer versions of MVTools (i.e., MVTools2).

Here is the latest version, although it may have some bugs in it. Search on my user name within this thread to find the earlier versions which are a little simpler, and better tested.

https://forum.doom9.org/showthread.p...34#post1861734

Last edited by johnmeyer; 12th February 2019 at 20:18. Reason: typo
johnmeyer is offline   Reply With Quote
Old 12th February 2019, 21:08   #1068  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,289
John, If you have a script that you use often and (like me) dont like to make copies of the script, & have to change source file name [its so irksome], then Avisynthesizer_Mod is real handy.
(https://forum.doom9.org/showthread.p...ynthesizer_Mod)

Just add this into your script, eg
Code:
#ASYNTHER Simple-AVISource reader
[AVISource("___FILE___")]
/*
   ... etc
*/
The #ASYNTHER line must be first in script, and the text following [in this case Simple AVISource reader] is shown in menu so that you can select the above script template,
(after Right click on clip, and SendTo Avisynthesizer).
The [AVISource("___FILE___")] line can live anywhere and ___FILE___ [3 underscore] is where source filename will be inserted.
Source filter should be enclosed in [], where multiple selected source files will be concatenated using same source filter.

if you use eg below instead you can just provide a file name, and do whatever you will with it (No concatenation attempted, as no [] brackets).

Code:
#ASYNTHER BATCH_Filename_Processor
SourceFile = "___FILE___"

SomeSourceFilter(SourceFile)
# ...
Above will allow creation of multiple [or just one] scripts for each filename that you group selected before SendTo.
Another similar example
Code:
#ASYNTHER BATCH_MySource
MySource("___FILE___")

Return Last

Function MySource(String fn) {
    RT_DebugF("We Are Loading file '%s'",fn)
    Return AviSource(fn)
}
Same but Not Batch, will concatenate multiple selections, sending each filename to Debug output
Code:
#ASYNTHER Simple_MySource
[MySource("___FILE___")]

Return Last

Function MySource(String fn) {
    RT_DebugF("We Are Loading file '%s'",fn)
    Return AviSource(fn)
}

And another
Code:
#ASYNTHER BATCH_simple_avisource_43
AVISource("___FILE___")
RT_SignalDar2(4,3) # Auto set Aspect Ratio for MeGUI
ConvertToYV12 # EDIT: Keep MeGUI happy, if loads as eg YUY2 or RGB
Return Last
Creates script for each file in a group selection, ie BATCH MODE where missing [] brackets.


I've lost scripts before now, where I cut them to somewhere else, instead of copy [and later deleted], so above can be also safer.
__________________
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; 13th February 2019 at 18:25.
StainlessS is online now   Reply With Quote
Old 13th February 2019, 02:12   #1069  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
StainlessS,

Thanks for that. I missed your post seven years ago. I'm happy with my current versioning approach, but I see some other things in Avisynthesizer_Mod that I can use, especially batch creating AVS files.

So, thanks for the extensive description and for creating another great piece of software.
johnmeyer is offline   Reply With Quote
Old 13th February 2019, 17:28   #1070  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Gent, Flanders, Belgium, Europe, Earth, Milky Way,Universe
Posts: 625
Quote:
Originally Posted by StainlessS View Post
Avisynthesizer_Mod is real handy.
(https://forum.doom9.org/showthread.p...ynthesizer_Mod)
Another fine StainlessS tool, thank you!

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 13th February 2019 at 17:53.
videoFred is offline   Reply With Quote
Old 13th February 2019, 17:52   #1071  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Gent, Flanders, Belgium, Europe, Earth, Milky Way,Universe
Posts: 625
Quote:
Originally Posted by sys32768 View Post
Here's an early 1960s parade I interpolated from 16fps to ~30 FPS: No stabilization added. Basically just GamMac and interpolation. I've basically given up on sharpening because I cannot seem to find a "sweet spot".
I have done lots of sharpening tests on digitized 8mm film files. For me, the best way is to sharpen in steps with unsharpmask. Big radius first, then smaller radius. And some blur between the sharpening steps will help to avoid sharpening artefacts.

For example:
Code:
yourfile.unsharpmask(30,6,0).blur(0.8).unsharpmask(30,4,0).blur(0.8).unsharpmask(30,2,0).blur(0.8)
First parameter is strenght, second parameter is radius, third parameter... I have forgotten but it must be set to 0

Anyhow, play with strenght and radius from all steps and see what you get. Of cource you can play with the amount of blur between the sharpening steps too.

Now, about this Flashscan HD transfer: it's not very sharp, is it? I can barely see any film grain. The Flashscan works with continue film transport. This means that the continue moving frames are 'frozen' with a very short Led light flash. If this flash is to long, there will be some motion blur. I also have the impression there are dropped frames now and then.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 13th February 2019, 18:36   #1072  |  Link
sys32768
Registered User
 
Join Date: Dec 2018
Posts: 17
Quote:
Originally Posted by videoFred View Post
I have done lots of sharpening tests on digitized 8mm film files. For me, the best way is to sharpen in steps with unsharpmask. Big radius first, then smaller radius. And some blur between the sharpening steps will help to avoid sharpening artefacts.
Thank you, Fred! That simple line is giving me the same quality sharpen as I was getting testing PhotoShop CC unsharp. On this particular clip (which does seem blurry as you stated), I did the first unsharp as 130 and the 2nd unsharp as 60 and left everything else like you shared. Fantastic!

The issue now is doing this post-interpolation sharpens the odd artifacts excessively. I will see how it looks if I sharpen before interpolation.
Attached Images
 
sys32768 is offline   Reply With Quote
Old 13th February 2019, 20:31   #1073  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
Since multiple people have now commented on what appear to be dropped frames, you need to make sure that your actual transfer (as opposed to the Vimeo version) doesn't have these. Perhaps you could upload 10-15 seconds of original footage for people to look at. If you have dropped frames, everything else needs to be put aside until you get that fixed, not only because it looks bad, but also because all the algorithms in Fred's amazing scripts rely on having consistent temporal cadence from one frame to the next.
johnmeyer is offline   Reply With Quote
Old 13th February 2019, 20:47   #1074  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,649
You can download the original upload from vimeo with youtube-dl . It looks like he used handbrake to encode (vimeo doesn't, so you know it's the original) . VFR, 29.52 fps, and indeed there are dropped frames. Probably handbrake's fault, use of wrong settings; but possibly a procedural error in the workflow too
poisondeathray is offline   Reply With Quote
Old 13th February 2019, 22:02   #1075  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
Quote:
Originally Posted by poisondeathray View Post
You can download the original upload from vimeo with youtube-dl . It looks like he used handbrake to encode (vimeo doesn't, so you know it's the original) . VFR, 29.52 fps, and indeed there are dropped frames. Probably handbrake's fault, use of wrong settings; but possibly a procedural error in the workflow too
Thanks for doing that!

It confirms what I saw, and definitely provides backing for my statement that the OP should not spend any time on these other somewhat ancillary issues, until he figures out and fixes this very fundamental problem.

I've downloaded from YouTube many times, but AFAIK, that is always re-encoded video. Vimeo used to keep the original video for download for a period of 1-3 months, as I remember. It sounds like they still do that.

Last edited by johnmeyer; 13th February 2019 at 22:03. Reason: hit "post" my mistake
johnmeyer is offline   Reply With Quote
Old 14th February 2019, 00:13   #1076  |  Link
sys32768
Registered User
 
Join Date: Dec 2018
Posts: 17
Quote:
Originally Posted by johnmeyer View Post
Thanks for doing that!

It confirms what I saw, and definitely provides backing for my statement that the OP should not spend any time on these other somewhat ancillary issues, until he figures out and fixes this very fundamental problem.
Are you guys assuming the original transfer (16fps .MOV ProRes) is missing frames? I do see the occasional skipping and jumping in that particular parade clip on the source transfer too, but if that's the case what can I even do?

Unfortunately the parade section is inside a 30-minute reel so I'd have to split it out to AVI.

In the Vimeo uploaded parade clip, I first ran the 16FPS version through this for interpolation (but no stabilization):

Code:
super=SVSuper("{gpu:1, pel:2}")
vectors=SVAnalyse(super, "{block: {w:16, overlap:3}}")
SVSmoothFps(super, vectors, "{}",mt=1)
That outputs a 32FPS. So I think in Handbrake I set it to 30FPS and VFR.

Now that I'm sharpening, however, the interpolation is starting to look more wonky than ever so maybe it's time to just stick to stabilization and live with 16fps.
sys32768 is offline   Reply With Quote
Old 14th February 2019, 01:04   #1077  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,091
I'm assuming nothing. The only way to diagnose this is to start with a 10-15 second clip from the original transfer (cut without re-encoding it), preferably from the same footage you've already posted.

I have seen "frame accurate" systems that do end up dropping frames, usually from the software used to run them. This software is often created by people who are not seasoned programmers, so they make lots of mistakes.
johnmeyer is offline   Reply With Quote
Old 14th February 2019, 02:07   #1078  |  Link
sys32768
Registered User
 
Join Date: Dec 2018
Posts: 17
Quote:
Originally Posted by johnmeyer View Post
I'm assuming nothing. The only way to diagnose this is to start with a 10-15 second clip from the original transfer (cut without re-encoding it), preferably from the same footage you've already posted.
OK I dropped a 15s AVI here of the parade. There's also a .MOV from the same transfer company of another short reel:

https://1drv.ms/f/s!AkeySxbVM_V_lJs69EQAB9p_3huXjQ
sys32768 is offline   Reply With Quote
Old 14th February 2019, 14:50   #1079  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Gent, Flanders, Belgium, Europe, Earth, Milky Way,Universe
Posts: 625
Quote:
Originally Posted by sys32768 View Post
The issue now is doing this post-interpolation sharpens the odd artifacts excessively. I will see how it looks if I sharpen before interpolation.
Yes, I do the sharpening myself before interpolation.

Now, while talking about interpolation... John is right of cource. There will always be unwanted artefacts. But if you are using svpflow with the Interframe.avs script, there is a parameter called 'OverrideArea'. If you set this to -say- 150 and above then the result will be less interpolation and more frame blending.

No time anymore now... will come back with some more information about aWarpsharp.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 15th February 2019, 20:40   #1080  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Gent, Flanders, Belgium, Europe, Earth, Milky Way,Universe
Posts: 625
Quote:
Originally Posted by videoFred View Post
For example:
Code:
yourfile.unsharpmask(30,6,0).blur(0.8).unsharpmask(30,4,0).blur(0.8).unsharpmask(30,2,0).blur(0.8)
First parameter is strenght, second parameter is radius, third parameter... I have forgotten but it must be set to 0
Got it! It's threshold:
http://avisynth.nl/index.php/WarpSharp/UnsharpMask

Setting it to 2 or 3 (not more) will reduce artefacts.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred 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 12:19.


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