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

If FFmpeg keeps showing the same cartoon, check which input has -stream_loop -1. That option loops the input immediately after it: put it before the relevant -i. If you want several cartoons to play in rotation, make a playlist and loop that playlist input—not one cartoon file.

Without your command, file list, and FFmpeg version, the precise cause cannot be confirmed. The steps below distinguish an intentional single-file loop from a playlist or process-restart problem.

First, identify what FFmpeg is looping

Read the command from left to right and mark every -i. FFmpeg input options apply to the next input, so the location of -stream_loop -1 matters. FFmpeg documents -stream_loop as an input option; -1 means repeat indefinitely. See the FFmpeg command-line documentation.

  • If the input is one cartoon file, an infinite loop will replay that same cartoon by design.
  • If the input is a playlist, FFmpeg should advance through its entries. If it does not, check the playlist, file paths, ordering, and which input the command maps.
  • If FFmpeg exits and starts again on the same cartoon, a shell script, service manager, or container may be restarting it with the same file. That is separate from FFmpeg’s input loop.

Loop one prerecorded video

For a single file, place -stream_loop -1 immediately before that file’s -i:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Roku Streaming Stick HD with Voice Remote
  • HD streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
  • Compact without compromises: The sleek design of Roku Streaming Stick won’t block neighboring HDMI ports, and it even powers from your TV alone, plugging into the back and staying out of sight. No wall outlet, no extra cords, no clutter.
  • No more juggling remotes: Power up your TV, adjust the volume, and control your Roku device with one remote. Use your voice to quickly search, play entertainment, and more.
  • Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
  • TV, simplified: With setup that only takes minutes, a simple-to-navigate Home Screen, and an uncluttered remote control that does all you need—Roku makes it easier to watch the TV you love.
ffmpeg -re -stream_loop -1 -i cartoon.mp4 
  -c:v libx264 -c:a aac 
  -f flv 'rtmps://INGEST_URL/STREAM_KEY'

This is a schematic example, not a tested command. Replace the ingest URL and key with the values from YouTube Live Control Room, and select encoding settings that fit your video, available processing capacity, and upload bandwidth. Do not publish or share a real stream key.

-re paces prerecorded input at its native rate for live output. FFmpeg cautions against using it on an actual live input; it is for files being played out as if live. See the FFmpeg command-line documentation.

Loop a playlist of cartoons

1. Create the playlist file

Make a text file named playlist.ffconcat with entries in the order you want them played:

Rank #2
Sale
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
  • Ultra-speedy streaming: Roku Ultra is 30% faster than any other Roku player, delivering a lightning-fast interface and apps that launch in a snap.
  • Cinematic streaming: This TV streaming device brings the movie theater to your living room with spectacular 4K, HDR10+, and Dolby Vision picture alongside immersive Dolby Atmos audio.
  • The ultimate Roku remote: The rechargeable Roku Voice Remote Pro offers backlit buttons, hands-free voice controls, and a lost remote finder.
  • No more fumbling in the dark: See what you’re pressing with backlit buttons.
  • Say goodbye to batteries: Keep your remote powered for months on a single charge.
ffconcat version 1.0
file 'cartoon-01.mp4'
file 'cartoon-02.mp4'
file 'cartoon-03.mp4'

Use paths that resolve from the directory where FFmpeg runs, or specify the intended paths explicitly. Check spelling, capitalization where relevant, and ordering if the same item keeps appearing.

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

2. Loop the playlist input

Use the playlist as the input and put 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'

The concat demuxer presents the files as a sequence. -safe 0 allows paths that the demuxer would otherwise reject as unsafe, so use it only with a playlist you control. FFmpeg’s full documentation describes concat demuxer sequencing and requirements.

Rank #3
Sale
Roku Streaming Stick 4K with Voice Remote - HDR10+ & Dolby Vision
  • Stunning 4K and Dolby Vision streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
  • Breathtaking picture quality: Stunningly sharp 4K picture brings out rich detail in your entertainment with four times the resolution of HD. Watch as colors pop off your screen and enjoy lifelike clarity with Dolby Vision and HDR10+.
  • Seamless streaming for any room: With Roku Streaming Stick 4K, watch your favorite entertainment on any TV in the house, even in rooms farther from your router thanks to the long-range Wi-Fi receiver.
  • Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
  • Compact without compromises: Our sleek design won’t block neighboring HDMI ports, so you can switch from streaming to gaming with ease. Plus, it’s designed to stay hidden behind your TV, keeping wires neatly out of sight

3. Check compatibility before relying on the sequence

For concat-demuxer use, the files need compatible streams, codecs, and time bases. Inaccurate durations can cause boundary artifacts. If the cartoons differ in format or stream parameters, normalize them or use the concat filter and re-encode as appropriate instead of assuming stream-copy concatenation will work. FFmpeg discusses the distinction in its FAQ on concatenating video.

Check YouTube ingest and encoder settings

Use the URL and key for the intended live stream

