Skip to content
streamneo.
Streaming Settings13 min read

Best FFmpeg Settings to Resize Pre-Recorded Videos for a 24/7 YouTube Stream

Choose a YouTube output canvas, resize without distortion, and separate FFmpeg file settings from live ingest and stream health.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

Resizing a pre-recorded video for a 24/7 YouTube stream starts with choosing an output canvas, then fitting the source to it without stretching. Your file’s dimensions and frame rate are separate from the bitrate and keyframe settings used to send a live feed to YouTube.

There is no universally best FFmpeg command: the right filter and encoder depend on the source, intended presentation, installed FFmpeg version and available compute. Treat any command you assemble as something to check with your own media, not as a tested recipe or a guarantee that a stream will stay online.

Choose a target resolution and aspect ratio

Start with the shape and detail of the source, then decide what viewers should see on the channel. A common target canvas for widescreen material is 1920×1080, but using that size does not create detail that is absent from a smaller or softer source. Upscaling a 720p video to a 1080p canvas gives it larger dimensions; it does not restore the detail of a 1080p recording.

Think of resolution as the canvas, not a quality switch. A useful choice balances the source material, viewing context, available encoding capacity and intended live settings. A devotional image with a static background may not need the same treatment as a detailed local-news loop with moving captions. Conversely, shrinking a sharp source too far can make text difficult to read.

Check the source’s actual dimensions and aspect ratio before choosing a target. A 16:9 recording fits a 16:9 canvas naturally. A vertical phone recording or a 4:3 archive does not: you must decide whether to show all of its picture with empty space around it, or fill the canvas by removing some of the picture. That decision is editorial as well as technical.

YouTube’s encoder guidance lists supported video codecs including H.264, H.265/HEVC and AV1, and frame rates up to 60 fps. Compatibility and encoding options differ by host and installed encoder, so do not pick a codec solely because it appears on the platform’s list. YouTube’s live encoder settings are the place to check current ingest guidance before publishing.

Calculate dimensions without distortion

Preserving aspect ratio means scaling width and height by the same proportion. If a source is 1280×720, its ratio is 16:9; sizing it to a 1920×1080 canvas preserves that ratio. If instead you independently force its width and height to unrelated values, people and objects will look wider or narrower than they should.

A source does not have to match the target canvas to be usable. For a 4:3 archive on a widescreen canvas, fitting the whole frame leaves unused space at the sides. Filling the whole canvas crops the top and bottom. A portrait source on the same canvas creates a more substantial choice: preserve the full height with broad side bars, or crop heavily to make a landscape composition. Preview that result before committing to a long stream.

FFmpeg offers -s to set frame size, but its documentation notes that the option inserts a scale filter at the end of the relevant filter graph. When placement within a sequence of filters matters, the project documentation directs users to use the scale filter directly. The right expression depends on the intended canvas and other filters; an output size by itself does not explain whether you mean to fit, crop or distort. See the FFmpeg command-line documentation and confirm behaviour against the version installed on your host.

Do not calculate by eye from a media player window. Inspect the file’s reported dimensions and aspect ratio, then inspect the resulting file or stream output. Also account for rotation metadata: a phone video may be stored with landscape-coded dimensions and a rotation flag, while appearing portrait in a player. If you resize before understanding that orientation, the result can be surprising.

Choose scaling, padding or cropping

There are three distinct outcomes to consider. Scaling changes picture dimensions proportionally. Padding adds unused canvas area, often displayed as black bars. Cropping removes part of the picture. Stretching changes proportions to fill the canvas, and is generally the result to avoid when the source and target ratios differ.

Choice What viewers see Useful when Main trade-off
Fit and pad The whole source frame, with bars or a background filling unused canvas Captions, faces or the edges of archival footage must remain visible Bars take up part of the canvas; a plain background can look deliberate or unfinished depending on the channel
Fill and crop A canvas filled by the source, with some content cut off The edges are expendable and the composition remains legible after trimming Titles, faces or important details near the edge may disappear
Stretch The whole frame forced to the canvas dimensions Rarely appropriate for ordinary camera footage Circles become ovals and people change shape

For a study station, bars may be less distracting than cropping written notes or a timer. For an ambience channel, you might prefer a carefully chosen crop if no important content is near the edges. Preview several moments rather than a single still: pans, text overlays and transitions can expose a crop that looked acceptable on one frame.

