Noted. I've been using FFDshow since I have it installed to all my computers that I use to watch videos on, alongside frostyboarders.By the way, even if you're watching the video via a script, you can still use the ffdshow function to automate the aspect ratio and cropping.
CR_FFDShow(960,540, 10,0,0,0, CropDAR=1.55, frosty=true)
The main difference between that and the standard CropResize, it the ffdshow function will crop more from the bottom than from the top for the specified CropDAR, rather than crop them evenly.
Of course if ffdshow is involved in the decoding, you don't need to do it in the script.
+ Reply to Thread
Results 91 to 110 of 110
To answer your question though, the result would have been the same doing it this way, not counting the extra ten pixels you were cropping from the left. The source I used was 704x528. It's just the way I did it at the time.
CropResize(960,540, 0,10,0,-30, frosty=true)
Okay. Thank you for your quick explanation. Everything seems to be in working order now. Which is all I could ever ask and once again thank you. I would like to know how you rendered those two example files that you posted earlier. AVI synth like we can on Windows. Maybe there is a way but I haven't found it yet. So my alternative solution is to pre-render some videos and watch them on my device with Frostyboarders hardcoded into the video. Another upside to doing that is I'll be able to fill out my entire screen. Most phones these days are much wider than 16 x 9 and still leaves black borders on the side even if you're watching a widescreen video. 4 x 3 video is even worse. I'd love to fill up those black areas with Frostyboarders. I've actually been able to repurpose a 16 x 10 computer monitor that I've had laying around for a couple of years. I despise that aspect ratio because while watching videos it leaves black borders on the top and bottom while watching a widescreen video. Now I've found a new use for the monitor after utilizing Frostyboarders with everything I watch now.
You don't normally encode Avisynth scripts?
To encode a script, you need a source filter to open the video. FFMpegSource/FFMS2 or LSMASHSource are the usual culprits for software decoding.
So the script for opening the video would look something like this. If ffms2.dll is in the plugins folder you can delete the first line, otherwise modify it accordingly. There's instructions on the FFMS2 & lsmash wikis for opening the audio too, although I usually just add the original audio to the encoded video.
LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll") FFVideoSource("E:\Some Folder\Some Video.mkv") FCropResize(Feather=20, Clone=2, Blend=0, Blur=20, TSoft=2) CR_FFDShow(960,540, 0,0,0,0, CropDAR=1.55, Frosty=true)
Save the script with an avs extension and you can open it with MPC-HC or Potplayer. Or you can use something like AvsPmod. The first time you open the script, it might take a few seconds, or more, depending on the video size, while ffms2 creates an index file. It'll only do that the first time, unless of course you delete it.
For encoding the script output I normally use MeGUI, but that might be a bit of over-kill just to encode. Maybe try something like Simple x264/x265 Launcher if you don't like playing with command lines yourself (I don't).
Or if you're an ffmpeg user, most ffmpeg builds will accept Avisynth scripts as the input, just like any other video file.
Are your source files mainly MP4s or MKVs etc? For DVD/mpeg2 video, DGIndex is the preferred source filter, rather than ffms2 or lsmash, but I'll leave that story for another time.
My videos are mainly MP4. I got the encoding part working, but... there wasn't any audio.
I tried FFAudioSource("E:\Some Folder\Some Video.mkv") but got an error, saying the video was too small. If I deleted FFAudioSource("E:\Some Folder\Some Video.mkv") then it doesn't give me an error, and of course, no audio.
How can I get the audio stream to be included in the encoding process? I'm using Simple x264/x265 Launcher
It doesn't look like Simple x264/x265 Launcher will encode audio, just video.
There's a combined function for ffms2 that decodes and outputs both. I can't remember if it's built into the dll or a separate script, but try
FFmpegSource2("E:\Some Folder\Some Video.mkv", atrack=-1) # the audio is disabled by default and atrack=-1 enables it.
FFMS2("E:\Some Folder\Some Video.mkv", atrack=-1)
If you open that script in MPC-HC or Potplayer you should have both. Failing that, combining FFVideoSource and FFAudioSource is very easy, once you know how.
A = FFAudioSource("E:\Some Folder\Some Video.mkv")
V = FFVideoSource("E:\Some Folder\Some Video.mkv")
And.... I just remembered a function I have so it's attached below. It's called FFMS3 so it doesn't have the same name as FFMS2, but I'm pretty sure the only difference is the audio is enabled by default. Being disabled by default used to annoy me no end.
FFMS3("E:\Some Folder\Some Video.mkv")
And... now I've been typing long enough for my brain to start contributing, you probably can't go too far wrong with VirtualDub2.
A quick test.....
FFMS3("E:\Some Folder\Some Video.mkv") CropResize(832,468, CropDAR=1.3, Frosty=true)
[Attachment 61920 - Click to enlarge]
Another option might be something with presets for hardware devices. Assuming there's one that'll accept scripts as the input. I don't know. There's a few all-in one converters in the software section though.
This looks interesting, although it's not free.
Thanks for your help. I got it working.
I will go into more detail later, but wanted to make sure I reached out to you and thanked you.
Today I came up with another idea. I'm not sure if you would run into the same limitations or issues that you experienced with the other suggestion that I came up with. What I had in mind was being able to apply a vignette effect to Frostyboarders. For reference, I've attached two screenshots below. A before and after of how Frostyboarders acts now and what I want the effect to look like.
The problem is still a gradient one though, and I don't think I could get it to look right with the clone borders because it's possible for stuff to the very left/right of the borders to be brighter than what's close to the picture edge, so even with the mask it didn't produce a consistent gradient type look. A similar thing has happened with your screenshot where the monitor is.
The original frosty borders would be a different story as they're just a small number of pixels stretched out to fill the border, so they're consistent from edge to picture (more or less) which means the mask can produce a gradient effect. I assume it'd need a much darker version of the borders, under the normal borders, with a gradient mask.
This is a simulation as I'm using a black to white gradient over the normal borders, but even though they're a bit dull as a result, the gradient look is there. Aside from the dullness, the gradient stays gradient-like when the picture is changing too.
A = FrostyBorders(704,396)
B = FrostyBorders(704,396, FrostyGradient=true, BColor=color_white)
Overlay(A, B, mask=B.Invert().ColorYUV(Levels="TV->PC"))
[Attachment 62257 - Click to enlarge]
Thinking about it, last time it was the blurring we were trying to make gradual. I can't remember if I tried the same with clone borders for a dark to light gradient. When I get a chance to play around with this properly I can try it with the clone borders too.
Edit: I played around some more and did it properly (although just from a fresh script, not in the function at all), but I don't think the gradient look works. Even for frosty borders the gradient appears to move around according to how bright the picture is. For a still shot it's okay.
[Attachment 62264 - Click to enlarge]
But have a look at the first sample. I find the way the gradient appears to change pretty distracting. Clone borders with less blurring and more picture are worse.
I think the only way it might look sensible is to blur the borders so much they're virtually a single color, and blend them together. I'm not crazy about the way that looks either but the gradient is more stable. See the second sample. It's extremely blurred clone borders blended together.
I haven't tried either with feathering as that's a whole other thing, but I can't imaging why they'd look any different feathered.... aside from the feathering.
Edit: Another thought. If you don't want a gradient as such, and just darker borders, you can darken them using the Bright argument. You can also adjust the contrast and saturation.
Playing around I discovered FrostyBorders was producing an error when feathering was enabled for the original frosty borders.
That's fixed and there's a new version dated 2021-12-09 in the opening post.
Well, thank you for looking into it for me. I agree with you that it's distracting to have that gradient mask enabled. I'm wondering if there software that allows you to apply a gradient vignette mask overlay of the entire display for your computer. I used a program that did do just that, but it did not seem to work with video players. That's kind of where I got the idea from. LOL. I'll keep looking or see if there's a workaround to get that software to recognize the video player and apply it to the video being played. If I do I'll get back to you and let you know just in case you are interested or any other users of frosty borders are as well.
If it can be a solid color that'd be a different story. When you overlay a solid color on the picture it'll be stable.
I downloaded a vignette mask and fiddled with it a bit, then made a blue copy to use as the solid color. There's quite a few vignette masks on the internet if you search for them. A little bit of tweaking and contrast adjustment and I ended up with an effect I'm sure I've seen in an old Doctor Who episode from the 70s. : )
[Attachment 62510 - Click to enlarge]
The feathering wasn't really designed for this, but maybe with a bit of tweaking it could produce a better vignette look. Once again, it's fine overlaying a solid color. I made the picture wider than 4:3 before adding borders as using the feathering it seemed to work better if the borders weren't too wide.
FrostyBorders(832,468, Plain=true, Feather=56, BColor=Color_Gray10, Bright=-10)
[Attachment 62511 - Click to enlarge]
Just for fun.
FrostyBorders(832,468, Plain=true, Feather=56, BColor=Color_Gray10, Bright=-10)
FrostyBorders(800,480, Plain=true, Feather=56, BColor=Color_Gray10, Bright=-10)
[Attachment 62512 - Click to enlarge]
Thanks for the update. I tried it on my end and although it works it's not the intended affect that I was looking for. I'm not sure if I phrased myself clearly in my previous post, but is it possible to load a transparent PNG file on top of any video that I have frosty borders enabled on?
Below I have attached the file that I wish to use. I found another piece of software that allows you to load any image and overlay it on top of your workspace on the computer. It also retains the transparency of PNG files. I was able to overlay it on top of potplayer and although it does work, it's a little cumbersome trying to get it to fill up the entire screen. If all else fails, I guess this could be a last ditch effort to have frosty borders enabled with a transparent vignette PNG file overlaid on top.
I haven't tried the image overlay thingy you linked to yet as it doesn't play nice with XP. I'm guessing this is what you're after though. I think it'll slot into the ffdshow function without too much hassle.
Video = ColorBars().KillAudio().CropResize(960,540).ConvertToYV24() Image = ImageSource("D:\test.png", pixel_type="RGB32") Image = Image.BilinearResize(960,540) Mask = Image.ShowAlpha("Y8") Image = Image.ConvertToYV24() Overlay(Video, Image, mask=Mask) ConvertToYV12()
[Attachment 62643 - Click to enlarge]
Let me know if that's correct, and if it is I'll update the ffdshow function.
It was easy to add it to FFDShow. All it takes is the following (after everything else in the FFDShow Avisynth filter).
The blue line needs to be modified for the correct image path, and the two FastBlurs are optional. The image/mask seemed prone to banding and a little FastBlur with dithering is probably the easiest (and quickest) way to reduce it.
Video = last Image = ImageSource("D:\test.png", pixel_type="RGB32") Image = Image.BilinearResize(width(Video), height(Video)) Mask = Image.ShowAlpha("Y8").FastBlur(2.0, dither=true) Image = Image.ConvertToYV24().FastBlur(2.0, dither=true) Overlay(Video, Image, mask=Mask)
Yes. You need a vignette image with an alpha channel to create the overlay mask. There's probably lots on the internet, or you can download the one thebib62 attached to post #103. Other than setting the correct path to the image, you can just add the stuff above to a script.
[Attachment 63065 - Click to enlarge]
PS Because the vignette image is resized to match the video resolution, you don't have to worry about the aspect ratio of the one you use. Just find one you like. I cropped the video to 16:9 first, but it's the same image here as above.
[Attachment 63066 - Click to enlarge]
Hope everything is going well. I'm updating this thread to let you guys know that I found a program on android called smooth video project. It's also available for Windows, Mac OS, and Lenox. This software is interesting because it has a feature similar to Frostyboarders, called "Black Bars Outer Lighting". It will fill in the black borders of a video file that does not match the aspect ratio of the display being used. Obviously, Frostyboarders is better in every way, but to my knowledge, there's no way to get AVI synth working on android. I'm going to reach out to the developers of smooth video project and see if they could implement your script into their software. Or at the very least, allow users to use their own custom AVI synth scripts on their android version. I am pretty blown away that I can watch all of my video content on Windows and now on my phone without any black borders all done in real time!