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

You can run a continuous YouTube stream by feeding an ordered playlist of compatible video files to FFmpeg inside a container and sending the encoded output to YouTube’s ingest endpoint. The hard parts are not the loop itself: your channel must be eligible to stream, the files must concatenate cleanly, the stream key must stay secret, and you need separate checks for container health and YouTube’s receipt of good audio and video.

This is a configuration guide, not a tested Docker image or end-to-end command recipe. The exact FFmpeg invocation depends on your input files, build, output protocol, and encoder settings; verify those against your installed FFmpeg and test the complete path before leaving it unattended.

What you need before starting

  • A YouTube channel eligible to livestream.
  • An FFmpeg build that supports your playlist input, required encoders, and chosen YouTube output protocol.
  • An ordered media playlist whose files can be concatenated by your chosen method.
  • A Docker host that can access the media and reach YouTube’s ingest endpoint over the network.
  • A plan to protect the stream key, test the live preview, monitor the process, and respond to failures.

A Docker container packages and runs the process; it does not make an incompatible playlist compatible or prove that YouTube is receiving a valid feed. Treat playback, publishing, and recovery as separate stages.

Make sure YouTube will accept a livestream

YouTube Help’s current eligibility guidance says the channel must be verified and must not have had livestreaming restrictions in the previous 90 days. Check the channel’s current status in YouTube Studio’s Live Control Room before preparing an unattended stream; account rules or interface labels can change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
  • Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

In YouTube Studio, create or select the stream settings you intend to use, then obtain the ingest URL and stream key shown for that stream. YouTube describes a stream key as identifying the creator and stream to YouTube and permits a custom key to be reused. The key is a credential: do not put it in a public repository, a published Docker image, a committed Compose file, screenshots, command transcripts, or a support request. Provide it to the runtime through a protected secret mechanism appropriate to your host, and restrict who can read that configuration.

Understand the stream and the broadcast

YouTube’s API distinguishes a liveStream resource, which describes the incoming feed and ingest destination, from a liveBroadcast resource, which represents the event viewers watch. Its documentation uses a 24/7 feed as an example of reusing a stream resource. A persistent FFmpeg feed and the state of a particular broadcast are therefore related but distinct; do not assume that restarting the encoder necessarily means you must create a new stream resource.

Rank #2
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
  • Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

Prepare a playlist FFmpeg can concatenate

The FFmpeg concat demuxer reads a text list containing one file directive per input and presents the listed media successively, as though their packets had been muxed together. It is a packet-level join, not a general-purpose converter. For reliable concat-demuxer use, every input needs matching stream structure, codecs, and time bases.

Inspect and normalize the files

  • Check that each file has the expected video and audio streams, codec, resolution, frame rate, audio layout, and timing characteristics.
  • Pay particular attention to files exported from different cameras or editing presets. A difference in resolution or frame rate may signal other stream or timing differences that prevent clean packet-level concatenation.
  • If streams, codecs, or time bases do not match, use a suitable normalization or re-encoding workflow before relying on the concat demuxer. The precise filter or command depends on the media and is not established by this guide.
  • Check durations. Missing or inaccurate duration information can cause timestamp gaps or artifacts; the concat list supports a duration directive when a duration is missing or wrong.
  • Test transitions, including audio endings and beginnings. When audio and video streams have different lengths, timestamp gaps can occur between files.

Write the concat list

A concat-demuxer list is a plain-text file with one file entry per media input, in the order you want them played. If you include the format header, its first line must be exactly ffconcat version 1.0. Paths must resolve inside the container, not merely on the host. Verify how your chosen FFmpeg build handles paths and special characters in filenames before using a large playlist.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
  • CanaKit Raspberry Pi 5 Essentials Starter Kit

Do not treat a local .m3u8 playlist as proof that the same files are suitable for concatenation or that YouTube HLS is the right output. An input playlist format and the protocol used to send a live feed to YouTube are different decisions.

Choose how FFmpeg will send the feed

YouTube’s Live API lists RTMP (including RTMPS), HLS, and DASH ingest types, with primary and backup ingest addresses and stream names. Choose a protocol supported by your actual FFmpeg build and output path; URL structure and media requirements are not interchangeable across protocols.

Rank #4
SANOOV Raspberry Pi 5 4GB Kit, 4GB RAM Single Board Computer with Active Cooler and ABS Case, Complete Raspberry Pi 5 Starter Kit for IoT Robotics Retro Gaming
  • All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
  • Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
  • Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
  • Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
  • Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online
Choice When it may fit Important constraints
RTMPS YouTube describes RTMPS as a suitable choice for ordinary content, particularly when lower latency matters. It is RTMP carried over SSL. YouTube’s guidance specifies the rtmps protocol, a valid YouTube endpoint, and port 443. Confirm the exact URL and stream name for the selected YouTube ingest.
HLS Consider it when your encoder’s output path and the use case fit segment-based ingest. YouTube’s HLS guidance requires muxed audio and video, H.264 or HEVC video, AAC audio, closed GOP, and segments no longer than 5 seconds. It recommends 1–4 second segments; smaller segments can reduce latency but cost rebuffering tolerance and encoding efficiency. HLS is segment-based and usually has higher latency than RTMP and WebRTC.
DASH The API lists DASH as an ingest type; suitability depends on support in your chosen encoder and workflow. The cited materials here do not establish a specific FFmpeg configuration for DASH. Verify the current YouTube requirements and your build before choosing it.

