Skip to content
streamneo.
Tools14 min read

How to Create a YouTube Live Loop of Seasonal Store Promotions Using FFmpeg

Loop a rights-cleared seasonal promotion on YouTube Live with FFmpeg, from stream-key setup and encoding to preview checks and monitoring.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

To loop a seasonal store promotion on YouTube Live with FFmpeg, prepare a video you have the right to show, create a live event in YouTube Studio, and send the file to YouTube’s ingest address with FFmpeg. The stream key identifies the broadcast destination; FFmpeg’s input options control file repetition and pacing.

This is a practical way to offer a scheduled live viewing of a promotion, not a shortcut to more reach or monetisation. YouTube controls the live event, preview, and stream-health notices; your file and encoder determine what you send. Test the whole path before customers are likely to tune in.

Prepare a promotion file that can repeat cleanly

Start with one finished seasonal asset: for example, a winter-sale video showing the products, dates, shop location, and any terms customers need to understand. Use original footage, product images, music, voice-over, fonts, and brand marks, or material for which you have permission covering this use. A file being available online does not itself give you permission to rebroadcast it.

A loop repeats the end of the file into its beginning. Review those points in both picture and sound. If the last shot fades to black and the opening starts with a bright product card, the transition will be visible every time around. If a music bed stops abruptly, the join may be more distracting than the promotion itself. Edit the asset to make the boundary feel intentional; FFmpeg’s loop option repeats the file, but does not make its ending seamless.

Check the full video before scheduling. Confirm that prices, dates, offer conditions, spoken claims, and on-screen text are current and legible at the size viewers are likely to watch. A promotion that has expired can confuse customers even if the stream itself is working. Keep a final approved export distinct from drafts so you do not accidentally loop an earlier cut.

Choose an aspect ratio and resolution that suit the source. Do not enlarge a small product clip merely to label the broadcast as high resolution: scaling cannot restore detail that was not in the original. Preserve a clean master, then make an export that you have actually played through. Inspect the file’s streams with a media inspection tool such as FFmpeg’s ffprobe, particularly if its container, frame rate, or audio layout is unfamiliar.

The content decision matters independently of the technical setup. YouTube’s reused-content guidance and monetisation policies are separate from copyright permissions. YouTube’s 15 July 2025 policy update describes repetitive or mass-produced material as “inauthentic content”; a live format does not make copied material original, and rights clearance alone does not guarantee monetisation eligibility. If the promotion uses third-party material, assess both permission and whether the channel’s content meets current platform policy.

Create the YouTube Live event and keep the key private

In YouTube Studio, choose Create, then Go Live, and create or schedule a stream in Live Control Room. YouTube’s encoder setup instructions explain how to obtain the server URL and stream key for an encoder. The interface may change, so follow the current labels in Studio rather than relying on an old screenshot.

The server URL tells the encoder where to send the stream. The stream key associates that incoming feed with the event or stream configuration. It does not tell FFmpeg to loop a video; looping is set on the FFmpeg input. Copy the URL and key from the intended event, then check that you have not mixed values from another scheduled stream.

Treat the key like a password. Do not place a real key in a public tutorial, screen recording, shared chat, source repository, or support message. A command typed directly into a shell can remain in shell history, and on some systems command-line arguments may be visible to other local users or tools. Consider a protected environment variable or a private script or configuration, and understand who can read it on the machine you use. If a key is exposed, use YouTube Studio’s current controls to reset or replace it, then update the encoder configuration.

Scheduling the event separately from starting FFmpeg gives you time to check title, visibility, start time, thumbnail, and description. YouTube says a scheduled stream can be promoted ahead of time; that is a planning option, not a promise about who will see it. Decide whether you want the event public, unlisted, or private while you test, and make sure the setting matches your intended audience before promotion.

Loop the file and pace it in real time

For a file-based live feed, FFmpeg needs to read the media at its normal rate rather than process it as fast as the computer can manage. The -re option reads at native frame rate (equivalent to -readrate 1) and is commonly used to pace file output as a live stream. The -stream_loop -1 input option repeats the input indefinitely; -stream_loop 0 means no repetition. Both are input options, so put them before the -i they apply to.

The following is an illustrative command skeleton, not a tested universal command. Replace the file, server URL, and secret with your own values, and select encoding settings that fit your actual media and YouTube’s current recommendations:

ffmpeg -re -stream_loop -1 -i "seasonal-promo.mp4" \\
  -c:v libx264 -preset veryfast -pix_fmt yuv420p \\
  -r 30 -g 60 -b:v 5M -maxrate 5M -bufsize 10M \\
  -c:a aac -b:a 128k -ar 44100 \\
  -f flv "<YouTube server URL>/<STREAM_KEY>"

