I am preparing a workflow of post-production for a theater troupe. The videos should include a poster of the show at the beginning. I made one and ensured that the resolution matched that of the video, then used this thread to include the poster:
Can AviSynth+ deal with posters that don't have the same resolution by resampling the image and padding the borders, e.g. a portrait poster in a landscape video?Code:ImageSource("C:\Path\To\Picture.jpg", FPS=25, End=250)
+ Reply to Thread
Results 1 to 7 of 7
-
-
Speak a little more about your overall workflow and what tools you're using.
You can certainly prepare stills with avisynth, but most editing software will allow you to simply import them.
Given some of the questions you've been asking here, you may want to think about using a real NLE -- even a freebie like hitfilm or resolve to get your work done. Again, there's nothing wrong with learning avisynth if that's your goal.Last edited by smrpix; 22nd Feb 2020 at 06:48.
-
Also know that avisynth doesn't automatically do much - it is scripted, and has to be explicitly told to do whatever you were wanting it to do.
And if you plan on doing overlays, you will need to exactly match dimensions of your sources, else they will not line up properly, or the software will may add padding to the result (making it oddly dimensioned), or some other nonsense.
NLEs are a better alternative, but compositing apps such as After Effects may be better still (for the stated purpose).
Scott -
-
smrpix: some members of the theater troupe make the poster in the software they like the most, e.g. Photoshop, GIMP, CorelDraw, etc. Their objective is something that serves for A1. Then other members of the troupe (currently me), include that poster with footage from the show. I know enough to take source files, edit them, and export them to the right resolution for videos, but other people may not be so savvy. So I am looking for a way to include stills to make it easier for future members in charge of videos.
smrpix: I had been using a "real NLE" such as iMovie and Final Cut Pro, but grew frustrated of the difficulty of fine-tuning and version control of the source files. I found AviSynth+ through a question on StackExchange, have been using it for a few months, and it is exactly what I am looking for. I looked quickly at Hitfilm and Resolve and neither seem scripted like AviSynth+, but correct me if I'm wrong.
The code by Jagabo seems to do what I want. I'll add some code to find the right image size and padding. -
With a little work it can be made into a function that automatically generates all the right values. You'll also need to change the frame rate.
<edit>
I had a little time so I wrote a function that will create a still image of a specified length that matches the parameters of a specified video.
Code:########################################################################## # # Create a video of a specified length (seconds) from a still image. # Match the properties to those of a specified video. # The still image is automatically resized and letter/pillar boxed to # retain its aspect ratio. It is assumed the source video and the image # are square pixel. # ########################################################################## function MatchStillToVideo(clip v, string image, float seconds) { # get the still image as an RGB video with the same framerate as the video, and specified running time still = ImageSource(image, fps=v.framerate, end=Int(v.framerate*seconds)) vidAR = v.width / v.height # 1.777 stillAR = still.width / still.height # 1.333 # if vid aspect ratio > still aspect ratio: resize still to vid height, scale the width proportionally # else: resize still to vid width, scale height proportionally vidAR > stillAR ? still.Spline36Resize(still.width*v.height/still.height, v.height) : \ still.Spline36Resize(v.width, still.height*v.width/still.width) # add borders to match the still frame to the video frame AddBorders((v.width-last.width)/2, (v.height-last.height)/2, v.width-last.width-((v.width-last.width)/2), v.height-last.height-((v.height-last.height)/2)) #colorspace conversion v.IsYV12() ? ConvertToYV12() : last v.IsYUY2() ? ConvertToYUY2() : last } ########################################################################## video = LSmashVideoSource("source.mp4") still = MatchStillToVideo(video, "image.jpg", 3.5) still++video # append video to still video
Last edited by jagabo; 22nd Feb 2020 at 20:42.
-
Thank you for the explanation. Glad you found a solution that works for you.
Similar Threads
-
change the very low resolution of video to high resolution
By idi0t in forum Newbie / General discussionsReplies: 22Last Post: 1st Jul 2017, 09:51 -
"Best" image size (resolution) for square-px DVDrips ('upsampling' or not)
By doomie in forum DVD RippingReplies: 3Last Post: 29th Dec 2016, 05:11 -
VSDC video editor shows image on preview, but when I export the video
By elisape in forum Newbie / General discussionsReplies: 2Last Post: 20th Oct 2016, 03:51 -
Best Video Converter With Target File Size & Any Video Resolution Option
By TheRandomOne in forum Video ConversionReplies: 11Last Post: 9th Jan 2016, 03:56 -
Converting a sample video file of any resolution to 13000x1080 resolution
By user321 in forum Video ConversionReplies: 6Last Post: 6th Jul 2015, 07:21