Skip to content
streamneo.
Streaming Settings14 min read

How to Stream Portrait Videos in a 16:9 FFmpeg YouTube Loop

Fit portrait video into a 16:9 YouTube loop with FFmpeg using scale, padding, blurred backgrounds, and practical testing steps.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

A portrait video does not become landscape merely because you label the output 16:9. To stream it properly on YouTube, create a landscape canvas, scale the portrait source to fit inside it, and decide what should occupy the unused space at the sides.

For a dependable first version, preserve the complete source with equal padding on both sides. You can later replace the plain padding with a blurred background, or deliberately crop or stretch the image if that suits the channel's visual style.

Why portrait footage needs a landscape canvas

A portrait clip is taller than it is wide. A common phone recording might be 9:16, while a standard YouTube live canvas is 16:9. These are different geometries, not simply different labels applied to the same picture.

If the source is placed directly into a landscape output without a clear scaling and placement step, the result may show as portrait, have unexpected empty areas, or be resized by a player in a way you did not intend. The -aspect option alone does not redraw the image or create side panels. It changes display-aspect information, and in some cases container metadata, but it does not turn portrait pixels into a new 16:9 composition.

Think of the output as a fixed board. The board is 16:9. Your portrait video is a smaller picture placed on that board. The source can retain every pixel while the board supplies the extra width.

That distinction matters for a devotional video, a vertical music visualiser, a news presenter recorded on a phone, or a study loop. If the speaker's hands, subtitles, temple artwork, or side annotations reach the edge of the portrait frame, cropping can remove information. If the image is stretched to fill the board, faces and lettering can look unusually wide.

YouTube's current live encoder guidance covers RTMP and RTMPS workflows, supported codecs, frame rates, keyframes, audio, and bitrate settings. Check the official YouTube live encoder settings before choosing the final output profile, because the framing decision and the transport settings solve different problems.

Choose the target 16:9 dimensions

Choose the canvas before writing the filter. Two practical starting points are 1920×1080 and 1280×720. Both have a 16:9 shape, but the larger canvas requires more processing and upload headroom. The best choice is the one your computer or cloud workflow can encode consistently and your connection can sustain.

A portrait source does not have to be recorded at the same resolution as the canvas. FFmpeg will scale it down or up to fit the available height or width while preserving its original shape. For a vertical source inside a 1920×1080 canvas, height is normally the limiting dimension. The portrait picture becomes narrower than 1920 pixels, leaving side regions for padding or a background.

Target canvas Useful starting point What to consider
1920×1080 1080p, 16:9 More detail, but more encoding and upload demand
1280×720 720p, 16:9 Lighter workflow and often easier to sustain

These are canvas dimensions, not promises about the quality of the original video. Enlarging a small phone clip to 1920×1080 cannot create detail that was not recorded. It only gives YouTube a correctly shaped output frame.

Keep the pixel shape explicit as well. The filter chain below ends with setsar=1, which sets square sample aspect ratio. That avoids a second source of shape surprises, where the stored pixel proportions and the displayed proportions do not agree.

Before selecting a size, inspect the source's actual dimensions and rotation. A phone may store a portrait recording with rotation metadata rather than physically arranged portrait frames. FFmpeg's current command-line documentation explains output sizing, display aspect information, and related input and output options. Confirm how your installed build handles the source before treating a command as copy-and-paste advice.

Fit and centre the portrait video

The reliable baseline is an aspect-preserving scale followed by pad. The scale filter reduces or enlarges the source until it fits inside the chosen canvas. The decrease behaviour prevents either scaled dimension from exceeding the canvas. The pad filter then adds the remaining width or height and places the image in the centre.

For a 1920×1080 output, the pattern is:

-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1"

Here, ow and oh refer to the output dimensions of the padding stage, while iw and ih refer to the scaled image. The expressions (ow-iw)/2 and (oh-ih)/2 divide the unused space evenly. A portrait source therefore receives equal side margins instead of being pushed against one edge.

For a 1280×720 canvas, use the same logic with the smaller dimensions:

-vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1"

The exact syntax and available options can vary with the FFmpeg build, so check the installed version against the FFmpeg filters documentation. The important sequence is not a magic aspect-ratio flag. It is: fit the source, pad to the target, centre the result, and set square pixels.

This approach preserves the complete visible source. It also gives you a stable output size when you later replace one clip with another portrait clip. That is useful for a loop containing phone recordings from different days, provided the source orientation and intended crop are checked in advance.

If the portrait image contains important text near its edges, leave it uncropped during the first test. You can then judge its size on a television, phone, and desktop preview. A source that looks readable in an FFmpeg preview window may be too small once the whole 16:9 frame is shown on a mobile screen.

Choose plain bars, colour padding, or a blurred background

