VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 4 of 4
FirstFirst ... 2 3 4
Results 91 to 104 of 104
Thread
  1. This is the video encoding using the fixed script, video now runs with audio and playing with correct speed.
    Perfect!

    Thank you hello_hello!
    Image Attached Files
    Quote Quote  
  2. You're welcome, although maybe download the new version again. I realised I made a little mistake about five minutes after uploading it (related to checking that the border widths are wide enough for images) so I fixed it and replaced the attachment in my previous post. Chances are you didn't download it before then, but just in case.

    I'm downloading your sample at the moment, but my internet connection is running like a dog today. If it doesn't drop the connection before it's done, it looks like it'll be 20 minutes away. The screenshots in your previous post look great!
    Quote Quote  
  3. I'll get the new script, thank you hello_hello!

    My internet connection today are really bad too, it took me forever to upload that sample, even a google search is very slow.

    Once again, thank you very much hello_hello!
    Quote Quote  
  4. I had some time to kill so here's another version.

    SideImages(Video, OutWidth, LeftImage, RightImage, Flip, Stretch=false, BlankFrame=false, Offset=1.0)

    It's pretty much the same as before, except when BlankFrame=true and borders are being added, one additional frame is added to the end of the video. That frame is completely blank, without the images for borders.

    Offset can be used to move the picture off centre. The default is 1.0 and the range is from zero to 2.0.
    Offset values less than 1.0 decrease the size of the left border and increase the right border. Values greater than 1.0 decrease the size of the right border. The border should be totally on the left when Offset=2.0 and totally on the right when Offset=0. It's not really linear but it's at least a way to adjust the relative size of the borders.

    The attached screenshot is Offset=0.75.

    Flip works much the same way, flipping the left image to the right if no right image is specified, unless Offset=0, in which case if you only specify a left image it'll appear without being flipped on the right. You can still over-ride the defaults with Flip=true/false.

    This version doesn't use the first frame of the video for the border image when no LeftImage is specified. That seemed pointless as you can always specify that for LeftImage yourself if you want to, so instead it adds plain black borders until border image(s) are specified.

    Hopefully I didn't introduce any gremlins.
    Image Attached Thumbnails Click image for larger version

Name:	offset.jpg
Views:	7
Size:	30.3 KB
ID:	52284  

    Image Attached Files
    Last edited by hello_hello; 10th Mar 2020 at 20:25.
    Quote Quote  
  5. That is really nice hello_hello!
    Thank you!
    Quote Quote  
  6. amaipaipai,
    Here's a new function of you want to give it a test drive. It works much the same way as FrostyBorders. The argument names for the images are now Image1 and Image2.
    If you need to crop, you'll either have to use the crop function first, or if you need to specify an InDAR and cropping will change it, crop and resize with CropResize first as before. If you don't need to crop, ImageBorders can be used on it's own.

    ImageBorders(Video, OutWidth, OutHeight, Image1, Image2, Matrix1, Matrix2, \
    InDAR, InSAR, Mod, Flip, Stretch, BlankFrame, Offset, Resizer, IResizer)

    There's no longer any need to make sure the color formats or bit depths match, the only thing you need to check yourself is when images need to be converted to YV12 etc, their width and height are the correct mod (ie mod2), otherwise you'll get an error. I'll probably add a check for that later and automatically crop a pixel for mod2 if need be. I'm bored of looking at it at the moment.

    Mod determines the width mod of the video when borders are added to the sides, or the video height when borders are added top and bottom. The default is Mod=4.

    Matrix1/Matrix2 lets you specify the matrix when the border images need to be converted from/to RGB. The default is matrix="rec601", the same as for the Avisynth Convert functions.
    If Matrix2 is unspecified, Matrix1 is used.

    Resizer specifies the resizer for the video. The default is "Spline36".

    IResizer can be used to specify a resizer for the border images, independent of the video resizing (assuming they need to be resized). If IResizer is unspecified it defaults to the same as Resizer.

    See post #101 for an updated/fixed version.

    BorderImage = ImageSource("Border.bmp")
    Screenshot 1
    ImageBorders(720,540, BorderImage, Offset=0.75)
    Screenshot 2
    ImageBorders(720,400, BorderImage, Offset=0.75)
    Image Attached Thumbnails Click image for larger version

Name:	LetterBox.jpg
Views:	5
Size:	71.0 KB
ID:	52312  

    Click image for larger version

Name:	Pillarbox.jpg
Views:	5
Size:	51.3 KB
ID:	52314  

    Last edited by hello_hello; 13th Mar 2020 at 12:57.
    Quote Quote  
  7. I'm not home right now but I'll give a try.

    Thank you hello_hello!
    Quote Quote  
  8. Working GREAT.

    Thank you hello_hello!

    Elvis 1
    Code:
    A = ImageSource("EA.png")
    B = ImageSource("EB.png")
    ImageBorders(1920,1080, A, B)
    Elvis 2
    Code:
    BorderImage = ImageSource("EA.png")
    ImageBorders(1920,1080, BorderImage)
    Elvis 3
    Code:
    A = ImageSource("EA2.png")
    B = ImageSource("EA2.png")
    ImageBorders(1920,1080, A, B)
    Image Attached Thumbnails Click image for larger version

Name:	Elvis1.png
Views:	6
Size:	1.07 MB
ID:	52321  

    Click image for larger version

Name:	Elvis2.png
Views:	7
Size:	1.34 MB
ID:	52322  

    Click image for larger version

Name:	Elvis3.png
Views:	7
Size:	1.03 MB
ID:	52323  

    Click image for larger version

Name:	EA.png
Views:	5
Size:	306.7 KB
ID:	52324  

    Click image for larger version

Name:	EA2.png
Views:	4
Size:	321.9 KB
ID:	52325  

    Click image for larger version

Name:	EB.png
Views:	3
Size:	21.2 KB
ID:	52326  

    Last edited by amaipaipai; 12th Mar 2020 at 11:53.
    Quote Quote  
  9. You're welcome.

    I had some time to kill again, so here's the (hopefully) final version. It's the same as the previous version except it now crops the images to the correct dimensions (if need be) before converting them to the same color format as the main video.

    The Mod setting for the main video is also self adjusting.
    If Offset=1, the default Mod is twice the required mod for the color format. That means for YV12, which requires a mod2 width, the default Mod picture width (or height when adding top/bottom borders) would be mod4, so if you also specify a mod4 Outwidth (or OutHeight), the borders/images will always be exactly the same size. If Offset doesn't equal one, the Mod setting defaults to the same mod the color format requires. ie Mod=2 for YV12. In any case, you can over-ride those defaults by using the Mod argument to specify something else.

    I'll probably add ImageBorders to the same thread as FrostyBorders once I get around to creating a proper help file.
    Last edited by hello_hello; 13th Mar 2020 at 12:25.
    Quote Quote  
  10. There's always something...

    Uploaded again to fix a silly that stopped Stretch=false working for top/bottom borders.

    ImageBorders(640,360, A, InDAR=2.0/1.0, Stretch=false)
    Image Attached Thumbnails Click image for larger version

Name:	snapshot.jpg
Views:	6
Size:	59.1 KB
ID:	52343  

    Last edited by hello_hello; 13th Mar 2020 at 12:54.
    Quote Quote  
  11. Doh! Third time lucky.....
    Image Attached Files
    Quote Quote  
  12. Nice work!

    Thank you hello_hello!
    Quote Quote  
  13. There's a link for an updated version of CropResize in the opening post, containing some minor fixes. The new version is dated 2020-03-26. There's a text file included describing the changes.

    amaipaipai,
    I fixed some minor gremlins in the ImageBorders function and added an Info argument for displaying the picture and border size etc over the video. There's also a wrapper function included so Info=true can be enabled by preceding the function name with "i" as per the CropResize function. ie iImageBorders()
    The minimum image border size now changes according to the resizer being used. There's details in the help file. Images under the minimum width/height can be used as long as they don't need resizing.
    There's also an updated version of SideImages included in the ImageBorders zip file. There's a link in my signature.
    Quote Quote  
  14. Great work hello_hello, works like a charm.

    Thank you!
    Quote Quote  



Similar Threads