I've rendered a long clip after deinterlacing it in AvsPmod. Most of the clip i'm satisfied with but this one segment is a bug bear. The original video shimmered briefly on the logo before settling down, but after QTGMC is applied it just picks up that shimmer and runs with it for the duration of the shot..
I've attached a before and after clip to show what i mean.
Code:SetMTMode(5,6) AVISource("F:\Video.avi") SetMemoryMax(2048) SetMTMode(2) AssumeTFF() AssumeFPS(25) QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true)
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 30 of 64
Thread
-
-
It's progressive content, that has been upscaled
Code:LWLibavVideoSource("Before.mp4") AssumeTFF() TFM(pp=0)
You might have to mix & match if the other sections are different
There is one combed frame at the beginning, but that's probably from the way you cut it -
Thanks, that seemed to fix it. Had to raise it to TFM(pp=2) though.
Having viewed it back again, it's actually not present on the original in it's interlaced state, VLC had it's own interlacer on.. I'll need to view it on my tv from the original capture device i recorded it on to see how it plays.
I used Avidemux to trim the clips, which of course isn't as frame accurate as i'd like.
Now i'll need to find a way to trim, cut out and rejoin the fixed segment to the precise frame, without having to re-encode the whole thing. -
-
-
No, you typically do it in the script before encoding
Avisynth frameserves uncompressed audio and video ; so you typically don't want to "stream copy"
But you're encoding everything anyways, right ? From some "AVI" recording source ? You're applying some avisynth filters anyways like TFM or QTGMC or whatever, right?
So you do everything in the script, filters, join, everything and encode the single file all at once
EDIT: But if you just want to replace certain sections, it can be tricky. Encode your replacement section(s) . They have to have the same characteristics in terms of pixel format, fps ,audio sampling rate etc... You have to cut the main video on IDR keyframes , then append the insert segment(s) to the main section(s) . It helps if you knew that beforehand and had used --stitchable for encoding settings . Sometimes little things can go wrong if you join, maybe glitch at the seams, some audio glitches . Sometimes it works . It's just much safer and more foolproof to do it all in 1 go in a single script.Last edited by poisondeathray; 15th Jan 2020 at 20:24.
-
I don't mind rendering it all again, it's probably easier to do it in the single script as you go. I'll watch it all back too to see if any other segments might need some TFM treatment. I will be using AVI as a recording source once i start capturing my VHS tapes, but i was using it after converting my MP4 files to loseless AVI in VirtualDub after having trouble with Avisynth trying to run other formats properly, but then realised i didn't have the correct plugin installed. LWLibavVideoSource works fine, but i can't get LWLibavAudioSource to work, or it will refuse to encode the file after i put it in.
Code:SetMTMode(5,6) LWLibavVideoSource("F:\HDD\New Volume\150914-2138.mp4") LWLibavAudioSource("F:\HDD\New Volume\150914-2138.mp4") SetMemoryMax(2048) SetMTMode(2) AssumeTFF() AssumeFPS(25) TFM(pp=2) QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true)
-
Code:
a = LWLibavAudioSource("F:\HDD\New Volume\150914-2138.mp4") v = LWLibavVideoSource("F:\HDD\New Volume\150914-2138.mp4") AudioDub(v,a) etc.
Code:LWLibavVideoSource("Before.mp4") TFM(pp=0) BilinearResize(width/2, height/2) aWarpSharp2(depth=10) nnedi3_rpow2(2, fwidth=width*2, fheight=height*2) aWarpSharp2(depth=10)
Last edited by jagabo; 16th Jan 2020 at 08:20.
-
Oh so TFM deinterlaces aswell? TFM makes the video run twice as fast (like it's in fast forward mode) Whilst i want the video to run 50p smooth (after combining 25i to emulate the smooth playback of how it was shown on tv) TFM declares 50fps, but it looks more like 100fps
And think that might need a bit of tweaking, as the CN logo looks a bit ripply.
Last edited by Master Tape; 16th Jan 2020 at 10:00.
-
Not exactly. But for your purposes here it does.
No, it does not. The problem is in the source video you uploaded. I didn't notice this before but your source is encoded interlaced with "separated fields". The 50 fps that MediaInfo reports is the field rate, not the frame rate. Many programs make the same mistake, including LWlibavVideoSource(). Sorry, I should have slowed my encoding to 25 fps. I don't know if your original source is the same. Use AssumeFPS(25) if necessary.
Adventure Time is shot at 24 fps. You're never going to get smooth 50 fps out of it.
The CN logo was overlaid after the video was upscaled (ie, it's true 1080i content, not upscaled SD like the cartoon). You have to decide for your self whether the logo is more important than the cartoon content.
Get a native NTSC HD source to start with. I recorded this off cable TV several years ago...Last edited by jagabo; 16th Jan 2020 at 10:48.
-
Yeah i'm not wanting to turn 24fps sources into smooth 50fps. There's numerous sources in the 44 minute long video, mostly live action, just to test things out. Using QTGMC corrects things to smooth 50fps, PAL video should run how it should, and film sources and flash animation like that maintain their look. I'll use TFM sparingly when needed, on progressive sources that give me grief.
This probably isn't right as i keep getting script errors trying to get the video to show up in the preview box, but this is the script i'm trying for example sake.
I should also point out "filter1, filter 2, ect" are highlighted in red which i'm sure is not supposed to happen..
Code:SetMTMode(5,6) v = AVISource("F:\Video Clip.avi") SetMTMode(2) vid1 = v.trim(0,1000).filter1(AssumeTFF().filter2(AssumeFPS(25).filter3(QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true)) vid2 = v.trim(1001,1100).filter1(AssumeTFF().filter2(AssumeFPS(25).filter3(TFM(pp=0)) vid3 = v.trim(1101,3000).filter1(AssumeTFF().filter2(AssumeFPS(25).filter3(QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true)) vid1 ++ vid2 ++ vid3
-
erase the words "filter1" , "filter2", "filter3" etc...
But you cannot join 25fps sections to 50fps sections; they have to have the same characteristics including framerate
You'd have to double up (duplicate frames) the 25p sections to 50p , eg. using ChangeFPS(50)
or make it timecode VFR (temporarily assume the same frame rate for the script, then use timecodes to control the playback). 25p sections play at 25p (no duplicates)
Code:SetMTMode(5,6) v = AVISource("F:\Video Clip.avi") SetMTMode(2) vid1 = v.trim(0,1000).AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid2 = v.trim(1001,1100).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50) vid3 = v.trim(1101,3000).AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid1 ++ vid2 ++ vid3
-
-
TFM is primarily a field matcher. It's used to restore progressive frames from telecined video. It has a post processor (the pp options) that looks for residual combing (usually orphaned fields) and applies a simple deinterlacing method (or you can supply your own deinterlaced frames to use instead). You would not want to use it on true interlaced video.
If you have many transitions an easier way to do this is to use ReplaceFramesSimple():
Code:SetMTMode(5,6) v = AVISource("F:\Video Clip.avi") SetMTMode(2) vid1 = AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid2 = AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50) vid3 = SomeOtherFilterSequence() vid1 ReplaceFramesSimple(last, vid2, Mappings="[1001 1100] [3001 4000] [6001 7000]") ReplaceFramesSimple(last, vid3, Mappings="[4001 5000])
-
Well as usual, nothing goes smoothly.. lol. Installed Avisynth+ tried to install AvsPmod x64, but kept getting an error when trying to launch the .exe file. Uninstalled Avisynth 2.5 aswell as Avisynth+, deleted their folders in the Program Files, reinstalled Avisynth+ but now see no sign of it in the Program Files.
-
Post the error messages - often they contain clues to what the problem is
You can also double check in vdub2 x64 as a secondary "preview" or to help debug in case there is an issue specific to avspmod, not avisynth+ (or classic)
Are you using these for avspmod ? There is nothing to "install"; it's a "portable" format
https://github.com/gispos/AvsPmod/releases
There is a newer installer for avisynth 3.4.0, is that the one you are using ?
You can actually just replace the .dll over old installations manually; This method assumes that all registration entries already exist
or there are tools to swap avisynth versions more easily
https://forum.doom9.org/showthread.php?t=172124 -
I think you need a newer smdegrain.avsi version
v3.1.2.101s or newer
https://forum.doom9.org/showpost.php?p=1790702&postcount=3Last edited by poisondeathray; 17th Jan 2020 at 14:25.
-
Ah, i had v3.1.2.93s installed.
Now there's this error. Masktools2 (v2.2.18) is in the plugin folder, but the error remains.
-
-
Yes the .dll. I think it was due to not having the correct version of AvsPmod running.
Tracking down all the correct plugins was quite the task, but low and behold i now have a preview window! Thought i'd never see it again
I can now preview QTGMC at a reasonable speed and not just a series of still frames!
And saw a significant boost to my render speed! Getting 10 frames a second or there abouts.
Only problem now is at the point TFM has been applied, i lose the sound and it remains mute for the rest of the video.
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) v = AVISource("F:\Video Clip.avi") vid1 = v.trim(0,119200).AssumeTFF().AssumeFPS(25).QTGMC(preset="Slow", matchpreset="Slow", matchpreset2="Slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid2 = v.trim(119201,120637).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50) vid3 = v.trim(120638,132580).AssumeTFF().AssumeFPS(25).QTGMC(preset="Slow", matchpreset="Slow", matchpreset2="Slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid1 ++ vid2 ++ vid3 Trim(0,132580) Prefetch(5)
-
What was the encoding fps before ?
Are you sure those trim frame reference numbers are correct? The first 3 refer to the original "v" frame numbres
After QTGMC, or ChangeFPS from 25 to 50, the frame numbers will be doubled
You have that Trim(0,132580) near the end, so you should not even see (or hear) vid2 or vid3.
Since that comes after the line vid1 ++ vid2 ++ vid3, it actually refers to the new frame numbers @ 50fps . It really means Trim(last, 0,132580) , where "last" is vid1 ++ vid2 ++ vid3 . That new framecount should be 265162 -
ie. Try deleting that last Trim(0,132580) line
One way to check for sync, realtime, preview etc.. is to modify the script temporarily. Change any slow filters to similar fast ones. e.g. QTGMC, replace with yadif(1,1) . Play the .avs in mpchc x64. The purpose there is only checking for sync, AV timing - not necessarily visual "quality" . In case hardware is not fast enough to playback QTGMC "slow" in realtime -
Remember you can return the state of processing or any stream at some intermediate point in the script to check the filtering:
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) v = AVISource("F:\Video Clip.avi") vid1 = v.trim(0,119200).AssumeTFF().AssumeFPS(25).QTGMC(preset="Slow", matchpreset="Slow", matchpreset2="Slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid2 = v.trim(119201,120637).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50) vid3 = v.trim(120638,132580).AssumeTFF().AssumeFPS(25).QTGMC(preset="Slow", matchpreset="Slow", matchpreset2="Slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true) vid1 ++ vid2 ++ vid3 return(vid1) # or vid2, vid3, or last (the output of vid1++vid2++vid3) Trim(0,132580) Prefetch(5)
-
It was very slow like 1fps, but was faster before i added TFM between QTGMC.
The reason i added the last Trim(0,132580) is because my video didn't end where i wanted it to, which was declared in the vid3 line. It rendered the rest of the footage i didn't want aswell extending the last frame of the video for another 44 minutes, basically doubling the length of the video. I still had the sound problem before i added the last Trim. And you are indeed correct, the frame count goes to 265162 without the trim on the end. But it's just displaying the last frame for the second half of frames beyond frame 133303, where the video ends.
After applying yadifmod2(1,1) in place of QTGMC i'm now getting a "Splice: Video frame rate doesn't match" error in the "vid1 ++ vid2 ++ vid3" line. -
for yadifmod2 you need to specify the actual arguments - it would be yadifmod2(order=1, mode=1) because the arguments are in different position (yadif is mode, order; but yadifmod2 is order, field, mode) . So yadifmod2(1,1) is actually order=1,field=1,mode=0 , which is single rate
Check each of vid1, vid2 and vid3 individually, and separately as jagabo suggested. I think you're mixing up frame numbers
What is the fps and framecount of "Video clip.avi" as read by AVISource ?
AVISource("F:\Video Clip.avi")
info()
Similar Threads
-
Removing aliasing/shimmering from vertical objects?
By Master Tape in forum RestorationReplies: 9Last Post: 19th Dec 2019, 12:17 -
Encoding Problem
By m00511 in forum Newbie / General discussionsReplies: 2Last Post: 18th Dec 2018, 07:44 -
x264 encoding problem
By umbie in forum Video ConversionReplies: 20Last Post: 18th Nov 2018, 04:32 -
Encoding Problem
By m00511 in forum Newbie / General discussionsReplies: 13Last Post: 20th Jul 2018, 08:50 -
x264vfw - problem with encoding
By Colek in forum Video ConversionReplies: 3Last Post: 13th Sep 2015, 04:19