Padding is the area of the landscape canvas that the portrait source does not occupy. You have three straightforward treatments: leave it as a plain colour, choose a deliberate colour, or create a blurred enlargement of the source behind the main image.

Plain bars are the least complicated. They preserve the source, make no claim about the unused area, and are easy to troubleshoot. Black is familiar, but it can make a bright portrait clip feel visually separated from the rest of the stream. A dark grey or a colour taken from the channel artwork may be easier on the eye without competing with the subject.

You can set a padding colour in the filter, for example:

-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1"

Use the colour syntax supported by your installed FFmpeg version and verify it before relying on the command. The main design decision remains the same: the central portrait is untouched, and the side regions are simply filled.

A blurred background uses a second, enlarged copy of the source behind the original portrait frame. It can make the output feel more like a designed programme frame, especially for devotional visuals, lofi loops, or a presenter whose portrait footage would otherwise sit between large bars. It also keeps the source's composition intact in the foreground.

The trade-off is complexity. A background copy must be scaled, blurred, cropped or padded to the canvas, and composited with the sharp portrait layer. That adds filtergraph stages and more processing. Movement in the background can also make a quiet channel feel busier than expected. If the source contains faces, text, or high-contrast patterns, the blurred copy may produce distracting colour patches at the sides.

Start with plain padding, confirm that the stream is stable, and only then consider a blurred treatment. This order makes it easier to tell whether a later problem comes from the framing concept or from a more complicated filtergraph.

Framing method Source content Side regions Visual result Filter complexity
Plain bars All preserved One colour Clear and neutral Lowest
Colour padding All preserved Chosen colour More deliberate branding Low
Blurred background All preserved in foreground Enlarged, softened source Fuller frame, more movement Higher
Cropping Edges removed No separate side regions Landscape fills the frame Low to medium
Stretching All visible but distorted No separate side regions Full frame, altered proportions Low

When cropping or stretching is intentional

Cropping is appropriate when the portrait frame contains more space than the viewer needs and the subject remains clear after the sides or top and bottom are removed. For example, a close-up of a singer may still work when enlarged to fill a landscape frame, while a phone recording of a group prayer may lose people at the edges.

Cropping does not preserve every source pixel. It removes part of the image to make the remaining area fit the landscape canvas. Check subtitles, logos, faces, hands, and any product or location details before selecting it. A crop that works for one clip may fail when the next item in the loop has a different camera position.

Stretching is a separate choice. It fills the canvas without removing pixels, but it changes their proportions. A circular lamp can become oval, a person's face can become wider, and text can become difficult to read. Stretching may be acceptable for an abstract texture, a simple colour wash, or a deliberately distorted visual, but it is a poor default for people and typography.

Do not describe stretching as preserving the source without distortion. It retains the frame's content in a technical sense while changing how that content is displayed. The same applies to cropping in a different way: it can retain natural proportions while discarding part of the original view.

For a channel that mixes portrait and landscape material, consider using one consistent policy. Scale and pad every portrait item, or prepare a designed layout with the same margins, title position, and background colour. Switching unpredictably between black bars, aggressive crops, and stretched clips can make a long loop feel broken even when the encoder is working correctly.

If you need a holding frame during transitions, the article on showing a holding screen between videos in an OBS loop stream covers the presentation problem from another angle. The same principle applies here: decide what the viewer should see during every part of the rotation rather than only during the main clip.

Build the loop and choose live output settings

The framing filter is only one part of a continuous YouTube broadcast. Your loop also needs a repeat method, an audio decision, an encoder profile, and a way to reconnect or recover if the local process stops. Research and test those parts separately from the geometry.

Do not hard-code a YouTube stream key in a script, article, screenshot, or shared configuration. Treat it as a credential and paste it only into the private configuration used by the intended encoder or service. Confirm the current YouTube procedure for creating and starting a live event before your first public broadcast.

For live encoding, YouTube currently recommends constant bitrate encoding and a two-second keyframe interval, with an interval not exceeding four seconds, in the cited encoder guidance. It also lists square pixels and supports several video codecs and audio formats. These are YouTube's published settings, not measurements made from your particular clip or internet connection.

For one concrete H.264 example, YouTube's live guidance lists 5 Mbps as the minimum and 14 Mbps as the recommended bitrate for 1080p at 30 fps. For 1080p at 60 fps, it lists 6 Mbps minimum and 17 Mbps recommended. As listed on YouTube's site in October 2026, those figures are guidance for the named resolution, frame rate, and codec combination rather than a universal requirement for every stream.

Choose a profile your upload connection can sustain with headroom. A connection that reaches a bitrate briefly but fluctuates overnight is not suitable simply because a speed test displayed a higher result once. YouTube advises testing upload bitrate and selecting quality that supports a reliable stream.

