A consistent YouTube stream starts with one deliberate output canvas and a clear decision about how each source fits inside it. For a landscape channel, 1920×1080 is a practical 16:9 choice, but 16:9 is not a rule that every YouTube video must follow.
To avoid stretched pictures, inspect the source geometry first, scale it proportionally, and then either pad the unused space or crop the edges. In FFmpeg, the fit-and-pad approach preserves the complete source image while giving every item in a mixed playlist the same output dimensions.
Frame size, DAR and SAR are different things
Three measurements are involved when a video is displayed:
- Frame dimensions are the stored number of pixels in each frame, such as 1920×1080 or 720×576.
- Sample aspect ratio, usually called SAR or pixel aspect ratio, describes the shape of each stored pixel. A SAR of 1:1 means square pixels.
- Display aspect ratio, or DAR, describes the shape the complete picture should have when shown.
For square-pixel video, the relationship is straightforward. A 1920×1080 frame has a DAR of 16:9 because its width-to-height ratio is 16:9. A 1080×1920 frame has a DAR of 9:16.
With non-square pixels, the stored frame ratio and displayed picture ratio are not the same. A 720×576 source with a non-square SAR can be intended to display as a wider picture than the raw dimensions suggest. This is why reading width and height alone can lead to the wrong conclusion.
FFmpeg’s aspect-ratio FAQ explains that many processing filters try to avoid stretching by changing SAR or DAR as appropriate. Its description is useful when diagnosing an old broadcast recording, a DVD-derived file, or another source that uses non-square pixels.
You can think of the measurements in this way:
| Term | What it describes | Example question |
|---|---|---|
| Frame dimensions | Stored pixel grid | Is the frame 1280×720? |
| SAR | Shape of each stored pixel | Are the pixels square or slightly wide? |
| DAR | Shape of the displayed picture | Should the viewer see 16:9 or 4:3? |
These values can agree, but they do not have to. If the metadata says that the pixels are not square, blindly forcing square pixels may alter the intended display shape. Inspect first, then decide whether the metadata is correct and whether your output workflow should preserve it.
Why mixed inputs become stretched or cropped
A mixed playlist may contain a landscape camera recording, a portrait phone video, an old 4:3 devotional clip, and a graphic exported at a different size. If each file is sent through a different conversion path, the viewer may see the picture change shape from one item to the next.
Stretching happens when the source is resized independently in both directions. For example, turning a 4:3 image into a 16:9 frame by changing its width and height directly makes circles look oval and faces appear wider. The output dimensions may be consistent, but the image geometry is wrong.
Cropping happens when the source is enlarged until it covers the target canvas and the excess outside the canvas is removed. This can be the right choice for a full-screen visual, but it may cut off subtitles, deity images, logos, presenters, or the edge of a chart.
Padding takes the opposite approach. The source is scaled down just enough to fit inside the target canvas without changing its shape. The remaining area is filled with a colour or another background. This keeps the complete picture but introduces letterboxing above and below, or pillarboxing at the sides.
A filter cannot repair content that was already distorted during an earlier export. If a face is stretched in the source file itself, a later scale and pad operation can preserve that incorrect appearance, but it cannot know what the original proportions were. Check a representative frame before building a long-running playlist.
If several files have different canvas sizes, normalise them before combining them or sending them into the live process. A common canvas means downstream overlays, transitions and stream settings have predictable geometry. It also makes it easier to identify whether a problem comes from the source or from the final output filter.
Choose the output canvas deliberately
Start with the shape your viewers are meant to see, rather than forcing every source to match the first file in the playlist. A conventional landscape channel may use a 16:9 canvas because it suits desktop viewing, television-style content and many existing landscape assets. That is a production choice, not a universal YouTube requirement.
YouTube’s video aspect-ratio guidance describes how the player adapts to different shapes. It also advises against baking black bars into the image for uploaded video, because fixed bars can interfere with the player’s ability to size the picture dynamically. For a live workflow, the same practical lesson applies: keep the actual content and canvas intentional rather than adding multiple layers of permanent bars without a reason.
For a landscape stream, 1920×1080 is an illustrative target. You may choose another supported canvas according to the source material, encoder capacity and current YouTube guidance. The important properties are that the width and height are fixed, the dimensions are suitable for the chosen pixel format, and every input is fitted using the same rule.
A vertical stream needs a separate decision. A 1080×1920 canvas is a 9:16 output, not a landscape stream with the sides removed after the fact. If your channel serves both horizontal and vertical viewers, compose the important subject inside a safe central area or prepare a separate vertical layout. YouTube states that its vertical live rendition uses a centre crop by default in the relevant dual-format workflow, so a landscape source may lose the very content you expected viewers to see. Its current YouTube Live guidance should be checked before you design around that behaviour.
Use this decision table before writing the filter:
| Intended result | Treatment | What you keep | What you give up |
|---|---|---|---|
| Show the complete source | Proportional fit and padding | All image content and its shape | Some unused canvas area |
| Fill every part of the canvas | Proportional cover and crop | A full-looking frame | Edges of the source |
| Correct bad source metadata | Inspect, then set geometry deliberately | A chosen display shape | The source’s original signalling, if it was actually correct |
| Serve a vertical composition | Use a 9:16 target and design for it | A purposeful portrait layout | Compatibility with a landscape-only composition |
Fit and pad inputs with FFmpeg
For a fixed 1920×1080 landscape canvas, a proportional fit-and-pad pattern can look like this:
ffmpeg -i input.mp4 \\
-vf "scale=1920:1080:force_original_aspect_ratio=decrease:force_divisible_by=2:reset_sar=1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1" \\
-c:v libx264 -pix_fmt yuv420p -c:a aac \\
-f flv rtmp://YOUR_YOUTUBE_INGEST/STREAM_KEY
This is a template, not a command verified against a particular FFmpeg build or live stream. Replace the input and ingest details for your own workflow, confirm that the installed FFmpeg recognises the filter options, and keep the stream key private.
The first filter stage asks scale to fit the source inside 1920×1080 while preserving its original aspect ratio. force_original_aspect_ratio=decrease means neither scaled dimension should exceed the target. A wide source may become 1920×something smaller than 1080; a tall source may become something narrower than 1920×1080.
force_divisible_by=2 helps produce dimensions suitable for common video pixel formats when the proportional result would otherwise be odd. This option is associated with force_original_aspect_ratio; check the documentation for the FFmpeg version installed on the machine rather than assuming every build accepts every option.
reset_sar=1 asks the scaling stage to produce square-pixel output while accounting for the source display geometry. The pad stage then places the fitted image in the full target canvas. The expressions (ow-iw)/2 and (oh-ih)/2 centre the smaller fitted image horizontally and vertically.
The final setsar=1 makes the intended square-pixel output explicit. It should not be treated as a universal cure for incorrect material. If the source has meaningful non-square-pixel metadata, first establish whether that metadata is what makes the source display correctly.
The FFmpeg filters documentation covers the scale, pad and setsar filters and their options. Read the documentation that matches the installed build, especially if your command runs on a small computer or an older distribution.
Padding colour is a creative choice. Black is unobtrusive for many devotional, ambience and study channels, but a branded background or a blurred extension may suit other content. Keep that background separate from the source image when possible, so you can change the presentation without re-editing every input.
If you want to fill the canvas instead, scale proportionally until the target is covered, then crop the excess. FFmpeg’s documented fit modes distinguish between a containing fit with padding and a covering fit with cropping, but option availability and interactions vary by version. Use the simpler explicit scale-and-crop chain when you need to see exactly which edges are being removed.
A crop strategy is sensible when the edges contain no important information and a full frame matters more than preserving every pixel. It is risky for phone footage, screen recordings and slides with text near the borders. Do not choose it merely because bars look untidy.
Keep pixels square when appropriate
YouTube’s live encoder guidance recommends square pixels, represented as SAR 1:1. That recommendation makes the output easier to reason about: a stored circle remains a displayed circle when the frame is shown without another geometry conversion.
The square-pixel rule is most straightforward for modern computer graphics, phone exports and ordinary camera files. It is less automatic for older footage or material derived from broadcast and DVD formats. In those cases, the source may deliberately use non-square samples to represent a normal-looking display shape.
Use inspection rather than habit. FFmpeg’s ffprobe can show stream information, including dimensions and aspect-ratio fields, for example:
ffprobe -v error -select_streams v:0 \\
-show_entries stream=width,height,sample_aspect_ratio,display_aspect_ratio \\
-of default=noprint_wrappers=1 input.mp4
The output helps you compare the stored frame with the metadata describing how it should display. It does not tell you whether the source itself is artistically correct. Watch the file as well: a technical field and the visible result need to agree before you normalise the stream.
If the source is already square-pixel and correctly composed, setsar=1 is a sensible way to keep the output explicit. If the source relies on a non-square SAR, converting it to square pixels should normally involve a compensating scale so that the displayed shape is preserved. Setting metadata without changing the frame geometry can make a correctly displayed source look wrong.
Do not confuse setdar with resizing. Aspect-ratio filters can change signalling, while scale changes the stored frame dimensions. A DAR override may be useful when metadata is known to be wrong, but it should be a deliberate correction based on inspection, not a first response to a stretched picture.
Check the geometry before streaming
Test a short representative sequence before committing to an overnight or always-on broadcast. Include the widest, tallest and oldest sources in the playlist, along with any file containing subtitles, a logo or a face near the edge. A single modern landscape clip can hide a problem that appears immediately when a portrait phone video arrives.
Check the following points:
- The output width and height remain the chosen canvas for every input.
- Circles, faces and familiar logos retain their shape.
- No important text or subject is cut off by cropping.
- Padding is centred and has the intended colour or design.
- The source changes do not introduce a sudden geometry jump.
- Audio continues when the video filter changes between files.
- The encoder log reports no unrecognised filter option or repeated conversion failure.
YouTube recommends monitoring stream health and reviewing encoder messages during a live setup. The YouTube encoder settings guidance is the appropriate place to check current platform instructions, since ingest expectations and available formats can change.
Look at the actual output, not only the command line. A filter graph can have the intended dimensions while the source content still contains a pre-existing crop or distortion. Save a short output sample, inspect it in a player, and if possible view it on both a computer and a phone. Different players may expose different metadata behaviour.
For a 24/7 channel, geometry is only one part of reliability. The machine must also sustain the encoder load, read the playlist, and maintain its network connection. If you run FFmpeg on a Raspberry Pi, monitor temperature and throttling with the practical checks in this Raspberry Pi streaming guide. If the local computer is the weak point, compare the operational trade-offs in VPS versus a spare PC for a 24/7 channel rather than changing aspect-ratio filters to compensate for an unrelated failure.
A cloud workflow can remove the need to keep your own computer running, but it does not remove the need to prepare consistent files. Using a cloud encoder for a prerecorded YouTube live stream is relevant when the pain is overnight operation rather than video geometry. StreamNeo removes that particular always-on computer burden by taking an uploaded video, your YouTube stream key and the prepared channel configuration, then running the broadcast with monitoring and automatic restart while your computer is switched off.
Keep the source files organised by intended canvas and treatment. If storage or upload time is the concern, the guidance on reducing upload size for a 24/7 YouTube playlist can help you plan the library, but do not reduce resolution or change proportions merely to make files smaller. A smaller, consistently encoded source is useful; a distorted one is not.
A reliable working sequence is therefore: inspect the source, choose the output canvas, fit proportionally, pad or crop deliberately, confirm square-pixel handling, and test the resulting stream path before leaving it unattended. Once that process is repeatable, adding another video to the playlist becomes a geometry decision rather than a late-night troubleshooting session.
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 every YouTube stream need to be 16:9?
No. 16:9 is a common landscape canvas and may be the right deliberate choice for your channel, but YouTube supports and adapts to other video shapes. Choose the canvas based on your content and audience, then make the layout consistent.
Should I always add setsar=1?
Use square pixels when the output is meant to use ordinary square-pixel video and the source has been checked. Do not blindly override meaningful non-square-pixel metadata, because it may be part of the information that makes older footage display correctly.
Is padding better than cropping?
Neither is always better. Padding preserves the complete source and leaves unused canvas areas, while cropping fills the frame but removes edges. Use padding for content where all of the image matters, and crop only when the lost edges are acceptable.
Why does a correctly sized output still look stretched?
The stored frame dimensions may be correct while the source SAR or DAR metadata is wrong, or the image may already be distorted in the original file. Inspect the source metadata and watch a representative frame before changing the filter chain.