Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
DocumentaryTube
Admit one · Blog

How to Stop FFmpeg from Repeating the Same Cartoon in a 24/7 YouTube Stream

FFmpeg repeats the input that follows -stream_loop -1. Learn how to loop one file deliberately or stream a rotating playlist to YouTube Live.
Opened Runtime5 min Written byDocumentaryTube Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If FFmpeg keeps showing one cartoon, check which input follows -stream_loop -1. That option loops the input immediately after it; when that input is a single video, repeating that video is exactly what FFmpeg is being asked to do. To rotate through multiple cartoons, make a playlist and loop the playlist input instead.

Without your command, playlist and FFmpeg version, it is not possible to identify the specific cause. The checks below distinguish an intentional single-file loop from a playlist or process-restart problem.

Check what FFmpeg is looping

  1. Read the full command and mark each -i. FFmpeg input options apply to the input they precede.
  2. Find -stream_loop -1. It should appear immediately before the -i for the file or playlist you intend to repeat.
  3. Identify that input. If it is cartoon.mp4, FFmpeg will repeat that cartoon indefinitely. If it is a playlist, it should advance through the playlist before starting it again.
  4. If the command is launched by a script, service manager or container, check whether that separate supervisor restarts FFmpeg with the same file after the process exits.

Loop one cartoon intentionally

For a prerecorded file, a schematic command is:

ffmpeg -re -stream_loop -1 -i cartoon.mp4 
  -c:v libx264 -c:a aac 
  -f flv 'rtmps://INGEST_URL/STREAM_KEY'

This demonstrates option placement, not a tested, ready-to-run command. Replace the ingest address and key with the values from YouTube Live Control Room, and choose encoding settings that suit the source, desired output and available computer and network capacity. Do not publish or share a real stream key.

-stream_loop is an input option; -1 means infinite looping. -re reads prerecorded media at its native rate to pace it for live output. FFmpeg cautions against using -re on an actual live input.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Loop a playlist of cartoons instead

Create the playlist

Make a text file named playlist.ffconcat with this format:

ffconcat version 1.0
file 'cartoon-01.mp4'
file 'cartoon-02.mp4'
file 'cartoon-03.mp4'

Put the files in the listed order, and use paths that resolve from the directory where FFmpeg runs. The concat demuxer reads the files as a sequence of packets and presents them as one input.

Loop that playlist input

Use the playlist as the input, placing the loop option before its -i:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat 
  -c:v libx264 -c:a aac 
  -f flv 'rtmps://INGEST_URL/STREAM_KEY'

-safe 0 allows paths the concat demuxer would otherwise reject as unsafe. Use it only with a playlist you control. The concat demuxer is not a general-purpose fixer for mismatched media: inputs need compatible streams, codecs and time bases. Inaccurate durations or timestamp differences can cause boundary artifacts. If files are incompatible, normalize them or use the concat filter and re-encode where appropriate rather than assuming stream-copy concatenation will work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For FFmpeg’s option behavior, see the FFmpeg command-line documentation and its full documentation on the concat demuxer. The FFmpeg concatenation FAQ explains when to use the concat filter instead.

Set up YouTube ingest and encoder settings

  1. In YouTube Live Control Room, obtain the ingest URL and stream key for the broadcast. YouTube recommends RTMPS; it encrypts the feed between the encoder and Google’s servers. See YouTube’s RTMPS guidance and its live stream settings help.
  2. Keep the stream key secret: YouTube describes it as a password and address. Use the key and URL in your command without exposing them in public logs, screenshots or examples.
  3. Choose a codec and bitrate based on the resolution and frame rate you will send. YouTube’s encoder guidance accessed on 2026-10-03 lists H.264, H.265/HEVC and AV1 for RTMP/RTMPS, frame rates up to 60 fps, constant bitrate (CBR), and a recommended two-second keyframe interval that should not exceed four seconds.
  4. For H.264, YouTube’s currently accessed table gives 5 Mbps minimum and 14 Mbps recommended at 1080p30, and 3 Mbps minimum and 8 Mbps recommended at 720p30. These are YouTube recommendations, not guarantees; consult the current table for the exact codec, resolution and frame rate you use. Leave capacity for normal network variation.
  5. Start the stream, wait for the preview in Live Control Room, and monitor stream health. YouTube recommends testing with representative movement and audio. Its encoder settings guidance has the current recommendations; its encoder setup instructions explain the setup flow.

Diagnose a playlist that still repeats one cartoon

  • The command has only one video input: FFmpeg is looping that file, not a playlist. Create a playlist and point the looped input at it.
  • The playlist contains one entry: add the intended files, save the playlist, and verify their order.
  • Paths do not resolve as expected: check the working directory and the paths in playlist.ffconcat. Confirm the command actually opens the playlist you edited.
  • A different input is being looped or mapped: inspect every -i and confirm the loop option and output mapping refer to the intended input.
  • The stream starts the same cartoon after FFmpeg exits: inspect any wrapper, scheduled task, service manager or container restart policy. A supervisor restarting a command with the same file is separate from FFmpeg’s input-loop behavior.
  • Transitions fail, show artifacts or lose synchronization: check stream compatibility, time bases and duration or timestamp behavior. Normalize the sources or use the concat filter with re-encoding if the files do not suit the concat demuxer.
  • Playback is unexpectedly fast or buffering: check whether the input is prerecorded and paced with -re, then compare the chosen bitrate with the system’s sustained upload capacity and YouTube’s current guidance. Do not add -re to a genuinely live input.
  • YouTube does not receive the stream: recheck the ingest URL and key in Live Control Room, ensure the key has not been exposed or replaced, and wait for preview while checking stream health.

What a 24/7 loop does—and does not—guarantee

Looping media, keeping FFmpeg running, maintaining a reliable network connection and YouTube’s handling of the broadcast are separate concerns. A looping command alone does not supervise the process or guarantee uninterrupted delivery. YouTube says streams under 12 hours are automatically archived; that does not establish that an uninterrupted 24/7 broadcast will appear as one complete archive. Confirm archive handling for your channel and workflow rather than relying on a single complete recording.

Cartoons and other prerecorded material also need to be content you have rights to stream. YouTube’s encoder setup help covers starting a stream, but it does not grant rights to the video or music. Check copyright permissions and the platform’s applicable policies before broadcasting.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If you want the playlist to keep running without a home computer or connection staying on, StreamNeo is a YouTube service for looping uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Your computer can be off; StreamNeo runs the stream in the cloud and automatically recovers if YouTube drops it. Each slot streams what you uploaded, up to 4K 60fps, at one flat price per slot with no quality tiers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The first day is free with no card, once per account. Monthly pricing is $9.99 per month. Start your free day with StreamNeo.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Screening Room

  1. How to Send a YouTube Live Stream to a Premiere—and What “Premiere Playlist” Can’t DoAdmit one · BlogHow to Send a YouTube Live Stream to a Premiere-and What “Premiere Playlist” Can't DoOpened04 OCT 2026Runtime6 min
  2. How to Run a YouTube Live Playlist from a Raspberry PiAdmit one · BlogHow to Run a YouTube Live Playlist from a Raspberry PiOpened04 OCT 2026Runtime4 min
  3. How to Make a 24/7 Indian Music YouTube Stream Restart After a Server RebootAdmit one · BlogHow to Make a 24/7 Indian Music YouTube Stream Restart After a Server RebootOpened04 OCT 2026Runtime6 min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.