Use FFmpeg’s concat demuxer to play a text file of videos in order, loop that list, and send the output to YouTube Live. This works best when the files have matching streams, codecs, and time bases. If they do not, use FFmpeg’s concat filter and re-encode them to a consistent format.
What you need before you start
- FFmpeg installed on a computer that can stay on and connected throughout the stream.
- Video files accessible to that computer. For the concat demuxer, their streams, codecs, and time bases must match.
- A YouTube live stream configured in YouTube Studio, with its ingest destination and stream key from Live Control Room.
- Enough upload bandwidth for the bitrate you choose. YouTube recommends testing upload speed and monitoring stream health.
The FFmpeg list is a sequence of input files, not a YouTube playlist. FFmpeg sends one continuous encoded output to YouTube; YouTube receives it as a live stream.
1. Create the file list
Make a plain-text file named playlist.ffconcat and put the files in the order you want them to play:
ffconcat version 1.0
file 'video-01.mp4'
file 'video-02.mp4'
file 'video-03.mp4'
The first line must be exactly ffconcat version 1.0, with no leading spaces or byte-order mark. Save the file in an encoding compatible with FFmpeg’s documented extended-ASCII script format. Paths are interpreted from the working directory unless you provide full paths. Escape spaces and special characters in paths with backslashes or quote the path appropriately for the concat script. See the FFmpeg concat demuxer documentation.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
2. Check that the videos are compatible
FFmpeg’s concat demuxer expects each file to have the same streams, codecs, and time bases. The FFmpeg documentation states: “All files must have the same streams (same codecs, same time base, etc.).” The demuxer adjusts timestamps so each file follows the previous one, but differences in stream lengths can create gaps.
Incorrect or estimated duration metadata can also shift later timestamps and cause artifacts. If a file has missing or inaccurate duration metadata, you can add a duration directive for that file in the list, using its accurate duration. Do not guess: incorrect duration values can make the transition worse.
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
3. Get the YouTube ingest details
- Open YouTube Studio and go to Create > Go live to set up or open your live stream.
- In Live Control Room, copy the ingest destination and stream key shown for the stream. Use the exact values YouTube provides; the endpoint and key in the command below are placeholders.
- Keep the stream key private. Anyone who obtains it may be able to send video to your channel’s stream.
YouTube’s stream-key instructions explain how to manage the key in Live Control Room.
4. Loop the list and send it to YouTube
Replace the playlist path, ingest endpoint, and stream key in this illustrative command. It assumes 30 fps output and H.264 video encoded at 4,500 kbps; it is not a tested command or a universal setting. Check option availability in your installed FFmpeg build and use the ingest URL provided in YouTube Live Control Room.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
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 for real-time output, and -stream_loop -1 tells FFmpeg to repeat the input indefinitely. -f concat selects the concat demuxer, while -safe 0 permits paths that the demuxer’s default safety checks might reject. Use that option only with a list you control and trust. The final argument combines YouTube’s RTMPS ingest destination and stream key in the format supplied for your stream.
At 30 fps, -g 60 sets a 60-frame GOP, or a two-second keyframe interval; -keyint_min 60 sets the minimum interval to the same value. If you change the frame rate, adjust the GOP values to maintain the intended interval. The video bitrate, frame rate, audio settings, and resolution must suit your source material, connection, and YouTube’s current recommendations.
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
5. Choose settings for YouTube Live
YouTube lists RTMP/RTMPS ingest, H.264, H.265, and AV1 video, frame rates up to 60 fps, CBR, and AAC or MP3 audio. It recommends RTMPS for encrypted ingest, CBR, and a two-second keyframe interval, with keyframes no more than four seconds apart. Check the current YouTube live encoder settings for the bitrate matching your codec, resolution, and frame rate.
For context, YouTube’s table lists H.264 at 1080p30 with a 5 Mbps minimum and 14 Mbps recommended setting, and H.264 at 720p30 with a 3 Mbps minimum and 8 Mbps recommended. These are YouTube recommendations current as accessed October 3, 2026, not measured results; they do not automatically apply to other codecs, resolutions, or frame rates. Do not use the example command’s 4,500 kbps video bitrate as a general recommendation.
Best Value
- [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
- 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
- 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
- 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
When to use the concat filter instead
If the videos have different stream layouts, codecs, frame sizes, frame rates, pixel formats, or audio layouts, the concat demuxer is not the right way to make them match. Use FFmpeg’s concat filter and re-encode to normalize the sources into a consistent output. This requires more processing and adds an encoding step, but gives you control over the common output format. FFmpeg’s FAQ on joining video files describes the filter approach.
| Method | Best suited to | Re-encoding | Trade-off |
|---|---|---|---|
| Concat demuxer | Files with matching streams, codecs, and time bases | Not inherently required; the command may still encode its output for YouTube | Lower processing demand when inputs are compatible, but mismatches can prevent clean joins. |
| Concat filter | Sources that need a normalized output | Used when re-encoding to make the inputs consistent | More processing and encoding control; choose output settings that fit YouTube and your available upload bandwidth. |
Troubleshooting
FFmpeg rejects the list or cannot open a file
- Confirm that
ffconcat version 1.0is the exact first line, without a byte-order mark or leading spaces. - Check spelling, working directory, file permissions, and whether each path is written correctly in the concat script.
- If you used
-safe 0, verify that every list entry is trusted and points where you expect.
The join has gaps, artifacts, or fails on a later file
- Inspect each file’s streams, codecs, and time bases. The demuxer requires them to match.
- Check for mismatched stream lengths and missing or inaccurate duration metadata. Correct the list’s
durationdirective if a duration is missing or wrong. - If the sources do not match, switch to the concat filter and re-encode to a consistent frame size, frame rate, pixel format, and audio layout.
YouTube does not receive the stream or reports poor stream health
- Confirm that the command uses the ingest destination and stream key for the intended stream, and that the key has not been mistyped or replaced.
- Check RTMPS, CBR, keyframe interval, codec, and bitrate against YouTube’s current encoder settings for your output resolution and frame rate.
- Test whether upload speed can sustain the selected bitrate, then monitor stream health in Live Control Room.
The stream stops when the computer or connection fails
This FFmpeg method runs on your computer and depends on that computer and its internet connection remaining available. If you need unattended operation, plan for those dependencies or use a cloud service that keeps the stream running independently of your home setup.
Or let it run in the cloud
StreamNeo keeps a YouTube channel live from uploaded videos, without leaving a computer or home connection on. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the videos from the cloud and automatically recovers if YouTube drops the stream. Your uploads stream as made, up to 4K 60fps, at one flat price per slot; there are no quality tiers. The first day is free with no card, one free day per account. Monthly pricing is $9.99 per month.
Each slot includes one always-on stream, 10 GB of storage per slot pooled across active slots, 24/7 looping and playlists, and support from the StreamNeo team. UPI and cards are accepted in India; card checkout is available worldwide. See StreamNeo pricing, or start the free day at StreamNeo registration.
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 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchQuick 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.




