Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Make image fill entire preview instead of leaving black bars?

  • Francois Pénzes

    November 11, 2018 at 12:19 pm

    Hi Erica

    There is a good reason why Vegas does this automatically. It is letting you know what size/format is your clip. Let say you dropped a couple of clips from different sources and they would all come out the same way in preview, but come rendering, it’s going to be a whole different ball game. This has been more prevalent since vertically shot clips from smartphone with funky frame rates are more common.

    Ideally, all of your clips should be of the same frame size/format/type/etc. before starting your edit process. You will be less likely to run into problems when rendering time comes around.

    Cheers !

    PC Win 10 Pro 64-bit 16gb Intel® Core™i7-2600k Quad Core 3.40GHz
    Cameras: Canon XF305 + Canon XH-A1
    Blackmagic HyperDeck Studio Mini
    Vegas Pro 14, User since Vegas 3.0

    \’\’When the cutting stops, the editing begins…\’\’

  • George Dean

    November 11, 2018 at 10:33 pm

    Hi Erica,

    How are you manually making these adjustments?

    Probably the quickest and easiest way is to put all the clips on the same track. Then make your manual adjustments to frame as you wish (full frame) using using track motion, then save those adjustment to a preset. In the next project with those vertical clips, again put them on the same track, then bring up Track Motion, select your saved preset, bam….done! Quick and easy after you have made your first adjustment and saved it to use over and over again in the future.

    Best Regards……George

  • Erica Andre

    November 12, 2018 at 12:42 am

    Event Pan/Cop, then right-clicking and selecting Match Output Aspect. I don’t mind if parts of the image get cutoff by doing this, I just want there to be no black bars.

  • George Dean

    November 12, 2018 at 5:59 pm

    It’s the same amount of steps to select Pan & Crop, them right click and then select Match Output Aspect, as it is to select a preset, so making a preset doesn’t save time using the Pan & Crop, but you can copy and then paste attributes to many other events you have on various tracks in the timeline and if you have more than a couple events to modify that would then save you some time.

    Best Regards……George

  • Edward Troxel

    November 12, 2018 at 8:29 pm

    Or you can use a script that will Match Output Aspect for all selected events at the touch of a button…

    Edward Troxel

  • George Dean

    November 12, 2018 at 9:25 pm

    Hi Edward, would that be with Excalibur, or do you have a free script? I don’t show it in my list of scripts and I pecked around a bit in the link you provided, but nothing came up, or the other hand I didn;t spend a lot of time as I don’t need it, but that would be good for her I think.

    Best Regards……George

  • Edward Troxel

    November 15, 2018 at 6:12 pm

    It’s part of Excalibur. I have not made that function as a standalone free version.

    Here’s an extremely old one (MatchAspectSony.js) from 2011 that I did not write:

    // "Match Output Aspect" on all selected video events.
    // No selection = ALL

    import System.Windows.Forms;
    import Sony.Vegas;

    var zero : int = 0;

    function GetSelectionCount (mediaType)
    {
    var cTracks = Vegas.Project.Tracks.Count;
    var cSelected = zero;
    var ii;

    for (ii = zero; ii < cTracks; ii ++)
    {
    var track = Vegas.Project.Tracks[ii];

    if (track.MediaType == mediaType)
    {
    var eventEnum : Enumerator = new Enumerator(track.Events);

    while ( ! eventEnum.atEnd() )
    {
    if (eventEnum.item().Selected)
    {
    cSelected ++;
    }

    eventEnum.moveNext();
    }
    }
    }

    return cSelected;
    }

    function GetActiveMediaStream (trackEvent : TrackEvent)
    {
    try
    {
    if ( ! trackEvent.ActiveTake.IsValid())
    {
    throw "empty or invalid take";
    }

    var media = Vegas.Project.MediaPool.Find (trackEvent.ActiveTake.MediaPath);

    if (null == media)
    {
    throw "missing media";
    }

    var mediaStream = media.Streams.GetItemByMediaType (MediaType.Video, trackEvent.ActiveTake.StreamIndex);

    return mediaStream;
    }
    catch (e)
    {
    //MessageBox.Show(e);
    return null;
    }
    }

    function MatchOutputAspect (keyframe : VideoMotionKeyframe, dMediaPixelAspect : double, dAspectOut : double)
    {
    var keyframeSave = keyframe;

    try
    {
    var rotation = keyframe.Rotation;

    // undo rotation so that we can get at correct aspect ratio.
    //
    keyframe.RotateBy (-rotation);

    var dWidth = Math.abs(keyframe.TopRight.X - keyframe.TopLeft.X);
    var dHeight = Math.abs(keyframe.BottomLeft.Y - keyframe.TopLeft.Y);
    var dCurrentAspect = dMediaPixelAspect * dWidth / dHeight;
    var centerY = keyframe.Center.Y;
    var centerX = keyframe.Center.X;

    var dFactor;

    var bounds = new VideoMotionBounds(keyframe.TopLeft, keyframe.TopRight, keyframe.BottomRight, keyframe.BottomLeft);

    if (dCurrentAspect < dAspectOut)
    {
    // alter y coords
    dFactor = dCurrentAspect / dAspectOut;

    bounds.TopLeft.Y = (bounds.TopLeft.Y - centerY) * dFactor + centerY;
    bounds.TopRight.Y = (bounds.TopRight.Y - centerY) * dFactor + centerY;
    bounds.BottomLeft.Y = (bounds.BottomLeft.Y - centerY) * dFactor + centerY;
    bounds.BottomRight.Y = (bounds.BottomRight.Y - centerY) * dFactor + centerY;
    }
    else
    {
    // alter x coords
    dFactor = dAspectOut / dCurrentAspect;

    bounds.TopLeft.X = (bounds.TopLeft.X - centerX) * dFactor + centerX;
    bounds.TopRight.X = (bounds.TopRight.X - centerX) * dFactor + centerX;
    bounds.BottomLeft.X = (bounds.BottomLeft.X - centerX) * dFactor + centerX;
    bounds.BottomRight.X = (bounds.BottomRight.X - centerX) * dFactor + centerX;
    }

    // set it to new bounds
    keyframe.Bounds = bounds;

    // restore rotation.
    keyframe.RotateBy (rotation);

    }
    catch (e)
    {
    // restore original settings on error
    keyframe = keyframeSave;
    MessageBox.Show("MatchOuput: " + e);
    }
    }

    var dWidthProject = Vegas.Project.Video.Width;
    var dHeightProject = Vegas.Project.Video.Height;
    var dPixelAspect = Vegas.Project.Video.PixelAspectRatio;
    var dAspect = dPixelAspect * dWidthProject / dHeightProject;
    var cSelected = GetSelectionCount (MediaType.Video);

    var cTracks = Vegas.Project.Tracks.Count;
    var ii;

    for (ii = zero; ii < cTracks; ii ++)
    {
    var track = Vegas.Project.Tracks[ii];

    if (! track.IsVideo())
    {
    continue;
    }

    var eventEnum : Enumerator = new Enumerator(track.Events);

    while ( ! eventEnum.atEnd() )
    {
    var trackEvent : TrackEvent = eventEnum.item();

    if ( !cSelected || trackEvent.Selected )
    {
    var mediaStream = GetActiveMediaStream (trackEvent);

    if (mediaStream)
    {
    var videoStream = VideoStream (mediaStream);

    var dMediaPixelAspect = videoStream.PixelAspectRatio;
    var videoEvent = VideoEvent(eventEnum.item());
    var keyframes = videoEvent.VideoMotion.Keyframes;

    var cKeyframes = keyframes.Count;
    var jj;

    for (jj = zero; jj < cKeyframes; jj ++)
    {
    MatchOutputAspect (keyframes[jj], dMediaPixelAspect, dAspect);
    }
    }
    }

    eventEnum.moveNext();
    }
    }

    Vegas.UpdateUI();

    Edward Troxel

  • George Dean

    November 15, 2018 at 7:52 pm

    Hi Erica,

    Edward provided an excellent answer to your issue, either subscribe to his excellent product Excalibur, which provides the automation you asked for, and a whole lot more, or use the free script he provided previously. I tried this script in Vegas Pro 13 and Vegas Pro 16 and it worked well.

    The script works on all events that have been selected, or all the events in a project if you do not select any, pretty slick.

    The script can be used ‘as is’ for Sony Vegas Pro. If you want to use it with Magix Vegas Pro, change the line

    ‘import Sony.Vegas;’

    to

    ‘import ScriptPortal.Vegas;’

    Thank You Edward, you are a gentleman and a scholar for taking the time to provide this script.

    Best Regards……George

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy