October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
24/7 streaming

How to Stream a Playlist of Videos 24/7 to YouTube Using FFmpeg

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

You can use FFmpeg’s concat demuxer to play a prepared playlist in sequence, loop it indefinitely, and send it to YouTube Live. The dependable route is to make the files compatible first, configure YouTube’s current ingest settings, then test transitions and stream health before leaving the process running. A 24/7 broadcast is not guaranteed to stay up, and YouTube says a stream longer than 12 hours may not be captured as an archive.

What you need before starting

  • A computer or server that can run FFmpeg continuously and sustain the required encoding workload, if re-encoding is needed.
  • Video files you have the right to stream, prepared as a compatible playlist.
  • A YouTube channel with live streaming enabled, plus the stream URL and key from YouTube Studio’s Live Control Room.
  • A stable wired internet connection with upload capacity above the stream’s total bitrate, leaving spare capacity for fluctuations.

FFmpeg’s concat demuxer is not a general-purpose format converter. FFmpeg requires concatenated files to have the same streams, codecs, and time bases. If your playlist contains different resolutions, frame rates, audio layouts, codecs, or stream counts, normalize the files before relying on this workflow.

Prepare and check the playlist files

Make the media compatible

Inspect each file’s video and audio streams before building the playlist. Choose one output format and make incompatible files match it. If you re-encode, account for the CPU or hardware-encoder capacity it requires; no single computer specification fits every playlist and output.

FFmpeg’s concat demuxer adjusts timestamps as it reads files in sequence, but gaps or artifacts can occur if stream durations do not align or a file’s stored or calculated duration is wrong. Its duration directive can override duration metadata when necessary. Review the concat demuxer documentation for the exact playlist syntax and constraints: FFmpeg concat demuxer documentation.

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.

Create a concat playlist

Make a plain-text file such as playlist.txt, with one file line per input, in the order you want them to play:

file '/path/to/video-1.mp4'
file '/path/to/video-2.mp4'
file '/path/to/video-3.mp4'

Use paths that are valid on the computer running FFmpeg. If a path contains characters that need escaping, follow the concat demuxer’s file syntax rather than assuming every filename will work unchanged. Test the list with the actual installed FFmpeg build and media.

Configure YouTube Live ingest

  1. Open YouTube Studio and go to the Live Control Room. Create or select the live stream you intend to use.
  2. Copy the stream URL and stream key shown there. Treat the key like a password: do not publish it, commit it to a public script, or include it in screenshots.
  3. Use RTMPS where YouTube provides it. YouTube’s current encoder guidance recommends RTMP or RTMPS and lists H.264, H.265 (HEVC), or AV1 video; AAC or MP3 audio; constant bitrate (CBR); and frame rates up to 60 fps.
  4. Set a two-second keyframe interval; YouTube recommends two seconds and says not to exceed four seconds. For stereo audio, its guidance recommends 128 Kbps and a 44.1 kHz sample rate. For 5.1 surround over RTMP/RTMPS, YouTube requires AAC.

Check YouTube’s live encoder guidance before publishing, because recommendations can change: YouTube Live encoder settings.

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.

Choose an FFmpeg command for your media

There is no safe universal command for an arbitrary playlist. First decide whether the files can be sent without re-encoding or must be converted to a consistent output. Map the intended video and audio streams explicitly; do not assume every file has the same stream order or even contains audio.

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

Stream-copy when the files already match

Stream-copy avoids re-encoding, but use it only if codecs, timestamps, stream layout, and the output container and YouTube ingest requirements are compatible. The following is a template, not a tested command for every file. Replace the placeholders with the RTMPS URL and key from Live Control Room, and confirm that the mapped streams and output are valid for your media:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt 
  -map 0:v:0 -map 0:a:0? -c copy 
  -f flv 'YOUR_RTMPS_URL/YOUR_STREAM_KEY'

-stream_loop -1 requests indefinite looping, and -re reads file media at its native rate instead of sending it as fast as possible. The optional audio map (0:a:0?) allows an input without an audio stream; it does not create audio. Verify these options with your installed build and playlist, especially at the transition back to the first file.

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.

Re-encode to a consistent output when needed