Padding need not mean black bars. A designed background can make a vertical clip fit a landscape stream, but that adds its own production choices and should not obscure the original. Whatever method you choose, check the final picture at the target canvas and on the sort of screen where viewers are likely to watch.

The FFmpeg filter graph may also need to handle pixel format, rotation, deinterlacing or frame-rate conversion. Those needs depend on the actual source and chain of filters. Avoid copying a filter string from a different project and assuming it covers these cases; consult the installed FFmpeg documentation and test a representative segment.

Set frame rate and output encoding

Frame rate is a property of the sequence of images you send, not a synonym for resolution. If the source was recorded at a lower frame rate, setting a higher output rate does not add genuine motion detail. It can duplicate frames and increase processing or data requirements. If the source has motion that matters, avoid reducing its frame rate without checking what that does to pans, movement or lip synchronisation.

YouTube’s current guidance supports frame rates up to 60 fps. That ceiling is not a recommendation to convert every recording to 60 fps. For a fixed-camera bhajan recording or a slowly moving lofi visual, preserving the source cadence may be sensible. For faster footage, use a frame rate that the source, encoder and ingest configuration can sustain, and watch the output rather than trusting the setting alone.

Codec choice likewise depends on the encoder available on the machine and the ingest workflow. H.264 is widely used for live ingest, while YouTube also lists HEVC and AV1. A codec may be supported by YouTube but unavailable in your FFmpeg build, or too demanding for the computer you intend to use. Check the installed encoder list and confirm that YouTube’s current instructions match the codec you select.

For a conventional SDR stream, YouTube lists Rec. 709 and 8-bit guidance. A file with HDR or a different colour space deserves particular care: resizing does not itself convert colour correctly. Check how the source is tagged and how your chosen filter and encoder handle those properties. If you cannot verify the result, a short private or unlisted rehearsal is safer than discovering washed-out colours during a public broadcast.

Audio needs its own check. YouTube lists AAC or MP3 among supported audio codecs, with stereo guidance of 44.1 kHz and 128 Kbps. Those are platform settings, not a reason to re-encode clean audio blindly. Confirm that the chosen output includes the intended audio stream, that levels are audible without clipping, and that a loop does not create a gap or abrupt change at the join.

Separate file settings from live ingest bitrate

A resized file has dimensions, frame rate, codec and possibly audio properties. A live ingest feed has a transport, bitrate behaviour and keyframe interval as well. These are related, but not interchangeable: setting a file to 1920×1080 does not tell you what bitrate to send, and choosing a bitrate does not resize the picture.

YouTube’s current encoder guidance recommends CBR and a two-second keyframe frequency, with a maximum interval of four seconds. Check the page again before a broadcast because platform guidance can change. Do not assume that an FFmpeg command’s default rate control, keyframe interval or transport is the one YouTube currently recommends.

For H.264, YouTube’s table lists 10 Mbps as its recommended video bitrate for 1080p30 and 4 Mbps for 240p–720p30. These are recommendations for those ingest settings, not guarantees of picture quality, nor proof that your upload connection can sustain the feed. For other resolutions or frame rates, use the current table rather than extrapolating from these examples.

Leave headroom in your connection and consider the rest of the network’s use. A nominal broadband speed does not tell you whether the connection is stable through the night, whether other devices will compete for upload capacity, or whether a wireless link will fluctuate. If the outgoing feed cannot be maintained, changing the file’s dimensions alone will not fix that cause.

YouTube supports RTMP and RTMPS and recommends RTMPS. Use the transport and stream key workflow specified in the current YouTube interface. Keep the key private, and if you need to replace it, update the encoder configuration too. For a broader view of operating a continuous feed from a remote machine, see the Windows VPS setup guide, while remembering that a host choice does not remove the need to verify the actual ingest.

Loop the source and verify playback

FFmpeg’s -stream_loop -1 option is used in an example of repeating an input indefinitely. It is a way to request repeated input playback, not a promise that the whole broadcast will remain continuous. A loop can still stop because the encoder exits, the process loses its connection, the host restarts or another fault occurs.

The position of the loop option in a command matters because FFmpeg options apply to inputs or outputs according to their placement. Consult the documentation for the installed version rather than treating a copied line as universal. The source format, audio streams, filter graph, encoder and destination all affect the complete command. This article does not offer a tested end-to-end command, and no example here should be read as a benchmark.