Audio needs its own check. Confirm that every item in the loop has the intended audio stream, that silent clips do not cause unexpected transitions, and that the sample rate and channel layout are consistent where practical. YouTube's cited guidance lists 44.1 kHz and 128 Kbps for its recommended advanced stereo settings, while its 5.1 guidance lists 48 kHz and 384 Kbps. Use the current official table when your workflow needs those advanced settings.

If the goal is an unattended channel, remove the computer from the list of things that must stay awake only after you have tested the entire operating method. StreamNeo is useful here when the specific pain is leaving a computer running: you upload the prepared video, provide the YouTube stream key, and the channel can continue from the cloud with automatic monitoring and restart behaviour.

For a local FFmpeg workflow, keep the loop command, filter chain, encoder parameters, and reconnect approach in a documented configuration. The FFmpeg 24/7 YouTube livestream guide is relevant if you are deciding whether a locally managed process is suitable. If the process is expected to run all night, test what happens after a network interruption, input read error, or video transition rather than assuming the loop will recover.

Test the loop and output before going live

Start with a short representative test, not only a single frame. Include the portrait clip with the busiest motion, the smallest or most important text, and the audio that is most likely to reveal a transition problem. If the real channel contains several source shapes, test each shape through the same filter policy.

First verify the output dimensions. The final video should be the target canvas you selected, such as 1920×1080 or 1280×720. Then inspect the sample aspect ratio and confirm that the portrait image is centred, upright, and not cut at the edges. A technically valid file can still have a poor composition.

Next inspect movement. Look for judder during pans, unexpected frame-rate conversion, or a blurred background that draws attention away from the main image. Check the first and last moments of the clip if it repeats. A hard audio cut or a visible jump may be acceptable for a simple loop, but it should be a deliberate choice.

Listen through a transition with headphones or ordinary speakers. Check that speech, music, and ambient sound are audible without clipping. A portrait devotional clip may have low-level room sound that disappears when another file starts, while a music loop may have a noticeable loudness change even when both files technically contain audio.

YouTube says, “Make sure to test before you start your live stream.” YouTube Help also advises testing with audio and motion similar to the planned stream and monitoring stream health during the event. Apply that advice to the actual portrait layout, not just to a still test card.

If your workflow is local, watch CPU usage, memory use, disk access, and upload behaviour during a test long enough to expose a transition. If it is managed elsewhere, check the service's actual preview and status information. Do not infer overnight reliability from a successful minute-long preview.

A checklist for keeping a prerecorded YouTube stream live without a PC can help you separate the question of frame composition from the question of unattended operation. The portrait filter should be correct before you investigate restarts, schedules, or monitoring.

Check the resulting live frame

Open the YouTube live control room preview before making the broadcast public. Check that the full landscape frame is being received and that the central portrait image has the expected size. If YouTube's preview shows a portrait or square-looking result, do not immediately change the stream metadata. Recheck the final encoded dimensions, filter placement, rotation, and sample aspect ratio first.

Look at the stream on more than one display. A phone may make the portrait subject easy to see but shrink the side treatment; a desktop player may make black bars feel more prominent; a television may reveal soft scaling or text that is too small. These are viewing trade-offs, not necessarily encoder errors.

Monitor the live health indicators while motion and audio are playing. Watch for dropped frames, unstable bitrate, audio warnings, or a change in the preview at the point where the loop restarts. YouTube's live guidance supports monitoring stream health during the event, but no framing method can compensate for a connection that cannot sustain the selected output.

Keep a screenshot or note of the working dimensions, source orientation, filter chain, and encoder profile. If you later alter the background or switch from 720p to 1080p, change one variable at a time. That makes a failed test easier to diagnose and avoids returning to a setup that happened to work without anyone knowing why.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

Does -aspect 16:9 convert a portrait video to landscape?

No. It changes display-aspect information and does not create the missing landscape canvas or rearrange the source pixels. Use an aspect-preserving scale followed by pad, then set the sample aspect ratio explicitly where appropriate.

Should I use black bars or a blurred background?

Black or colour padding is the simplest reliable baseline and preserves the complete portrait image. A blurred background fills more of the screen but adds filter complexity and visual movement, so test it only after the plain version is working.

Is cropping better than padding for YouTube Live?

Cropping can look more immersive when the subject remains visible after the edges are removed. It is not a preservation method, though: content outside the crop is lost, so inspect faces, subtitles, logos, and hands before using it.

How do I make a portrait loop reliable overnight?

Test the full output with representative motion and audio, check the final dimensions and sample aspect ratio, and run a private or scheduled YouTube test before going public. Also verify the loop, reconnect behaviour, upload headroom, and monitoring method separately from the portrait framing.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Streaming Settings guides ↗ · All topics ↗