If sources differ or their streams are unsuitable for direct ingest, encode a consistent video and audio output instead. Select a resolution and frame rate appropriate for the source and intended broadcast, then set the encoder, CBR bitrate, keyframe interval, audio codec, and audio bitrate accordingly. This schematic example uses H.264 and AAC; it is not a substitute for checking the input, installed encoder availability, and current YouTube settings:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt 
  -map 0:v:0 -map 0:a:0? 
  -c:v libx264 -preset veryfast -pix_fmt yuv420p 
  -r 30 -g 60 -keyint_min 60 -sc_threshold 0 
  -b:v 5M -maxrate 5M -bufsize 10M 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'YOUR_RTMPS_URL/YOUR_STREAM_KEY'

This illustrative command targets 30 fps and a two-second GOP at that frame rate. Its 5 Mbps video setting corresponds to YouTube’s current H.264 recommendation for 1080p30; it is not appropriate for every resolution, frame rate, codec, or network. The encoder and settings must also be available in your FFmpeg build. If a source has no audio, map or generate audio according to your intended output instead of relying on an absent stream.

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

Match the bitrate to the output

YouTube publishes recommendations by codec, resolution, and frame rate. For H.264, its current examples include:

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
Output YouTube-recommended H.264 video bitrate
720p30 3 Mbps
1080p30 5 Mbps
1080p60 6 Mbps
720p60 8 Mbps

These are platform recommendations, not measured performance results. Use the current table for your chosen format rather than treating an old command’s bitrate as universal. The upload connection must sustain video plus audio bitrate with headroom; a line that only barely matches the nominal total is vulnerable to interruptions. See YouTube’s encoder settings and bitrate recommendations for the latest values.

Test the broadcast before leaving it unattended

  1. Start with representative files and send the stream to the selected YouTube event.
  2. Check the Live Control Room preview, stream health, and any warnings or messages. Confirm that picture and sound are correct.
  3. Watch at least one playlist transition, including the loop back to the first item. Look for freezes, gaps, timestamp problems, or audio changes.
  4. Confirm the process remains active and the connection is stable under the actual encoding workload.
  5. If an archive matters, enable and verify local recording before depending on the setup.

YouTube recommends testing in advance and monitoring stream health during a live event. FFmpeg looping defines the intended schedule, not guaranteed process uptime: host restarts, upload interruptions, invalid timestamps, or incompatible transitions can stop or disrupt a broadcast. Plan monitoring and recovery around your operating system and hosting environment; a single restart or daemon recipe is not suitable for every setup.

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

Plan a separate archive for a 24/7 stream

YouTube Help says streams under 12 hours can be automatically archived, while “If your stream exceeds 12 hours, it may not be captured at all.” A continuous 24/7 broadcast exceeds that threshold, so do not rely on a YouTube replay as the only copy. Record locally if preserving the full program matters, and check that the recording is actually being written and that storage is sufficient. YouTube also recommends keeping a local archive backup: YouTube Help on archiving live streams.

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.

Common problems and fixes

  • The concat input fails or the output breaks at a transition: Check that all files have matching streams, codecs, and time bases. Normalize differing media first, and investigate incorrect duration metadata or timestamp discontinuities.
  • FFmpeg sends too quickly or the stream is unstable: Confirm that -re is applied to file input and that the upload connection has spare capacity beyond the total stream bitrate.
  • YouTube reports poor stream health: Recheck the selected resolution and frame rate against the current bitrate recommendations, ensure CBR and the recommended keyframe interval, and inspect local network stability and encoder load.
  • There is no sound: Confirm that each relevant file has an audio stream and that the chosen map includes it. A video-only source cannot supply audio by mapping alone.
  • The stream key is rejected or exposed: Copy the current key from the correct Live Control Room event. If it has been disclosed, replace it in YouTube Studio and update the FFmpeg destination.
  • The YouTube archive is incomplete or missing: A stream exceeding 12 hours may not be captured at all. Use a verified local recording for a 24/7 program.

Copyright and YouTube policy still apply

Having a file on your computer does not establish that you may broadcast it. Use videos and audio you created, licensed, or otherwise have the rights to stream, and check applicable license terms, including whether they cover continuous rebroadcast. YouTube’s copyright and monetization policies also apply to live streams; looping content does not bypass them. Review the platform’s current rules before scheduling a channel around third-party material.

Or let it run in the cloud

With StreamNeo, upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded videos from the cloud, so your computer and home connection do not have to stay on. It streams to YouTube only.

  • One flat price per slot for any uploaded quality up to 4K 60fps, with no re-encode or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free, with no card required; one free day per account.
  • Monthly: $9.99 per month. Other billing periods are available, and the same product is included on every plan; only the length changes.

Start the free day at StreamNeo registration.

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.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair 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.