This example assumes 1080p30 SDR H.264 video and stereo AAC audio. At 30 frames per second, -g 60 represents a two-second group of pictures; it is not a setting that makes the file loop. The loop comes from -stream_loop -1, pacing from -re, and the destination from the YouTube URL and key. Do not paste a real key into an article or leave a key-bearing command in a location other people can access.

Do not copy the example unchanged if your file differs. Inspect its video and audio streams, then check the output against YouTube’s live encoder settings. FFmpeg’s documentation for input options describes looping and read-rate behaviour. In particular, -re is useful for file playout; FFmpeg cautions against using low read rates on real capture or live inputs because they can cause packet loss.

Choose an ingest and encoding that fit the source

YouTube recommends RTMP/RTMPS ingestion for typical workflows, with RTMPS providing a secure ingest connection. Its ingestion protocol guidance also describes HLS as an alternative for some workflows, including particular codec or HDR needs. HLS sends segments and has higher latency, so it is not automatically the simpler choice for a straightforward FFmpeg file loop. Follow the protocol and muxer requirements for the event you create.

For a conventional SDR promotion, H.264 video with AAC audio is a broadly compatible starting point. YouTube recommends constant bitrate (CBR) and a keyframe frequency of two seconds, not exceeding four seconds. Match the keyframe interval to your frame rate: a two-second interval at 30 fps is 60 frames. Confirm the current guidance for the resolution, frame rate, protocol, and audio you actually use rather than treating a sample command as a platform guarantee.

The bitrate comparison below gives two YouTube H.264 recommendations from the current settings table. YouTube’s retrieved guidance did not state a publication date for these figures; treat them as platform recommendations, not measured performance claims. Check the official table again when configuring a real stream.

Output example YouTube recommended video bitrate When it may fit
720p at 30 fps, H.264 3 Mbps A source that is naturally modest in detail, or a connection where a lower video rate is more practical
1080p at 30 fps, H.264 5 Mbps A clean 1080p source with enough stable upload capacity for the chosen output

Those video figures do not include audio or network overhead. Leave headroom in the connection you rely on; a rate that is only just manageable in ideal conditions may not behave well when other devices share the connection. If the shop’s upload connection is unstable, a lower suitable output may be more useful than pushing a higher resolution that the source does not support.

The example also uses stereo AAC at 128 Kbps and 44.1 kHz, values YouTube lists in its encoder guidance. Check that the file’s sound is genuinely stereo if stereo output is intended, and listen for clipping, silence, or an abrupt loop join. If the promotion has no audio, decide deliberately whether to send an audio stream rather than assuming the input will be handled as you expect.

You can sometimes use stream copy (-c copy) instead of re-encoding, which avoids another encode but depends on source codecs, container, timestamps, and ingest compatibility. Re-encoding lets you choose output characteristics, but uses compute and can reduce quality if configured poorly. Neither approach is assured for every file. Inspect the source and run a real test through YouTube’s preview before settling on the command.

Start the encoder and inspect YouTube’s preview

Start with a test well before the promotion’s intended viewing time. Use a test event or an appropriately restricted event if you do not want customers to encounter a draft. Start FFmpeg, then wait for the incoming signal to appear in Live Control Room. A running process only establishes that FFmpeg is executing; it does not prove that YouTube is receiving a healthy, watchable stream.

Check the preview for the right video, correct orientation, readable text, and the expected picture quality. Listen for audio presence and a clean start. Look at the stream-health area and any warnings; an ingest problem may be about bitrate, codec, frame rate, or audio rather than the loop option. Resolve what the dashboard reports and verify again. YouTube’s own guidance is simple: “Make sure to test before you start your live stream.”

Use representative movement and sound in the test. A static title card does not exercise the same encoding behaviour as quick product cuts, animated prices, or a voice-over with music. If the actual promotion contains motion and audio, test that file or a representative segment with those features. This helps you find defects such as stutter, missing audio, text too small to read, or an unexpected crop before the stream is public.

When the preview is correct, follow the Live Control Room workflow to start the live event. YouTube may require you to wait for preview and then click Go live, depending on how you created the stream. Confirm the event is actually live before telling customers to watch. If you intend to promote it beforehand, use the event link and accurate schedule, then update customers if the timing changes.

A live loop is not the same choice as an ordinary upload. A live event can provide a scheduled viewing occasion, while an uploaded video remains available on demand without an encoder session. Consider whether customers need a live event at all: if they simply need to see the sale details whenever convenient, an upload may be easier to manage. Neither format inherently promises more viewers.

Monitor interruptions and diagnose from evidence

