You can loop a prerecorded playlist into a YouTube Live stream with FFmpeg’s concat demuxer: put the clip paths in a text manifest, then feed that manifest to FFmpeg with -stream_loop -1 and a YouTube RTMP or RTMPS destination. This works best when every clip has matching streams, codecs and time bases. If they do not, normalize them first or use a filter-based concat workflow that re-encodes.
What the concat demuxer does—and what it does not
FFmpeg’s concat demuxer reads a text manifest and presents the listed files’ packets as one input, adjusting timestamps so each file follows the previous one. It does not generally convert mismatched media into a compatible stream. FFmpeg’s documentation says, “All files must have the same streams (same codecs, same time base, etc.).” FFmpeg concat demuxer documentation
As an Amazon Associate I earn from qualifying purchases.
For a compatible playlist, the demuxer can join clips without re-encoding. To loop that input, use -stream_loop -1 among the options for the playlist input. The output still needs encoder settings suitable for YouTube Live; copying packets is only an option when the files and output requirements are compatible.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteBuild the playlist manifest
-
Put the clips and a plain-text file named
playlist.txtin a working directory. List each clip in playback order, one per line:#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
file 'clip-01.mp4' file 'clip-02.mp4' file 'clip-03.mp4' -
Use paths relative to the manifest’s working directory where practical. Quote or escape paths containing spaces or special characters. The demuxer applies safe path handling by default;
-safe 0permits paths it would otherwise reject. Use that option only with a manifest and paths you trust. -
Check that the clips have matching streams, codecs and time bases. Differences in resolution, pixel format, audio presence, codec parameters or stream layout can cause errors or transition problems. Unequal audio and video durations, or incorrect file durations, can also create timestamp gaps or artifacts. Use
ffprobeto inspect files and test transitions locally before relying on the playlist unattended.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
The manifest approach is not a general-purpose format converter. If the clips do not match, preprocess them into a common profile, or use a concat filter that explicitly converts differing properties. FFmpeg’s FAQ distinguishes the demuxer’s use when avoiding re-encoding from the filter approach when re-encoding is needed. FFmpeg FAQ: joining video files
Recommended Free Tools
Choose a YouTube-compatible output
Use the RTMP or RTMPS server URL and stream key shown for your event in YouTube Live Control Room. YouTube recommends RTMP or RTMPS, constant bitrate (CBR), and keyframes every two seconds, with four seconds as the maximum interval. Select codec, resolution, frame rate and bitrate together; consult YouTube’s live encoder settings for the current recommendations.
Rank #3
- CanaKit Raspberry Pi 5 Essentials Starter Kit
For H.264, YouTube’s current settings page lists 5 Mbps at 1080p30, and 6 Mbps minimum / 17 Mbps recommended at 1080p60. At 4K (2160p30), it lists 14 Mbps minimum and 42 Mbps recommended. These values apply to those specific resolution and frame-rate rows, not every stream. Set the GOP length in frames to match a two-second keyframe interval—for example, 60 frames at 30 fps. Confirm the current table and your encoder settings before going live.
The following is a starting pattern for transcoding a 30 fps playlist to H.264 video and AAC audio. The 5 Mbps video bitrate is illustrative for the 1080p30 row, not a universal recommendation; change resolution, frame rate, bitrate and GOP length to match your media and the applicable YouTube settings. Replace the destination with the RTMP or RTMPS URL and stream key from Live Control Room.
Rank #4
- 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
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt
-c:v libx264 -preset veryfast -b:v 5000k -maxrate 5000k -bufsize 10000k
-pix_fmt yuv420p -g 60 -c:a aac -b:a 128k -ar 44100
-f flv 'rtmp://SERVER/STREAM/KEY'
-rereads file input at its native rate, which is appropriate when using prerecorded media to simulate a live source. It does not fix media incompatibilities or guarantee reliability.-stream_loop -1asks FFmpeg to loop the playlist input indefinitely.-f concat -safe 0 -i playlist.txtselects the concat demuxer and reads the manifest. Omit-safe 0if the manifest uses paths accepted by the default safe mode.-c:v libx264and-c:a aactranscode the video and audio. The example’s-g 60gives a two-second GOP at 30 fps; recalculate for another frame rate.-f flvis the output container used here for the RTMP feed. The example assumes an FFmpeg build with the selected encoders; checkffmpeg -h fullor the local build if an option is unsupported.
Keep the stream key private. YouTube describes it as a password that tells the encoder where to send the feed. YouTube Help: stream keys
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteRun a test and monitor the stream
-
In Live Control Room, create or select an event and retrieve its server URL and stream key. YouTube recommends automatic resolution and frame-rate detection by default; a custom stream key can be used for manual settings.
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.
-
Start with an unlisted test. Include moving video and audio, check stream health, and review warnings before making the event public. YouTube’s live streaming tips recommend testing the actual setup and monitoring the connection.
-
Measure upload capacity from the machine and network that will run FFmpeg. YouTube recommends leaving 20% headroom above the total outgoing bitrate; a headline internet-plan speed is not a substitute for checking the host’s real connection. YouTube streaming tips
-
For unattended operation, run FFmpeg under process supervision configured to restart it after a crash or host restart. Keep a local recording if the footage matters. These are operational safeguards rather than features provided automatically by the concat demuxer.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Plan around YouTube’s 12-hour archive limit
An always-on live feed and a dependable YouTube archive are separate concerns. Streams under 12 hours can be automatically archived, but YouTube warns: “If your stream exceeds 12 hours, it may not be captured at all.” If an archive matters, save a local recording and consider ending and restarting sessions before they exceed 12 hours. YouTube Help: archive live streams
Troubleshoot common failures
| Symptom | Likely cause | What to check or change |
|---|---|---|
| Concat reports mismatched streams or fails when opening a clip | Files differ in streams, codecs, time bases, or other parameters, or a path is invalid. | Inspect each file with ffprobe; correct manifest paths and normalize mismatched clips before streaming, or use a concat filter workflow. |
| Audio or video jumps at a clip boundary | Unequal stream lengths, inaccurate durations, or incompatible media parameters can disrupt timestamps. | Check clip durations and stream layouts. Test transitions locally; correct the media or preprocess it to a consistent profile. |
| YouTube reports poor stream health or buffering | Outgoing bitrate may exceed the host’s usable upload capacity, or encoder settings may not suit the selected resolution and frame rate. | Check YouTube’s current encoder table, measure the actual connection, and leave the recommended 20% upload headroom. |
| FFmpeg rejects an option or encoder | The installed FFmpeg version or build may not support the option or encoder used in the example. | Check ffmpeg -h full and the available encoders; adjust the command to the local build. |
| The feed stops after a process or host failure | FFmpeg does not, by itself, supervise and relaunch its own process after every failure. | Configure an external process supervisor to restart FFmpeg and the host as needed; test recovery before depending on unattended operation. |
| A live session has no YouTube archive | The session exceeded 12 hours, which YouTube says may mean it is not captured at all. | Keep a local recording and, when archive availability matters, plan shorter sessions. |
Or let it run in the cloud
If you want the playlist live without leaving a computer running at home, StreamNeo runs uploaded videos as a 24/7 YouTube stream from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. There is no home computer or connection to keep on; StreamNeo automatically recovers if YouTube drops the stream. Your uploaded quality is streamed as made, up to 4K 60fps, at one flat price per slot. The first day is free with no card. The monthly option is $9.99 per month. For Indian creators, UPI is supported. Start your free StreamNeo day.
Quick Recap
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.