Before using a file for a long-running channel, inspect the join between its end and beginning. Listen for silence, clicks, a sudden volume shift or audio that stops before video. Watch for a black frame, an abrupt change in colour, a caption that appears only once, or a transition that makes the repeated pattern obvious. These are content and encoding questions, not problems solved by a loop flag.

A single file and a playlist are different workflows. If your channel needs changing material, a playlist may be a better fit than repeating one video; the guide to making a YouTube Live playlist from Google Drive videos discusses that kind of source organisation. Whichever route you use, check permissions and rights for the music and footage, particularly when a recording contains material you did not create. The music live-streaming setup and rights guide is a useful companion for that question.

Test encoder load and YouTube stream health

Rehearse with the intended source, audio, canvas, frame rate and encoder preset. A short test with a still image is not representative if the real file contains moving scenery, scrolling text or complex footage. Watch FFmpeg’s logs and reported encoding speed over time. If the process cannot keep pace with the input, a different preset, smaller output or a host with different capacity may be needed.

The same test should reach YouTube, not stop at a local file. Open the live control room and confirm that it receives data, check its stream-health messages, and inspect the viewer-side result. YouTube transcodes incoming live streams for viewers, so the ingest feed’s settings do not promise that every viewer receives that same format or resolution. YouTube itself recommends testing with representative audio and motion and monitoring stream health and messages during the event.

When a warning appears, identify which layer is reporting it before changing settings. A dimension mismatch calls for checking the output geometry; an unstable bitrate points to the encoder or connection; missing sound calls for checking audio mapping and levels. A live indicator disappearing may have causes beyond scaling. Changing several settings at once makes it harder to learn which change helped.

A loop and an online channel are separate operational concerns. YouTube can receive a correctly looping file while the encoder process or network connection fails. Plan how the broadcast will be checked and what will happen if the process stops, including who can respond and how it can be restarted. Do not infer uninterrupted operation from a successful short rehearsal, and do not treat resizing as an uptime measure.

If the repeated work is mainly keeping a computer awake, watching for dropped feeds and restarting a broadcast after a failure, a managed workflow can remove some of that hands-on burden: StreamNeo lets you upload a file and connect it to your YouTube channel without leaving your own computer running. The content, rights, ingest configuration and channel still need your attention, and a service does not make resizing or stream-health checks unnecessary.

A practical pre-flight checklist

Before going live, write down the source dimensions, aspect ratio, frame rate and audio format. Decide whether the output will preserve the whole frame with padding or fill the canvas by cropping. Then record the chosen output canvas and codec, and verify that the installed FFmpeg build supports the encoder you plan to use.

Check YouTube’s current encoder guidance for bitrate, keyframe interval, transport and supported settings for that codec and frame rate. Confirm that the outgoing connection can sustain the chosen feed under realistic conditions. Avoid selecting a bitrate by copying a value for a different resolution or frame rate.

Run a representative test that includes the most demanding motion, the loudest and quietest audio, and at least one loop join. Confirm that the output geometry is correct, playback is not stretched, sound is present, FFmpeg keeps pace, and YouTube receives a healthy feed. Review the live console messages rather than assuming a local preview tells the whole story.

Finally, decide how you will monitor a long run and who is responsible if it goes offline. Keep a copy of the working configuration, but note the FFmpeg version and source file it was checked against. Re-test after changing the source, encoder, host or YouTube ingest settings; a configuration that worked for one file may not suit another.

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

What are the best FFmpeg settings to resize a pre-recorded video for YouTube Live?

There is no single best combination for every source. Choose a canvas that suits the channel, preserve proportions, and explicitly select padding or cropping if the source ratio differs. Check the resulting file and YouTube ingest settings with representative media before relying on it.

How do I resize a video without changing its aspect ratio?

Scale width and height proportionally rather than forcing each dimension independently. If the source ratio does not match the target canvas, fit the whole picture and pad the rest, or fill the canvas and accept a crop. Preview the result to confirm that important details remain visible.

Does -stream_loop -1 keep a YouTube stream online?

No. It requests repeated input playback in FFmpeg, but it does not monitor or repair the encoder process, connection or YouTube ingest. Test the loop and make a separate plan to monitor and recover the live broadcast.

Will resizing stop YouTube ingest warnings?

Not by itself. Resizing can correct a geometry mismatch, but warnings may concern bitrate, keyframes, connection stability, audio or other settings. Check the current YouTube guidance and live console message, then test one change at a time.

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 ↗