#i hope this solves all your avisynth problems
Explore tagged Tumblr posts
michietuts Ā· 6 years ago
Video
youtube
This video will show you how to use my scripts to convert, resize, and crop multiple videos/scenes at once with avisynth. This is not a tutorial on how to make gifs in photoshop.Ā 
My scripts are adaptations of Brandinator’s original resizer set up. These adaptations fix a lot of the errors people would get before i.e ā€œNo video sequence header foundā€, allow you to cut multiple gif scenes in a fraction of the usual time, and introduce some new features to the resizer!
Before Watching:
Have Avisynth installed with the video and plugin folder from this post.
*Optional* review original setup post (This may be hard to understand)
Have an understanding of how to use Avisynth (Watch Brandinator’s Tutorial or MineĀ )
Download the Multiple Resize Zip Folder
Please give me feedback! If you would like a more in depth tutorial on any of my scripts, please let me know. If you get stuck, feel free to ask me any questions :-)
44 notes Ā· View notes
femaleidols Ā· 4 years ago
Note
hi, guys! been loving your blog for several years now! you all inspired me to start giffing with avisynth, but i've stumbled upon such problem and was wondering if you or your followers could please help out? ;_; so when i run a video through avisynth, it is less bright in avspmod than in resizer (in which it appears in it's original brightness) resulting in darkened cuts, so it messes the colour scheme of the processed video cuts and adjusting brightness in photoshop when i import them there doesn't look good, has anyone of you encountered such problem when giffing with avisynth?
Hello! Thank you for loving our blog, we're always happy to read that! ♄
Sadly, I'm not sure we can help you with this problem :( I tried asking around but I haven't found much to solve it. As annoying as it is, I would suggest uninstalling/reinstalling to make sure you haven't missed a pluggin or anything... But I know it doesn't always fix everything.
I hope our followers can comment below to give you possible solutions!! Please help our sweet anonie ♄
5 notes Ā· View notes
componentplanet Ā· 5 years ago
Text
DS9 Upscale Project Update: What I’ve Been Working On
It’s been several months since I wrote an update on my ongoing efforts to restore Deep Space Nine. I took a break from the project through much of June due to a move and an associated injury but jumped back into it in July and have been at work steadily since then. The majority have my time has been focused on understanding how shifting the episode into various alternative frame rates would impact motion smoothness and image quality.
In the past, I’ve written updates when I hit specific milestones I’d set for myself or discovered something I thought was interesting. This is more of a progress report. So, to begin: A bit of recap: I’m a lifelong Deep Space Nine fan who started this project in January and has pursued it since. I’ve been learning about video processing and encoding from scratch as I’ve worked, and according to everyone I’ve talked to, I didn’t pick a beginner-level project.
Deep Space Nine is a VFR (Variable Frame Rate) show, which means the DVD alternates between playing back at 23.976 fps and 29.97 fps at various points within the episode. This is a common format for late-1990s science fiction. Shows encoded in this fashion include Babylon 5, Stargate SG-1, Buffy the Vampire Slayer, Star Trek: The Next Generation (DVD-only), and Star Trek: Voyager.
The episode of Deep Space Nine I chose to treat as my test vehicle, ā€œSacrifice of Angels,ā€ is about 14 percent 29.97fps footage and ~86 percent 23.976fps footage. The problem is, applications like AviSynth cannot edit VFR video and must convert it to CFR (Constant Frame Rate). Applications like DaVinci Studio Resolve can technically ā€œhandleā€ VFR files, in that it will ingest them properly, but the resulting output periodically pauses in a way I couldn’t find a clean solution for. For now, unless I figure that out, processing the show requires that it be converted to CFR as an initial step.
If you encode a VFR show at 23.976 CFR, the 29.97fps content will be cut to 23.976fps and the playback may not be perfectly smooth. In some cases, you won’t see any stutter because there’s not enough motion on screen for the frame decimation to be visible. There’s a several-minute block of 29.97fps content in ā€œSacrifice of Angelsā€ when Dukat, Dumar, Weyoun, and the female Changeling are all talking at Ops. While there are a few telltale signs, you only really see it when Dukat walks around the table — and this is after both postprocessing and upscale.
youtube
The reason that Dukat’s hand and body are blurred as he moves is that, if you go frame-by-frame, what he’s doing looks like this:
I boosted the brightness a bit here, to make the shadow easier to see. Most of the frame looks normal, but you can see where Dukat’s hand is going to be in the next frame. The error is visible but small and confined to one part of the screen.
The fact that a lot of TNG-era Star Trek is conversation makes the frame rate shifts that much easier to deal with, but it’s still noticeable as heck when it happens. My goal has been to find an automated method of processing DS9 that would typically produce better motion during 29.97fps content sections. I spent the last few months playing with various methods of converting the show’s frame rate to see what the options would look like.
Source Sensitivity
The transmutative property of mathematics states that when you multiply two numbers together, it doesn’t matter what order you write the numbers in. 1 * 2 * 3 * 4 = 24. So does 4 * 3 * 2 * 1. Video processing is not transmutative. The order in which you apply filters changes what the final output will be. Video processing workflows need to be duplicated exactly in order to guarantee accurate results, up to and potentially including using the exact same application and filter versions.
There are a few reasons I’ve been exploring the outcomes for Handbrake and MakeMKV as opposed to using DVD Decrypter to create a VOB copy of the DVD data in 59.94 interlaced format.
First and foremost, I’ve yet to figure out how to get the video output quality to look anywhere near as good as what I’ve achieved with HB/MMKV without creating scripts for each episode. In point of fact, I haven’t completely figured out the episode scripting, either. This is what I get for taking my last programming course circa ā€œI Want It That Way.ā€
While we’re being honest, I want it this way, but we don’t get everything we want, do we ViacomCBS? Image from the ā€œWhat We Left Behindā€ DS9 documentary, showing what a remastered Defiant would look like.
My own best. Spoiler: The professional one is better.
Second, Handbrake offered some really simple options to batch up and test a huge range of file encode presets. In mid-July, I ripped ā€œSacrifice of Angelsā€ more than 250 separate times in Handbrake in order to examine the impact of various quality control settings, H.264 flags, frame rates, and deinterlacing options. Third, I finally figured out how to hand StaxRip a set of flags that would synchronize the audio/video playback of a VFR MakeMKV file, and I wanted to experiment with it. Finally, part of learning something is figuring out what not to do. I make a lot of mistakes and I make some of them on purpose, just to see how various ideas change the final output.
I have spent a great deal of time during the last two months playing with various methods of changing frame rates. AviSynth has a number of filters for changing the frame rate and different source filters yield subtly different outputs. I’ve experimented with various methods of interpolating up to 119.88fps before trimming back down — either to a compromise frame rate like 59.97 or back to 23.976. I’ve done a lot of testing combining a pass through Davinci Studio Resolve through further processing with AviSynth, or before AviSynth, or after. I’ve experimented with various H.264 quality levels and specific presets to look at the impact these would have on the areas of troublesome motion in the show. To be honest, I worked out a strategy for whatĀ I wanted to encode and allowed the encoding to race ahead of my actual evaluations. I’m still evaluating what I’ve created. If any of these methods had yielded a single clear winner, I’d have said so, but I’ve certainly seen some intriguing differences among the data. I’ve even played with some of the AI-based methods of interpolation to see how they’d compare.
Separately from this, I’ve experimented with deinterlacing based on 59.97 VOB files. Even with script help from some of the community at Doom 9, I haven’t found a single, broad, fire-and-forget solution that gave me as clear an image quality as what I’ve gotten from MakeMKV and Handbrake. Part of the reason I chose to stick with these sources when evaluating motion is that I knew I’d already achieved something reasonably close to what I’d consider final quality. I wanted to hold that set of variables constant and experiment with the methods I’d already worked with, especially when I had trouble achieving the same image quality. Still hoping to find one, but that’s why I chose to focus my time where I did.
The Pros and Cons of 119.88fps
One way of solving the 23.976fps and 29.97fps playback problem is to shift content up to 119.88fps. The problem with 119.88 — well, one of them, because there’s not just a problem — is that you’ve definitionally quintupled your workload. If it takes 15 wall-clock hours of mixed CPU and GPU processing time to upscale an episode of 23.976 DS9, it’ll take ~75 hours for 119.88.
That’s not great. And to add insult to injury, you need a 120Hz display to watch the output without dropping half the frames.
I’m still messing around with 119.88, because so far I’ve gotten the best overall results in those troublesome patches at this frame rate, but it’s hard to imagine attempting to do the show this way. Ampere would have to be more than 2x faster than the GTX 1080 Ti to make the GPU processing times anything near reasonable.
Alternatively, one can attempt a frame rate between 23.976 and 119.88, and I’ve been doing some experimenting there as well. These frame rates all require either the film or video portion of the material to shift playback speed by a non-integer multiplier, which means there’s always some degree of detectable something. What varies is just what that something is, and how often it pops up. I’ve also tested the outcomes if you upscale the video first, then process it. The end results are pretty good, but the clock time penalty for processing 2560Ɨ1920 clips versus 720Ɨ480 clips is larger than the resolution increase alone would suggest.
Where This Is Going
My plan is to assemble a set of options that make some reasonable tradeoffs as far as motion smoothness versus processing time versus frame rate, with at least two and possibly three targets. I’ve also been experimenting with masking and antialiasing lately, including using a version of an episode with fewer aliasing problems as an external antialiasing guide for a version of the same episode optimized for smoother motion. And it works!
…ish.
One of the things I’ve learned is that when searching for a best-fit line that will safely adjust a television show, you may be very lucky to find a single method that works for an episode. Asking for a method that globally works well for 176 episodes is asking a lot.
Most of the time, what you get is…ish, and some things are a heck of a lot ā€˜ishier’ than others. The external clip concept is interesting, but after playing around with it for a little while I’ve got my doubts about whether it can work. There are scenes that it transforms as perfectly as I could ask for — and scenes that, uh, don’t.
This is what ā€œDon’tā€ looks like.
I suppose a pertinent question to y’all would be: How much of what doesn’t work are you curious to see in the first place? I haven’t posted or talked much about failed experiments to date, and the reason this story doesn’t have more video is that I’m not sure what people would find interesting in the first place. It doesn’t seem all that interesting to just talk about what doesn’t work. If you find this sort of work-in-progress more interesting, or if you’d find it more interesting if I gave you more to look at, say so.
Now Read:
Deep Space Nine Upscale Project Season Finale: What We’ve Brought Ahead
Deep Space Nine Upscale Project (DS9UP): Technical Goals and FAQ
Upscaling Star Trek: Deep Space Nine Using Topaz Video Enhance AI
from ExtremeTechExtremeTech https://www.extremetech.com/extreme/313963-ds9-upscale-project-update-what-ive-been-working-on from Blogger http://componentplanet.blogspot.com/2020/08/ds9-upscale-project-update-what-ive.html
0 notes
componentplanet Ā· 5 years ago
Text
Deep Space Nine Upscale Project Update: ā€˜Sacrifice of Angels’
It’s been almost exactly a month since I published my last Deep Space Nine report, where I showed how different AI software could upscale the show to something approaching HD quality. Despite the ongoing pandemic, I’ve kept the Cascade Lake testbed and RTX 2080 crunching busily away, testing various permutations. Some folks have contacted me to express interest in working together, and I’ve learned some interesting things along the way.
I haven’t been able to find my DVDs, so I bought Season 6 brand-new and started working with that source. I chose Season 6 because it has some of the best space-combat scenes, including the largest battle ever staged in the Star Trek universe in the episode ā€œSacrifice of Angels.ā€ SoA was the obvious episode to work with and the Defiant image above is from an upscaled encode. Here’s the full shot.
I had hoped that the DVD source would offer a better upscaling alternative than using already-encoded MKVs. I still believe it does, but guys, I have to tell you — the baseline DS9 source sucks.
I watched this show when it was broadcast on cable, on a new 24-inch TV my parents had just bought. It’s one of my all-time favorite shows, and watching it on DVD looks nothing like watching it on TV did 25 years ago. Obviously the base resolution is low, but that’s not the problem. The video is noisy, it’s much darker than I remember, there’s a clearly visible 3:2 pulldown/telecine effect, and distant vessels are often heavily aliased (meaning they crawl with jagged lines). The credits are particularly bad as far as image quality. If the rest of the show looked as bad as the credits, I’d never want to watch it. I may upload a few videos just to show how rough they are.
Click to enlarge
This is what 3:2 pulldown looks like. You’re literally seeing half a frame of information, which is why every other line is blank. There are a number of these moments in any given episode, and while they don’t prevent anyone from enjoying the show, they can be annoying.
Nana Visitor’s reaction to the DVD source quality… or a very lucky pause on my part. You be the judge.
What I’ve Been Working On (and Learned)
Here’s the honest truth: You can get a pretty good looking video if you just rip the DVD without deinterlacing or detelecine via Handbrake (use the H.264 Production Max preset) and then upscale it. While the half-frame transitions are noticeable and annoying, upscaling this way actually cleans up some areas that are otherwise quite jagged and ā€œcrawlyā€ at specific points in the show. If you want a one-and-done solution and you aren’t bothered by the occasional half-frame, it’s a great option and I recommend it. The result is 70-80 percent of what I think is likely possible, best-case. If you rip the DVD using Handbrake’s detelecine option, it will solve the half-frame flicker, but at the cost of introducing additional aliasing that wasn’t present before. In my opinion, the telecined upscaled DVD looks better, on the whole, than the detelecined Handbrake output post-upscale.
My long-term goal with this project is to create a guide using as much free software as is possible (Topaz VEAI is obviously a paid purchase). I’m working with a reader who has done some incredible color balance changes, and I’m excited about what that might mean for the project.
What I’ve done for the past month? About 600GB of renders at 3-8GB each. I’ve been examining color grading with DaVinci Resolve, rescaling in that same application, various AviSynth filters for antialiasing, detelecine, and deinterlacing using algorithms like QTGMC. The truth is, I could accelerate the process if I focused on smaller clips, but I prefer to upscale the entire episode. That way, I can check any trouble spot or problem area in one area of an encode against all the previous settings I’ve tested, to see how that particular area was handled.
Another thing I’ve learned? The best version of Deep Space Nine would be constructed clip by clip, using optimized video processing settings for each. I have no intention of slicing and dicing episodes up by hand, but if there was an episode you truly loved, you could achieve some truly impressive results that way.
I want to show you a short clip from ā€œSacrifice of Angels.ā€ First, the DVD source and second, the upscaled output with QTGMC applied. QTGMC is a deinterlacing filter, not a detelecine filter, and it works by creating additional frames. The final output does not have the hypersmooth look of interpolated sports video, but I’ve had trouble matching audio to the clip. There’s a lot of hands-on learning involved in this kind of project because ultimately, each video benefits from a different set of filters. For best quality, change both videos to top available playback source.
youtube
This is the original DVD source. Note how the nacelles on the Miranda-class starship (the two ships in the opening frames) shimmer. This is telecined output, which means they look much better in this video than they do if I detelecine the source using Handbrake. There’s a lot of noise in certain frames and some visible compression artifacts in others.
youtube
This is the upscaled video after I applied QTGMC deinterlacing to it via a buggy and difficult-to-parse application named StaxRip. It’s been incredibly useful to me in certain respects, but if I’m being honest, I’m trying to find an alternative because this app is rather ornery and difficult to use. It also only seems to output H.265. Figuring out how to use applications like AviSynth (current user level: Bad) is part of the experience. One of our readers, Shortstick, has contacted me to show off some of his own color grading work on DS9, with impressive results:
youtube
We are looking into how to combine efforts and further improve the show.
Why I’m Doing This
If you watched Deep Space Nine on TV growing up as I did, I have news for you: You never actually saw the work that VFX designers put into those battle scenes. Watching ā€œSacrifice of Angelsā€ in upscale on a much larger display, I was struck by how incredible the shots were. The space battle in Insurrection may have had more expensive special effects and a few more years of CGI advances, but it didn’t involve half as many ships or as many complex maneuvers.
Until I started working on this episode, I never thought about how space combat evolved from Star Trek: The Next Generation to DS9. On TNG, battle is almost stately, with large ships firing at each other from static positions. The exception to this is stern chases, where the Enterprise is pursued by an opponent.
DS9 changed all that. The decision to introduce the Defiant and to make it a small ship completely changed the rhythm and flow of space combat. The Defiant wasn’t made for stately, sweeping broadsides — it’s an antimatter-powered flying gun that can absorb significant amounts of damage while it blows your ass into next week. Above all, the Defiant is fast, and Jadzia Dax is one hell of a pilot.
The entire battle ā€œlanguageā€ of Star Trek changed dramatically between TNG and DS9, largely on the backs of the VFX artists who were tasked with doing the work. DS9 didn’t just add more ships; it showed those ships doing more things, with background battles often as dramatic as the foreground shots. True, some people disliked the look and preferred the idea of a more spread-out fleet engagement, but I’m not one of them. I’m watching a show in which aliens with no concept of time live inside a stable wormhole. I don’t need the starships to stay far away from each other to enjoy the battle scenes.
Speaking of wormholes…
Watching this episode in standard DVD quality is like looking at a da Vinci painting with 500 years of grime on it. You can recognize the mastery of the work, but there’s a lot of schmutz between you and it. Thanks to advances in AI processing, we’re finally seeing consumer tools that can wipe the grime away — and not just for DS9, but for any number of additional shows. The artists that worked on these episodes deserve to have their work seen in something approaching the way it could have looked.
I’m never going to be able to make these old DVDs look as good as what Paramount could do. Heck, I’m never going to improve them as much as a professional video editor could do. But Paramount has no plans to upgrade DS9 itself, and that means the only way to restore the TV show to some semblance of how it could look is with a lot of elbow grease, filter testing, and one exhausted RTX 2080. I think the work deserves to be done, even if Paramount disagrees.
Interested in helping? Give me an email or sound off below. Got ideas or tips for using AviSynth? Get in touch.
Now Read:
Upscaling Star Trek: Deep Space Nine Using Topaz Video Enhance AI
Star Trek: Voyager Gets 4K Upscale Remaster via AI
Fan Works to Remaster Star Trek: Deep Space Nine in 1080p HD, Using AI
from ExtremeTechExtremeTech https://www.extremetech.com/extreme/308505-star-trek-deep-space-9-upscale-project-update from Blogger http://componentplanet.blogspot.com/2020/03/deep-space-nine-upscale-project-update.html
0 notes