For HLS, YouTube’s documented video frame-rate ceiling is 60 fps. Do not infer that an HLS input playlist makes HLS output necessary. For ordinary lower-latency content, RTMPS is the simpler starting point if your FFmpeg build supports the required output.

Plan the Docker runtime without exposing credentials

The container needs access to the playlist and all referenced media, the FFmpeg executable and required codecs/protocols, outbound network access to the selected YouTube ingest, and the protected stream credential. A bind mount or volume is a common way to provide media to a container, but the correct mount layout and secret mechanism depend on your deployment environment. Confirm their behavior in your Docker setup rather than copying an unverified example.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
RasTech Raspberry Pi 5 8GB Kit with Active Cooler and Pi5 Case
  • 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
  • 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
  • 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
  • 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
  • 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.

Before launching, check the installed FFmpeg build and its local help/version output to confirm the required demuxer, encoders, and output protocol are present. FFmpeg documents -stream_loop -1 as an infinite loop for one input; that option alone is not a verified recipe for looping a concat playlist and publishing it from Docker. Option order, concat behavior, encoding choices, and output URL syntax depend on the selected path and build. Do not promote an untested command as a production-ready 24/7 setup.

Separate process recovery from stream verification

A Docker restart policy can restart a process that stops, but restarting is not the same as restoring a valid stream. It cannot fix a revoked key, incompatible media, a bad output URL, or a container that is running but no longer delivering fresh frames. Set up monitoring or alerts for both the host/process and the actual stream, and decide who will investigate failures.

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

Test before leaving the stream unattended

  1. Check eligibility. Confirm the channel’s livestream status in YouTube Studio and select the intended stream settings.
  2. Prepare the secret and destination. Copy the correct ingest URL and stream key into protected runtime configuration. Avoid printing the key in logs or exposing it in deployment files.
  3. Validate the media sequence. Confirm concat-demuxer inputs have matching streams, codecs, and time bases; inspect duration metadata and correct known inaccuracies.
  4. Validate the container environment. Confirm the media and playlist are accessible from inside the container, the FFmpeg build has the required components, and outbound network access works.
  5. Run a short private or unlisted test. YouTube recommends test streams. Check the Live Control Room preview and verify that video, audio, and playlist transitions are correct.
  6. Observe the feed for a meaningful interval. Confirm that later files play, timestamps remain sensible, and the process continues to send fresh audio/video—not simply that the container remains running.
  7. Test recovery separately. Determine what happens if FFmpeg exits or the host restarts, and verify your alerting and restart or escalation procedure. Do not assume successful recovery from a process restart without checking YouTube’s preview again.

Troubleshoot common failures

Symptom Likely causes to check Next action
FFmpeg cannot open a playlist file or media input The path is valid on the host but not visible inside the container; a filename or list entry may not resolve. Check the container’s mounted paths and confirm each listed file is readable from the container’s point of view.
Concat errors, broken transitions, or timestamp jumps Inputs may differ in stream structure, codecs, or time bases; durations may be missing or inaccurate. Inspect each input, normalize incompatible media, and correct duration information where needed. Test transitions before extending the run.
Video reaches YouTube but the preview has missing or poor audio/video The source may lack the expected stream, the output path may not match YouTube’s protocol/media requirements, or encoding settings may be unsuitable. Check the source streams and the selected protocol’s requirements, then inspect the Live Control Room preview and quality indicators.
YouTube does not receive the feed Check the ingest URL, stream name/key, protocol, port/network access, and whether the channel can currently livestream. Recheck the selected YouTube stream settings and account status. Rotate or replace a key if it may have been exposed; never share it in a public log.
The container is running but the live picture is frozen or stale The process may be alive without delivering fresh frames, or the feed may have stopped being accepted. Check FFmpeg output and YouTube preview/quality separately. Container status alone is not proof of a live, healthy stream.
The stream stops after a process or host failure Automatic recovery may not be configured, or a restart may return with invalid credentials, inaccessible media, or an unsuitable broadcast state. Test the restart path end to end, confirm the feed in Studio after recovery, and keep a human alert/escalation route.

Or let it run in the cloud

If you do not want a Docker host, computer, or home connection to stay on, StreamNeo is a YouTube-only cloud service: upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the uploaded videos from the cloud; it does not stream a camera feed.

  • Nothing has to stay on at home.
  • Any quality up to 4K 60fps is streamed as uploaded, at one price per slot with no re-encode or quality tiers.
  • It automatically attempts recovery if YouTube drops the stream.
  • The first day is free, with no card required.

Every slot includes one always-on stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, automatic recovery if YouTube drops, and StreamNeo team support. The same product is included on every plan; only the billing length changes. Monthly: $9.99 per month. UPI and cards are available in India; card checkout is available worldwide. Five or more slots require contacting support.

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

See StreamNeo for details, or start the free first day.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$259.95
Bestseller No. 2
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$419.99
Bestseller No. 3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
CanaKit Raspberry Pi 5 Essentials Starter Kit
$189.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.