October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Audio Playlist

How to Configure FFmpeg to Loop an Audio Playlist for YouTube Live

Configure FFmpeg’s concat demuxer to loop compatible audio files indefinitely for YouTube Live, with a visual source, RTMPS settings, testing steps, and troubleshooting.

By VGSources Team 5 min read

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Use FFmpeg’s concat demuxer to define the ordered audio files, then pass that playlist to FFmpeg with -stream_loop -1 so it repeats indefinitely. A still image or other video source must accompany the audio for a conventional YouTube Live encoder stream. The command below is a template: replace the paths and RTMPS destination with your own, and match the output settings to YouTube Live Control Room.

1. Prepare a compatible audio playlist

Create a text file named audio.ffconcat in your working directory. Its first line must be exactly ffconcat version 1.0 for automatic format recognition. Add one file entry per track, in the order you want them played:

ffconcat version 1.0
file 'music/track-01.mp3'
file 'music/track-02.mp3'

Relative paths keep the list portable when the playlist and audio folder stay together. The concat script supports quoted or escaped paths; take care to escape special characters if a filename requires it.

The concat demuxer treats files as though their packets were muxed consecutively and adjusts timestamps between them. For reliable concatenation, inputs should have the same streams, codecs, and time bases. Different durations or inaccurate duration metadata can cause timestamp gaps or artifacts. If a file’s duration metadata is wrong, the concat format’s duration directive can override it where appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

2. Add a visual and configure FFmpeg

An audio playlist alone does not provide video. This template loops a still cover image at 30 fps, reads the playlist at real-time speed, maps the image to video and the playlist to audio, and sends an RTMP-compatible FLV output:

ffmpeg 
  -loop 1 -framerate 30 -i cover.png 
  -re -stream_loop -1 -f concat -safe 0 -i audio.ffconcat 
  -map 0:v:0 -map 1:a:0 
  -c:v libx264 -tune stillimage -pix_fmt yuv420p -r 30 
  -g 60 -b:v 2500k -maxrate 2500k -bufsize 5000k 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "<YouTube RTMPS stream URL>"

Replace cover.png, playlist paths, and the destination with values for your setup. The RTMPS URL and stream key are available in YouTube Live Control Room; use the destination format shown there. Keep the key private.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
  • -loop 1 keeps the still image available as a looping video input; -framerate 30 sets its input frame rate.
  • -re reads the file input at its native rate, useful when packet flow needs to match a live stream. -stream_loop -1 means loop the playlist input indefinitely. Both options appear before that input’s -i.
  • -f concat selects the concat demuxer, while -safe 0 permits paths that the demuxer’s default safety checks may reject. Use only playlist files and paths you trust.
  • -map 0:v:0 -map 1:a:0 explicitly selects video from the image and audio from the playlist.
  • -g 60 at 30 fps sets a 60-frame GOP, or a two-second keyframe interval. Confirm that the resulting interval and other output settings meet the current requirements for your stream.
  • The example’s 2500 Kbps video bitrate is illustrative, not a universal YouTube recommendation. Choose bitrate for your resolution, frame rate, and codec.
  • -c:a aac -b:a 128k -ar 44100 sets AAC stereo audio at 128 Kbps and 44.1 kHz in this example.

3. Match YouTube Live’s ingestion settings

YouTube’s general encoder guidance lists H.264, H.265/HEVC, and AV1 video, AAC or MP3 audio, constant bitrate (CBR), frame rates up to 60 fps, and a recommended two-second keyframe interval that should not exceed four seconds. YouTube recommends RTMPS: YouTube’s encoder setup guidance.

Bitrate depends on codec, resolution, and frame rate. For one specific example, YouTube’s guidance lists 12 Mbps for H.264 at 1080p/60 fps; do not apply that figure to other combinations. Check YouTube’s current bitrate recommendations and set your encoder to match the stream you intend to run. For stereo audio, YouTube lists 44.1 kHz and 128 Kbps among its advanced settings: audio settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

The sample command uses H.264 and RTMPS, but availability and acceptable settings depend on the stream configuration shown in Live Control Room. Do not assume the example’s bitrate, frame rate, or codecs are right for every stream.

4. Choose the right concat method

Use the concat demuxer for compatible files

The command above uses the concat demuxer, which joins compatible inputs without requiring a re-encode of the source tracks. It is a good fit when the files have matching stream structure, codecs, and time bases and you do not need to process their audio.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Use the concat filter when tracks need processing

If inputs differ in their stream parameters, or you need processing such as fades or normalization, use a filter-and-re-encode workflow instead. FFmpeg’s concat filter is intended for cases where re-encoding is required. It gives you room to normalize the inputs into a consistent output, but requires choosing encoding settings and incurs the work of re-encoding. See FFmpeg’s concat guidance.

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

5. Test and monitor the stream

Before relying on a playlist for an event, test with representative tracks and the intended visual. Check that transitions sound as expected, playback continues into the next track, and the live output stays healthy. During a broadcast, watch YouTube’s stream health indicators and messages; YouTube recommends testing beforehand and monitoring while live: YouTube’s testing and monitoring guidance.

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.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

6. Troubleshoot common problems

Symptom Likely cause What to check
Playlist is not recognized The format identifier is missing, misspelled, or not on the first line. Make ffconcat version 1.0 the exact first line of audio.ffconcat.
A track cannot be opened Path or quoting error, or a path rejected by safety checks. Check spelling and relative paths from the FFmpeg working directory. Quote or escape special characters. Use -safe 0 only with trusted playlist contents.
Gaps, artifacts, or poor transitions between tracks Inputs may differ in streams, codecs, or time bases; duration metadata may be inaccurate. Check the files for matching stream properties and verify reported durations. Where appropriate, use the concat duration directive to correct duration metadata, or switch to a filter-and-re-encode workflow.
FFmpeg does not keep up with live output The playlist may not be read at real-time speed, or the machine may not sustain the chosen encoding workload. Confirm -re is before the playlist’s -i. Review output settings against your available compute and YouTube’s guidance.
YouTube reports an encoder or connection problem The destination, stream key, codec, bitrate, or other output setting may not match the stream configuration. Verify the RTMPS destination and key in Live Control Room, then check codec, CBR, keyframe interval, resolution, frame rate, and bitrate against its current guidance.

7. Check music rights and YouTube policies

Before streaming, make sure you have the rights needed to broadcast every track and visual. A playlist that runs technically is not permission to use copyrighted music. YouTube’s copyright systems and policies can affect a live stream or its availability; review the applicable guidance in YouTube Help and use music you are authorized to stream. Repeating the same material continuously does not remove copyright or channel-policy obligations.

Or let it run in the cloud

If you want an always-on YouTube stream without keeping an FFmpeg process running on your own computer, StreamNeo runs uploaded videos or playlists from the cloud. Upload your recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; StreamNeo automatically recovers if YouTube drops the stream. It sends uploads as made, up to 4K 60fps, at one flat price per slot rather than quality tiers. The first day is free with no card. Monthly: $9.99 per month.

Start your StreamNeo free day.

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 Patch Notes

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

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.