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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To stream a sequence of video files continuously to YouTube, create an FFmpeg concat-demuxer list, then feed it to FFmpeg with looping enabled and YouTube’s RTMPS ingest URL and stream key. This works best when the files have matching streams, codecs, and time bases. If they do not, normalize and re-encode them with FFmpeg’s concat filter instead.

What the file list does—and when to use it

An FFmpeg concat-demuxer list is a text file that tells FFmpeg which media files to read, in what order. It is not a YouTube playlist: FFmpeg reads the listed files as sequential input and sends one continuous output to YouTube Live.

The demuxer can avoid re-encoding when the files are compatible. FFmpeg’s documentation says, “All files must have the same streams (same codecs, same time base, etc.).” Differences can cause errors, gaps, or timestamp problems. If sources need conversion to a consistent format, use the concat filter and re-encode.

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

Prepare and check the video files

Make a concat list

Create a plain-text file named, for example, playlist.ffconcat. Put the exact header below on the first line, with no leading spaces or byte-order mark, followed by one file directive per video in playback order:

#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
ffconcat version 1.0
file 'video-01.mp4'
file 'video-02.mp4'
file 'video-03.mp4'

Use paths that are valid from the directory where FFmpeg runs, or include full paths. The file directive accepts paths; escape spaces and special characters with backslashes or quote the path appropriately. When using the explicit header, save the script in an encoding compatible with FFmpeg’s documented extended-ASCII script format.

Confirm compatibility and duration metadata

Before starting a long stream, check that every file has the same stream layout, codecs, and time bases. The demuxer adjusts timestamps so each input follows the previous one, but differing stream lengths can leave gaps. Incorrect or estimated duration metadata can also misplace later timestamps and create artifacts. If a file’s duration is absent or inaccurate, provide a correct duration directive in the concat script.

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

Set up YouTube Live

In YouTube Live Control Room, create or select the live stream and obtain its ingest server address and stream key. Use the exact values YouTube shows; the destination in the command below is only a placeholder. Keep the stream key private: anyone with access to it may be able to send video to your live stream. YouTube documents stream-key management at Manage your live stream settings.

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

Loop the list and send it to YouTube

Replace the playlist path, ingest endpoint, and key with your actual values. This illustrative command assumes 30 fps video and is not a tested, universal configuration:

Rank #3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
  • CanaKit Raspberry Pi 5 Essentials Starter Kit
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat 
  -c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k 
  -r 30 -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://YOUR_INGEST_ENDPOINT/YOUR_STREAM_KEY'
  • -re paces file input in real time, while -stream_loop -1 repeats the input indefinitely. These are common FFmpeg options for file-based streaming; verify their availability and exact behavior in your installed FFmpeg build.
  • -f concat selects the concat demuxer, and -safe 0 permits paths that may otherwise be rejected as unsafe. Only use it with a playlist you control.
  • The example encodes H.264 video and AAC audio, then sends an FLV-formatted output to the ingest URL. Its bitrate values are examples, not settings that fit every output.
  • At 30 fps, a GOP size of 60 frames (-g 60) represents a two-second keyframe interval. If you change frame rate, adjust the GOP so the interval remains appropriate.

Choose encoder settings for your output

YouTube’s live encoder recommendations include RTMP/RTMPS ingest, H.264, H.265, or AV1 video, up to 60 fps, constant bitrate (CBR), AAC or MP3 audio, and a two-second keyframe interval with a maximum of four seconds. YouTube recommends RTMPS for encrypted ingest. Match bitrate to the codec, resolution, and frame rate using YouTube’s current table; test available upload speed and monitor stream health. The recommendations below are from YouTube’s settings page as accessed October 3, 2026, and are not measured outcomes:

H.264 output Minimum bitrate Recommended bitrate Source
1080p at 30 fps 5 Mbps 14 Mbps YouTube recommendation, accessed October 3, 2026
720p at 30 fps 3 Mbps 8 Mbps YouTube recommendation, accessed October 3, 2026

These examples apply only to the stated H.264 resolutions and frame rate. Consult YouTube’s live encoder settings for the current values applicable to your chosen output.

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

When to use the concat filter instead

If the clips have unlike codecs, stream layouts, frame sizes, frame rates, pixel formats, or audio layouts, the concat demuxer is not a conversion tool. FFmpeg’s FAQ recommends the concat filter when re-encoding is needed. Build a filter/transcode workflow that normalizes the inputs to a consistent video and audio format before sending the output. Re-encoding adds compute work and gives you control over the common output format; the demuxer avoids that work when its compatibility requirements are already met.

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

Troubleshoot common problems

FFmpeg rejects the list or cannot open a file

  • Check that ffconcat version 1.0 is the exact first line, with no byte-order mark or extra spaces.
  • Verify every path is correct relative to FFmpeg’s working directory, and escape spaces or special characters correctly.
  • Confirm the installed FFmpeg build supports the options used and that the playlist is readable by the account running FFmpeg.

Clips have gaps, glitches, or fail to join

  • Inspect stream layouts, codecs, and time bases first; they must match for reliable concat-demuxer use.
  • Check duration metadata. Incorrect or estimated durations can affect timestamps for following files; add accurate duration directives where needed.
  • If the sources are not compatible, switch to the concat filter and re-encode them to a consistent format.

YouTube reports a stream problem or does not receive video

  • Confirm that the ingest destination and stream key are the current values from YouTube Live Control Room.
  • Check RTMPS, CBR, keyframe interval, codec, and bitrate against YouTube’s current settings for your output resolution and frame rate.
  • Test upload capacity and watch YouTube’s stream-health indicators. Do not assume the sample bitrate in the command is suitable for another output format.
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 continuous playback without keeping a computer or home connection running, StreamNeo uploads your recording or playlist, uses your YouTube stream key, and loops it from the cloud. It is a YouTube-only service for uploaded videos, not camera streams.

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.
  • Nothing has to stay on at home; the stream continues from the cloud.
  • Any quality up to 4K 60fps streams as uploaded, at one flat price per slot, with no re-encode or quality tiers.
  • Automatic recovery is included if YouTube drops the stream.
  • The first day is free with no card required (one free day per account). The monthly option is $9.99 per month.

See StreamNeo or its plans. Start your free day with StreamNeo.

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.