While the stream is running, keep Live Control Room available and check stream health and messages. YouTube recommends monitoring health during the event. Watch the picture and audio as a viewer would, not only the command prompt. If you use a second device or a separate viewer account to confirm playback, make sure it is not accidentally playing the stream muted or at a quality that hides the issue you are trying to find.

If the preview or live playback freezes, first distinguish whether FFmpeg has stopped, the network has dropped, or YouTube is reporting an ingest issue. Check FFmpeg’s output for errors and Live Control Room for health details. The YouTube API’s live stream health documentation lists issue categories including bitrate, codec, audio, and frame-rate problems. Use the actual warning to guide diagnosis rather than changing several settings at once.

For a bitrate warning, compare your output configuration with YouTube’s table and consider whether the connection can sustain the selected rate. For an audio warning, check the input stream and AAC output settings, then listen to a fresh preview. For a codec or frame-rate warning, compare the outgoing configuration and source with the event’s accepted settings. Make one change, test it, and note what changed; this keeps diagnosis understandable if the same setup is needed for the next seasonal campaign.

A dropped connection may stop the encoder or leave the event waiting for input. Do not assume that an indefinitely repeated file means the broadcast will recover: -stream_loop -1 repeats media while FFmpeg is running, not after a process or connection has failed. For a local FFmpeg setup, decide who can notice and restart it, and test the recovery procedure. A separate guide to reconnecting an FFmpeg YouTube stream after an outage can help you think through that failure mode.

For a long-running promotion, the computer, power, and internet connection are part of the operating plan. If you are running the encoder locally, arrange a way to notice power loss and confirm the machine is still operating after an outage; this Mac mini power-cut checklist covers one specific local setup. A hosted workflow can remove the need to keep your own computer on: StreamNeo takes an uploaded video and YouTube stream key and runs the file as a 24/7 broadcast, which addresses the specific burden of keeping a shop computer and local encoder running overnight. It remains your responsibility to provide appropriate content, protect the key, and verify the YouTube event.

If the event is interrupted, communicate accurately. Do not leave a stale event page or promotion saying the stream is live if it is not. After restoration, check the preview and health again before treating the broadcast as available. Keep a brief incident note—time, observed warning, action taken—so that the next operator can distinguish a recurring configuration issue from a one-off outage.

Plan seasonal changes and protect the setup

Treat each campaign as a planned change, not a live edit made in a hurry. Keep an approved master, record which file and YouTube event were used, and check that the campaign dates remain valid throughout the planned run. If you replace the promotion, create and test a new export first. Changing the file may require restarting the encoder or creating a new event, depending on how you have arranged the stream; test the exact transition rather than assuming a replacement will appear without interruption.

For a business with several promotions, a playlist or time-based schedule may be more suitable than one endlessly repeated clip, but it adds more content and transitions to verify. You can review how to schedule playlists by time of day if the store needs distinct morning and evening material. For a single seasonal offer, one carefully reviewed file is easier to audit and less likely to show a stale message between items.

Separate access to the video, the YouTube channel, and the stream key. Give the key only to people and systems that need to configure the encoder. Avoid putting it in a shared document alongside the public event link. If a staff member leaves or a device is retired, review access and replace exposed credentials using Studio’s current controls. A private operational checklist can note where credentials are managed without reproducing the secret itself.

Decide how the event will end. Stop the encoder and end the stream in Live Control Room according to the workflow you selected, then verify the event status. YouTube says streams under 12 hours are automatically archived; do not rely on that guidance for longer broadcasts or assume an archive is available without checking. If you need a replay, preserve your approved source file independently of the live event.

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

How do I loop a video on YouTube Live with FFmpeg?

Use -stream_loop -1 before the input’s -i option to repeat that file indefinitely, and use -re before the input to pace file reading at its native rate. Configure an appropriate output for YouTube’s ingest, then verify the preview and stream health in Live Control Room. The loop option does not keep a failed encoder process alive.

Is the stream key what makes the promotion repeat?

No. The stream key associates FFmpeg’s outgoing feed with the YouTube stream configuration; -stream_loop -1 controls input repetition. Keep the key private and avoid including it in shared commands, screenshots, or public scripts.

Should I use 720p or 1080p for a store promotion?

Choose a resolution that matches the source detail and the upload capacity available to the encoder. YouTube’s current H.264 table recommends 3 Mbps for 720p30 and 5 Mbps for 1080p30, but these are configuration recommendations, not a reason to upscale a smaller source. Test the chosen settings in Live Control Room before the event.

Does looping a live promotion make it eligible for monetisation?

Not by itself. Copyright permission and YouTube’s monetisation policies are separate questions, and repetitive or reused material may not meet the platform’s requirements. Review YouTube’s current policy pages and make sure the channel’s content adds meaningful value where required.

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 Tools guides ↗ · All topics ↗