In YouTube Live Control Room, confirm the ingest URL and stream key for the broadcast. YouTube describes the key as a password and address: treat it as a credential, not as public configuration. The live stream settings guide explains stream URL and key management. YouTube recommends RTMPS, which encrypts the feed between the encoder and Google’s servers; retrieve the RTMPS URL in Live Control Room and use it with the matching key. See YouTube’s RTMPS encryption guidance.

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

Match bitrate and keyframes to the output

YouTube’s encoder guidance accessed on 2026-10-03 lists H.264, H.265/HEVC, and AV1 as supported RTMP/RTMPS codecs, frame rates up to 60 fps, CBR, and a recommended two-second keyframe frequency that should not exceed four seconds. Its H.264 table gives these examples:

Rank #4
Sale
Amazon Fire TV Stick 4K Plus with AI-powered Fire TV Search, Wi-Fi 6, stream hundreds of thousands of movies and shows, free & live TV, find shows faster with Alexa+
  • Advanced 4K streaming - Elevate your entertainment with the next generation of our best-selling 4K stick, with improved streaming performance optimized for 4K TVs.
  • The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
  • Cloud gaming, no console required – Stream Call of Duty: Black Ops 7, Hogwarts Legacy, Outer Worlds 2, Ninja Gaiden 4, and hundreds of games on your Fire TV Stick 4K Select with Xbox Game Pass and Luna via cloud gaming. Xbox Game Pass subscription and compatible controller required. Each sold separately.
  • Smarter picks with Alexa+ – Getting to what you love has never been easier. Press the voice remote button and talk naturally to find what to watch across your apps, manage your smart home, or dive into virtually any topic.
  • Wi-Fi 6 support - Enjoy smooth 4K streaming, even when other devices are connected to your router.
Output Minimum bitrate Recommended bitrate
1080p30 5 Mbps 14 Mbps
720p30 3 Mbps 8 Mbps

These are recommendations from the currently accessed YouTube guidance, not a guarantee of stable delivery. Use the row for the chosen codec, resolution, and frame rate; check YouTube’s current table before going live, and leave enough upload capacity for a stable feed. YouTube recommends testing with representative motion and audio and monitoring stream health. See its live encoder settings, bitrates, and resolutions.

Troubleshoot a stream that still repeats or breaks

  1. Check option placement. Find the intended input’s -i. Put -stream_loop -1 before it; an option placed before another input affects that other input.
  2. Confirm the input is really a playlist. If FFmpeg receives a single cartoon file, repeating it is the expected result. If it receives a playlist, inspect its entries, resolved paths, order, and the input used by the output mapping.
  3. Look for an external restart loop. If FFmpeg exits or fails and a wrapper, service, or container launches the same command again, fix the restart command or its input. Changing FFmpeg’s media loop will not change what the supervisor launches.
  4. Investigate transitions separately. If playback advances but a cut has a glitch, check stream compatibility and duration or timestamp behavior. Use the concat filter and re-encode where the sources require it.
  5. Use -re only for prerecorded media. Remove it for a genuinely live input; it is not a general fix for looping or dropped connections.
  6. Verify YouTube’s preview and health. Confirm the selected URL and key in Live Control Room, wait for preview, and monitor stream health. Keep the key private.

Understand the limits of a 24/7 setup

Looping media, keeping the FFmpeg process alive, maintaining a network connection, and YouTube’s archive behavior are separate concerns. A loop option does not supervise a crashed process or guarantee uninterrupted delivery. YouTube’s encoder setup page says streams under 12 hours are automatically archived; that statement does not establish that one uninterrupted 24/7 broadcast will be saved as a single complete video. Confirm archive handling for your channel and workflow in YouTube’s encoder stream setup guidance.

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 a continuous YouTube stream of uploaded videos without keeping a home computer online, StreamNeo is a cloud option. Upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded videos in the cloud; it does not go live from a camera.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
  • Essential 4K streaming – Get everything you need to stream in brilliant 4K Ultra HD with High Dynamic Range 10+ (HDR10+).
  • The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
  • Make your TV even smarter – Fire TV gives you instant access to a world of content, tailor-made recommendations, and Alexa, all backed by fast performance.
  • All your favorite apps in one place – Experience endless entertainment with access to Prime Video, Netflix, YouTube, Disney+, Apple TV+, HBO Max, Hulu, Peacock, Paramount+, and thousands more. Easily discover what to watch from hundreds of thousands of movies and TV episodes (subscription fees may apply), including free, ad-supported content.
  • Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
  • Nothing has to stay on at home.
  • Videos stream as uploaded, up to 4K 60fps, at one flat price per slot rather than quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card; it is one free day per account.

The same product is included on every plan; only the billing length changes. A slot includes one always-on stream, 10 GB of storage per slot pooled across active slots, 24/7 looping and playlists, automatic recovery if YouTube drops, and StreamNeo team support. Billing options are a day, a week, a month, six months, or a year; cancel any time. UPI and cards are accepted in India, and card checkout is available worldwide. For five or more slots, contact support.

Monthly: $9.99 per month. See StreamNeo for details, then start your free first day.

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 2
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
No more fumbling in the dark: See what you’re pressing with backlit buttons.; Say goodbye to batteries: Keep your remote powered for months on a single charge.
$96.71
SaleBestseller No. 5
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
$17.99

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.