To loop a study playlist into a live stream with FFmpeg, put compatible video files in a concat-demuxer playlist, then use -stream_loop -1 on that playlist as the input. Send the output to the destination’s current ingest endpoint using its supported protocol. This makes the media repeat; it does not by itself keep the computer, network, FFmpeg process, or platform connection running reliably around the clock.
What you need before starting
- FFmpeg installed on a computer that can stay on and connected to the internet.
- The video and audio files you have the right to stream, stored where FFmpeg can read them.
- A live destination that permits your intended broadcast and provides an ingest URL and stream key.
- A private place to store the stream key. Do not expose it in a public command, screenshot, or log.
Confirm the destination’s current live-stream eligibility and content policies before broadcasting. The technical instructions here do not establish whether a platform permits every 24/7 pre-recorded study stream. Copyright rules and any rules about repetitive or reused content are destination-specific; use material you own or are licensed to broadcast, and check the platform’s current terms.
Build the FFmpeg playlist
Create the concat script
Create a plain-text file named playlist.ffconcat in the directory containing your videos. Its first line can be ffconcat version 1.0; if included, it must be exact and first for FFmpeg’s automatic format recognition. Add one file line for each video, in the order you want it to play:
ffconcat version 1.0
file 'study-video-01.mp4'
file 'study-video-02.mp4'
file 'study-video-03.mp4'
For paths with spaces or special characters, quote or escape them using the concat script’s syntax. If the files are elsewhere, use their paths. FFmpeg’s concat demuxer reads the listed files and demuxes them one after another, as though their packets had been muxed together. See the FFmpeg Formats Documentation for script syntax and path handling.
#1 Best Overall
- 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.
Check that the files are compatible
The concat demuxer expects every file to have the same streams, including codecs and time bases. If the stream layouts do not match, concatenation may fail or produce problems. FFmpeg adjusts timestamps globally, but files with different stream lengths can create gaps. Incorrect or unavailable duration metadata can also cause artifacts; the concat script supports a duration directive to override a duration when needed. Consult the concat demuxer documentation before adding overrides.
If the files are not compatible or need normalization, use the concat filter and re-encode rather than assuming the demuxer will make them match. FFmpeg’s FAQ distinguishes the concat filter, demuxer, and protocol; the protocol is a narrower file-level approach, not the playlist script described here. See the FFmpeg FAQ.
Rank #2
- 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 the playlist and send it live
Use the destination’s ingest details
The endpoint and credentials come from your live-stream destination; there is no universal ingest URL or stream key. FFmpeg documents RTMP publishing with FLV output. RTMPS is RTMP carried over an encrypted SSL connection. Use the exact endpoint and key supplied by the destination, and follow its current ingest requirements. FFmpeg’s protocol documentation describes RTMP URL structure and RTMPS.
Illustrative RTMP-family command
This is a starting structure, not a tested universal preset. Replace the placeholder URL with the actual destination endpoint and stream key, and choose encoder settings that the destination accepts:
Rank #3
- 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.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat
-c:v libx264 -c:a aac -f flv "rtmps://INGEST_HOST/APP/STREAM_KEY"
-stream_loop -1 requests infinite looping of the input, so it belongs before the corresponding -i. -re reads the input at its native rate for real-time output. The example re-encodes video with H.264 and audio with AAC; whether those encoders are present in your FFmpeg build and whether the destination accepts those settings depends on your setup. FFmpeg documents looping and input/output option placement in its command-line documentation, and real-time RTMP publishing in its protocol documentation.
A stream-copy variant may avoid re-encoding when all inputs and the destination are compatible, but it does not fix mismatched media. Re-encoding can normalize inputs, at the cost of CPU resources and possible quality loss. Do not assume one bitrate, resolution, profile, or keyframe interval will suit every ingest service; use its current specifications.
Rank #4
- 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
If the destination requires YouTube HLS
Do not reuse the RTMP/FLV example unchanged. YouTube’s HLS setup requires MPEG-TS segments, segment durations from 1 to 4 seconds, HTTPS POST/PUT, and a rolling playlist with no more than five outstanding segments. YouTube says HLS has higher latency than RTMP because it sends segments rather than a continuous stream. Follow the current YouTube HLS setup instructions for the complete configuration.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Test the stream before leaving it unattended
- Start with a short private or unlisted trial, if the destination offers those options.
- Watch the destination’s preview and confirm the video reaches it and the audio is present.
- Observe transitions between playlist files for gaps, missing audio, or playback artifacts.
- Check that the connection remains stable and that FFmpeg continues running; a loop alone does not supervise or restart a failed process.
For continuous operation, account separately for computer uptime, power, network stability, FFmpeg process supervision, reconnect behavior, and the platform’s handling of interruptions. The FFmpeg mechanisms above do not guarantee any of these, and a universal restart strategy is not established here.
Recommended Free Tools
Best Value
- 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.
Troubleshooting common problems
- FFmpeg rejects a playlist entry: check each path, filename, quotation, and escaping; use the concat script syntax for spaces or special characters.
- Playback breaks at a file boundary: verify that the files have matching stream layouts, codecs, and time bases. Check duration metadata and use a duration directive only when you have the correct duration.
- Audio or video is missing: compare the streams in each input and verify that your chosen output codecs and destination ingest settings support them.
- The destination rejects the connection: confirm the current ingest protocol, URL, stream key, and required output format. Keep the key private and replace it if it has been exposed.
- The stream stops after a connection or host failure: looping only repeats media while FFmpeg is running and connected. You need a separate approach for process recovery and host/network availability.
- HLS ingest fails: check that the setup follows YouTube’s HLS-specific requirements rather than the RTMP/FLV example.
Or let it run in the cloud
If you want a YouTube stream from uploaded videos without keeping a computer on at home, StreamNeo runs the loop in the cloud. Upload your recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a live camera feed, and it streams to YouTube only.
- Nothing has to stay on at home; StreamNeo continues from the cloud.
- Each slot streams your upload as made, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers.
- It automatically recovers if YouTube drops the stream.
- The first day is free with no card required.
Monthly: $9.99 per month. See StreamNeo for details, then start your free 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.




